Thread: [Refdb-users] refdb/mysql problems under Cygwin -- please help
Status: Beta
Brought to you by:
mhoenicka
From: Gary L. <gl...@cn...> - 2003-11-15 18:37:42
|
Hi, I've been struggling to get refdb working under Cygwin. If anyone could help me get the following issues resolved, I'd be very appreciative. The main problem seems to be failure of refdbd to communicate propertly with mySQL (or to relay information to refdba/refdbc) The mysql daemon works fine from dos. I was able to create the initial table structures from refb.dump. Although I can run mysqld in cygwin (and it loads up fine), I can't get the comman-line mysqlc to work under cygwin (although strangely it works in dos), but I think that's not the main issue. Finally, I realized that refdbd/a/c weren't reading the configuration files properly for some reason. Starting them with the -y switch solved the problem "-y /usr/local/etc/refdb" I also had to uncomment the dbi_drivedir option in refdbdcrc : dbi_driverdir /usr/local/lib/dbd, to get refdbd to see libdbi. Now when I run refdbc, I get the following errors for the various commands: refdbc: whichdb cannot get row count refdbc: getau getfoo failed refdbc: listdb could not connect to database server refdbc: getref select failed when I use redba, I just get "could not connect to database server" errors. I know that refdbc is communicating with mysql on some level since if mysqld isn't running, it also gives me "could not connect to database server" The serverip in the config files is set to the ip of my machine. I checked the mysql user permissions and they seem fine -- I'm trying to log in as a superuser so that shouldn't be the problem. Does anyone have any ideas? Thank you. |
From: Markus H. <mar...@mh...> - 2003-11-16 00:45:52
|
Hi Gary, Gary Lupyan writes: > Hi, I've been struggling to get refdb working under Cygwin. If anyone > could help me get the following issues resolved, I'd be very appreciative. > > The main problem seems to be failure of refdbd to communicate propertly > with mySQL (or to relay information to refdba/refdbc) > I used to have the Cygwin/MySQL combo at some time at my workplace. It did work so we should get yours to work too. However, is there any particular reason why you don't use PostgreSQL which is available as a Cygwin package? This is what I currently run at work and it was pretty smooth to set up. > The mysql daemon works fine from dos. I was able to create the initial > table structures from refb.dump. Although I can run mysqld in cygwin (and > it loads up fine), I can't get the comman-line mysqlc to work under cygwin > (although strangely it works in dos), but I think that's not the main issue. > I'm afraid it is an issue. The MySQL command-line client is a wrapper around libmysqlclient which is also used by the libdbi driver. If the client fails, the libdbi driver is likely to fail too. > Finally, I realized that refdbd/a/c weren't reading the configuration files > properly for some reason. Starting them with the -y switch solved the > problem "-y /usr/local/etc/refdb" I also had to uncomment the dbi_drivedir > option in refdbdcrc : dbi_driverdir /usr/local/lib/dbd, to get refdbd to > see libdbi. Which version do you use anyway? I have been told about this problem with Cygwin previously but I couldn't reproduce this on my setup. > > Now when I run refdbc, I get the following errors for the various commands: > > refdbc: whichdb > cannot get row count > > refdbc: getau > getfoo failed > > refdbc: listdb > could not connect to database server > > refdbc: getref > select failed > > This is quite inconsistent. Are all results from the same session? E.g. the whichdb result means that refdbd could connect to mysqld but got a query error. the listdb result means that refdbd couldn't even connect to mysqld. This makes me kinda nervous as it should either work all the time or fail all the time, but never "once in a while". Keep also in mind that unless you successfully created a reference database and selected that as your current database, most of the above commands will fail anyway. A reference database is different from the refdb1 system database. > The serverip in the config files is set to the ip of my machine. I checked > the mysql user permissions and they seem fine -- I'm trying to log in as a > superuser so that shouldn't be the problem. > Could you please compile as much debug info as possible and send it to me via private mail? Things I'm interested in are: /usr/local/etc/refdbd/* /var/log/refdb* with a log level set to 7 the mysqld log (wherever that is) a dump of the mysql.user table the output of mysql:"SHOW DATABASES" the output of mysql:"SHOW TABLES" after selecting your reference database regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
From: Gary L. <gl...@cn...> - 2003-11-16 23:25:29
|
Markus, I got it to work last night :) The problem was several-fold. First, I created the refdb1 database (as per instructions), but not the other database. I realized something was missing when looking at the logs, I saw it was trying to lock tables that didn't exist. Secondly, I set serverip to the actual ip of my machine as the readme file that came with the cygwin release said to do. Apparently that was the problem. When I switched it back to 127.0.0.1, it worked. I still can't run mysqlc inside cygwin (although I can run it in DOS when mysqld is loaded inside cygwin). The cygwin dll file is in the same place as the mysql executables. I then had some problems with the web interface -- namely the refdbc that was inside cgi-bin wasn't reading its configuration file, and I couldn't use the -y switch through the web. I realized that refdbd, refdba, and the interactive refdbc all read the config files in my home directory by default. This is the precompiled version of refdb I'm talking about-- is there a way way to change it so that it reads configs from a common directory? Another issue with the web version is that the precompiled .html files had the wrong links -- I had to add /refdb/ to all the link locations manually. That worked fine, but now the only issue is that when I submit a web request to refdbc, the stuff it prints still has the default links. Do you know if I can recompile just refdbc with the appropriate switches? At 01:15 AM 11/16/2003 +0100, you wrote: >Hi Gary, > >Gary Lupyan writes: > > Hi, I've been struggling to get refdb working under Cygwin. If anyone > > could help me get the following issues resolved, I'd be very appreciative. > > > > The main problem seems to be failure of refdbd to communicate propertly > > with mySQL (or to relay information to refdba/refdbc) > > > >I used to have the Cygwin/MySQL combo at some time at my workplace. It >did work so we should get yours to work too. However, is there any >particular reason why you don't use PostgreSQL which is available as a >Cygwin package? This is what I currently run at work and it was pretty >smooth to set up. > > > The mysql daemon works fine from dos. I was able to create the initial > > table structures from refb.dump. Although I can run mysqld in cygwin > (and > > it loads up fine), I can't get the comman-line mysqlc to work under > cygwin > > (although strangely it works in dos), but I think that's not the main > issue. > > > >I'm afraid it is an issue. The MySQL command-line client is a wrapper >around libmysqlclient which is also used by the libdbi driver. If the >client fails, the libdbi driver is likely to fail too. > > > Finally, I realized that refdbd/a/c weren't reading the configuration > files > > properly for some reason. Starting them with the -y switch solved the > > problem "-y /usr/local/etc/refdb" I also had to uncomment the > dbi_drivedir > > option in refdbdcrc : dbi_driverdir /usr/local/lib/dbd, to get refdbd to > > see libdbi. > >Which version do you use anyway? I have been told about this problem >with Cygwin previously but I couldn't reproduce this on my setup. > > > > > Now when I run refdbc, I get the following errors for the various > commands: > > > > refdbc: whichdb > > cannot get row count > > > > refdbc: getau > > getfoo failed > > > > refdbc: listdb > > could not connect to database server > > > > refdbc: getref > > select failed > > > > > >This is quite inconsistent. Are all results from the same session? >E.g. the whichdb result means that refdbd could connect to mysqld but >got a query error. the listdb result means that refdbd couldn't even >connect to mysqld. This makes me kinda nervous as it should either >work all the time or fail all the time, but never "once in a while". > >Keep also in mind that unless you successfully created a reference >database and selected that as your current database, most of the above >commands will fail anyway. A reference database is different from the >refdb1 system database. > > > The serverip in the config files is set to the ip of my machine. I > checked > > the mysql user permissions and they seem fine -- I'm trying to log in > as a > > superuser so that shouldn't be the problem. > > > >Could you please compile as much debug info as possible and send it to >me via private mail? Things I'm interested in are: > >/usr/local/etc/refdbd/* >/var/log/refdb* with a log level set to 7 >the mysqld log (wherever that is) >a dump of the mysql.user table >the output of mysql:"SHOW DATABASES" >the output of mysql:"SHOW TABLES" after selecting your reference >database > >regards, >Markus |
From: Markus H. <mar...@mh...> - 2003-11-16 23:48:22
|
Gary Lupyan writes: > Markus, I got it to work last night :) The problem was > several-fold. First, I created the refdb1 database (as per instructions), > but not the other database. I realized something was missing when looking > at the logs, I saw it was trying to lock tables that didn't exist. > Secondly, I set serverip to the actual ip of my machine as the readme > file that came with the cygwin release said to do. Apparently that was the > problem. When I switched it back to 127.0.0.1, it worked. I still can't > run mysqlc inside cygwin (although I can run it in DOS when mysqld is > loaded inside cygwin). The cygwin dll file is in the same place as the > mysql executables. > Glad it worked out. I'll have to check the serverip thing as I've been told the opposite previously - I'll check tomorrow what I use at work. > I then had some problems with the web interface -- namely the refdbc that > was inside cgi-bin wasn't reading its configuration file, and I couldn't > use the -y switch through the web. I realized that refdbd, refdba, and the > interactive refdbc all read the config files in my home directory by > default. This is the precompiled version of refdb I'm talking about-- is > there a way way to change it so that it reads configs from a common > directory? This is actually the default (/usr/local/etc/refdb/*) but I'm afraid the prebuilt Cygwin binaries have a problem here. Alan created them using a virtual root which may have screwed up the compiled-in defaults. You could try to replace cgi-bin/refdbc with a shell script that calls refdbc with the appropriate parameter. I've never tried this, though. > Another issue with the web version is that the precompiled .html files had > the wrong links -- I had to add /refdb/ to all the link locations > manually. That worked fine, but now the only issue is that when I submit a > web request to refdbc, the stuff it prints still has the default links. Do > you know if I can recompile just refdbc with the appropriate switches? > This is most likely due to the same problem with the virtual root. RefDB 0.9.3 and 0.9.4-pre1 build out of the box on Cygwin, so this might be the cleanest way to fix these things. I'll do another binary release as soon as time permits. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
From: Markus H. <mar...@mh...> - 2003-11-17 22:21:43
|
Gary Lupyan writes: > $ ls /usr/local/lib/dbd/ > total 691 > -rwxr-xr-x 1 psycomp None 58130 Jul 15 19:52 libmsql.dll > -rwxr-xr-x 1 psycomp None 39704 Jul 15 19:52 libmsql.dll.a > -rwxr-xr-x 1 psycomp None 146504 Jul 15 19:52 libmysql.dll > -rwxr-xr-x 1 psycomp None 187782 Jul 15 19:52 libmysql.dll.a > -rwxr-xr-x 1 psycomp None 43837 Jul 15 19:52 libpgsql.dll > -rwxr-xr-x 1 psycomp None 14228 Jul 15 19:52 libpgsql.dll.a > -rwxr-xr-x 1 psycomp None 6478 Jul 15 19:35 libmsql.a > -rwxr-xr-x 1 psycomp None 682 Jul 15 19:35 libmsql.la > -rwxr-xr-x 1 psycomp None 21252 Jul 15 19:35 libpgsql.a > -rwxr-xr-x 1 psycomp None 671 Jul 15 19:35 libpgsql.la > -rwxr-xr-x 1 psycomp None 15150 Jul 15 19:35 libmysql.a > -rwxr-xr-x 1 psycomp None 729 Jul 15 19:35 libmysql.la > -rwxr-xr-x 1 psycomp None 167007 Jan 5 2003 libmysqlclient.dll > [...] > Oddly, I also have libmysqlclient.dll in /usr/local/bin and it's a slightly > smaller file. > The libmysqlclient.dll does not belong into /usr/local/lib/dbd. It is not part of the libdbi-drivers binary package and must have found it's way there by some other means. Apparently the MySQL driver (libmysql.dll) loads the libmysqlclient.dll from the same directory and thus picks a wrong version. Removing this file should enable the driver to find the copy in /usr/local/bin. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |