Thread: [Refdb-users] can't create database conn struct
Status: Beta
Brought to you by:
mhoenicka
From: Antti V. <Ant...@uk...> - 2003-06-12 08:11:07
|
Hi, I'm trying to use refDB 0.9.2 with MySQL 4.0.11 and libdbi version 0.6.7, but get these lines 6:pid=20617:Thu Jun 12 07:23:43 2003:serving client on fd 6 with protocol version 1 4:pid=20617:Thu Jun 12 07:23:43 2003:creating database connection structure failed 6:pid=20617:Thu Jun 12 07:23:43 2003:child finished client on fd 6 in the refdbd log file when trying viewstat command in the refdba prompt. Make check runs ok with libdbi, and I've tried to run refdba both as user and as root, but get the same error every time. I ran refdb's configure script with options ./configure --with-libdbi-lib=/usr/local/lib --with-btparse-lib=/home/vanne/tmp/btparse-0.33/ --with-db-server=mysql and libdbi's ./configure --with-mysql I've created refdb1 database in mysql as root and it works fine when used from mysql prompt. Both mysql and refdbd run on the same machine. Any ideas how to get this thing going? Thanks in advance. -- Ant...@uk... | Department of Applied Physics tel. +358 17 162 279 | University of Kuopio |
From: Markus H. <mar...@mh...> - 2003-06-12 21:27:51
|
Hi, Antti Vanne writes: > ./configure --with-libdbi-lib=/usr/local/lib > --with-btparse-lib=/home/vanne/tmp/btparse-0.33/ --with-db-server=mysql > The libdbi drivers appear to be in the default location so the --with-libdbi-lib option should not be required. I actually suspect that this option screws up everything as the driver path is /usr/local/lib/dbi, not just /usr/local/lib. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
From: Markus H. <mar...@mh...> - 2003-06-14 19:40:05
|
Markus Hoenicka writes: > The libdbi drivers appear to be in the default location so the > --with-libdbi-lib option should not be required. I actually suspect > that this option screws up everything as the driver path is > /usr/local/lib/dbi, not just /usr/local/lib. ================== Oops, please read /usr/local/lib/dbd regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
From: Antti V. <Ant...@uk...> - 2003-06-16 07:16:49
|
Markus Hoenicka wrote: > Antti Vanne writes: > > ./configure --with-libdbi-lib=/usr/local/lib > > --with-btparse-lib=/home/vanne/tmp/btparse-0.33/ --with-db-server=mysql > > The libdbi drivers appear to be in the default location so the > --with-libdbi-lib option should not be required. I actually suspect > that this option screws up everything as the driver path is > /usr/local/lib/dbi, not just /usr/local/lib. Thanks for the tip, but it didn't work out :(. I tried both --with-libdbi-lib=/usr/local/lib/dbd and without it, but get the same message to the refdbd.log (creating database connection structure failed). -- Ant...@uk... | Department of Applied Physics tel. +358 17 162 279 | University of Kuopio |
From: Markus H. <mar...@mh...> - 2003-06-16 19:25:13
|
Antti Vanne writes: > Thanks for the tip, but it didn't work out :(. I tried both > --with-libdbi-lib=/usr/local/lib/dbd and without it, but get the same > message to the refdbd.log (creating database connection structure failed). > Oh dear, I should have thought a second or two more on that issue. --with-libdbi-lib helps the linker to find libdbi.so, not the drivers, so this is completely unrelated to your problem. Apologies for sending you down a dead end road. The error message indicates that libdbi cannot find or load the mysql driver. This should work though as long as make check in libdbi works. There was another report lately about exactly the same issue. What system are you working on (SuSE Linux, perchance?)? Can you start refdbd with a log level of 7 and see what happens when you try to connect? regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
From: Antti V. <Ant...@uk...> - 2003-06-17 07:31:30
|
Markus Hoenicka wrote: > The error message indicates that libdbi cannot find or load the mysql > driver. This should work though as long as make check in libdbi > works. There was another report lately about exactly the same > issue. What system are you working on (SuSE Linux, perchance?)? Here is an authentic "screenshot" from libdbi's "make check" ran as root. libdbi driver directory? [/usr/local/lib/dbd] Available drivers (1): mysql test which driver? mysql database hostname? [(blank for local socket if possible)] database username? [none] database password? [none] database name? [libdbitest] refdb1 Plugin information: ------------------- Name: mysql Filename: /usr/local/lib/dbd/libmysql.so Desc: MySQL database support (using libmysqlclient6) Maintainer: Mark M. Tobenkin <ma...@br...> URL: http://libdbi.sourceforge.net Version: dbd_mysql v0.6.7 Compiled: Jun 11 2003 Successfully connected! Available tables: CITSTYLE POSITIONS REFSTYLE SEPARATORS t_journal_words SUCCESS! All done, disconnecting and shutting down libdbi. Have a nice day. PASS: test_dbi ================== All 1 tests passed ================== I'm using refdb1 as test database, since I haven't created the default option libdbitest.. Or should the make check work with the defaults so that libdbi creates the named database? The linux distribution I'm using is Mandrake 9.0. > Can you start refdbd with a log level of 7 and see what happens when > you try to connect? I get the same "creating database connection structure failed". Here is a clip where refdbd is started and is connected to using refdba -u root and viewstat command: ---- [root@tappi115 libdbi-0.6.7]# refdbd -s -e0 -l7 application server started use /tmp/refdbd_fifo28926 as fifo server waiting n_max_fd=4 adding client on fd 5 server waiting n_max_fd=5 parent removing client on fd 5 server waiting n_max_fd=4 try to read from client serving client on fd 5 with protocol version 1 201-10-06-64 send pseudo-random string to client viewstat -u root dbi is up 193.167.235.115 root 3306 mysql /usr/local/share/refdb/db creating database connection structure failed command processing done, finish dialog now child finished client on fd 5 child exited with code 0 server waiting n_max_fd=4 server exited gracefully ---- -- Ant...@uk... | Department of Applied Physics tel. +358 17 162 279 | University of Kuopio |
From: Markus H. <mar...@mh...> - 2003-06-17 21:02:21
|
Hi Antti, Antti Vanne writes: > I'm using refdb1 as test database, since I haven't created the default > option libdbitest.. Or should the make check work with the defaults so > that libdbi creates the named database? > This looks all fine to me. The make check implementation of libdbi 0.6.7 is actually intended to be run on an existing database, so you've done the right thing. The upcoming versions of libdbi and libdbi-drivers will have an extended make check that creates it's own database. > [root@tappi115 libdbi-0.6.7]# refdbd -s -e0 -l7 > application server started > use /tmp/refdbd_fifo28926 as fifo > server waiting n_max_fd=4 > adding client on fd 5 > server waiting n_max_fd=5 > parent removing client on fd 5 > server waiting n_max_fd=4 > try to read from client > serving client on fd 5 with protocol version 1 > 201-10-06-64 > send pseudo-random string to client > viewstat -u root > dbi is up FYI: all that has happened until here is a call to dbi_initialize() which essentially allocates some memory for the infrastructure and creates a list of available drivers. All that can go wrong at this point is a wrong directory parameter. This should either be NULL (the default) or the directory that contains the libdbi drivers. Does it help to start refdbd with the "-Y /usr/local/lib/dbd" option? > 193.167.235.115 > root > > > 3306 > mysql > /usr/local/share/refdb/db > creating database connection structure failed All that happens here is a call to dbi_conn_new(), using "mysql" as the log shows. libdbi basically tries to find a driver with the internal name "mysql" in the list of the available drivers. If that's missing, you're screwed (but your other data clearly shows it's there). As you can see, there is no interaction with the database server yet. Except trying the -Y switch, I'm basically at a loss. I won't be able to figure this out without having access to a box where this error occurs. If the -Y switch doesn't help, is there any way to provide a ssh account to do some testing on the affected box? Or would you be willing to help out and run modified versions of libdbi and refdbd that provide additional debug output? regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
From: Markus H. <mar...@mh...> - 2003-06-18 19:04:32
|
Hi, Antti Vanne writes: > After starting the refdbd with options -s -e0 -l7 -Y /usr/local/lib/dbd/ > I get a different error: > > 3306 > mysql > /usr/local/share/refdb/db > failed to connect to database server > > but I don't get anything related to mysql to logfiles in /var/log or > /var/lib/mysql. I'm still running refdbd & refdba as root, and root is > able to use the refdb1 database using the mysql client. > This at least gives me a clue. Some sort of memory corruption apparently overwrites the dbi_driver_dir string (or is it never initialized to an empty string due to some weird compiler "optimization"?). I've fixed a couple of minor issues in refdbd.c and added some debug information to track this down. Could you please try the prerelease that I've just announced in a separate mail? As for the failed connection, the most likely reason is that you run your mysqld with the --skip-networking option (or the corresponding entry in my.cnf). refdbd always uses TCP/IP even when it talks to a database server on the local machine. > My box is behind a firewall, and I'd get cold feet giving access to > people outside my organization. But yes I could try out modified > versions, if this new info doesn't help any further. > That's fine with me. Having control over other people's machines makes me nervous anyway. If the prerelease doesn't fix the problem for you, I'll send you patches for testing. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
From: Bruce D'A. <bd...@fa...> - 2003-06-24 14:56:08
|
For anyone with access to a copy of Reference Manager, I've got two questions: 1) I've seen conflicting information on whether there is an RIS tag for "type." This is not reference type, but rather lower-level. Example: you might have an "email" type in a PCOMM record. So, does RefMan in fact have a field for this kind of thing, and what does it do with these data when exported? 2) How does RefMan actually format citations? In Endnote, for example, one inserts a temporary citation with syntax like: [see also \Jones, 1998 #52@23]. (Note: the default citation delimters are actually curly-brackets, but I don't know how to access them on this keyboard). In this example, the backslash delimits where the actual citation begins, the temporary citation itself is author, year, and record number, followed by the @ symbol which indicates the following is the page number(s) that ought to be added to the citation. There is then a formatting stage in which Endnote scans for these temporary citations, and replaces them with their formatted counterparts. This is thus analogous (sort of) to what refdb does. So, does RefMan have something equivalent, and if so, what is the temporary record syntax? Bruce -- http://www.fastmail.fm - Faster than the air-speed velocity of an unladen european swallow |
From: Bruce D'A. <bd...@fa...> - 2003-06-24 15:28:42
|
On Tue, 24 Jun 2003 06:56:04 -0800, "Bruce D'Arcus" <bd...@fa...> said: > So, does RefMan have something equivalent, and if so, what is the > temporary record syntax? Ah, I found an answer at (especially starting on p253): http://www.refman.com/support/docs/User%20Manual%20RM10.pdf RefMan does indeed have something analogous to Endnote's sytem, but it is also a little different. My reason for asking is some ideas I communicated to Markus previously that relate to the next release (0.9.4) and planned support for extended citations. What I am proposing for consideration is this: Allowing for a "citation-compatability mode" feature, in which RefDB could use the temporary citation forms of Endnote or RefMan as variant short citation styles. In Endnote, I can specify that the "label" field -- which is where I manually enter the citation key that gets exported to the RIS "ID" tag -- be used in place of the record ID. This means I have citations like {Jones, 1987, Jones1987a}, which would be the same as what I'd have in RefDB, plus the additional comma-delimited author and year info. If I want to omit the author from the formatted citation, then I'd have {, 1987, Jones1987a}. I'd like to be able to use this form if possible, so that I don't have to hassle with going through every single citation in my existing documents, and so that I can also allow for collaboration with non-refdb users in the future. I'm not sure if RefMan has something like Endnote's label field and the ability to use it in the temporary citation. From what I can tell, it does not, so maybe that complicates my suggestion. Still worth considering though... Note: this document is also VERY useful for the RIS information, and the field name mapping. Download it Markus; it'll be useful if you get around to your input DTD. I'll also take a look to make sure my Endnote export filter is right. To answer my question about type, though, it appears there is no such field, but RefMan uses the "misc 1" field to map that info for various reference types. Perhaps we ought to consider something like this for RefDB, at least as suggested practice? Bruce -- http://www.fastmail.fm - IMAP accessible web-mail |
From: Bruce D'A. <bd...@fa...> - 2003-06-24 16:56:51
|
On Tue, 24 Jun 2003 07:28:38 -0800, "Bruce D'Arcus" <bd...@fa...> said: > I'm not sure if RefMan has something like Endnote's label field and the > ability to use it in the temporary citation. From what I can tell, it > does not, so maybe that complicates my suggestion. Still worth > considering though... Followup number 2: I didn't realize RefMan allows you to specify a citation key in the ID field, but it does indeed. Good! Bruce -- http://www.fastmail.fm - Access all of your messages and folders wherever you are |
From: Antti V. <Ant...@uk...> - 2003-06-19 11:08:23
|
Markus Hoenicka wrote: > added some debug information to track this down. Could you please try > the prerelease that I've just announced in a separate mail? I tried the 0.9.3-pre5, and got a notch further: connected to database server using database: refdb1 SELECT VERSION() this is refdbd's output when viewstat is run and this is from the rfdba screen: refdba: viewstat Connected via mysql driver (dbd_mysql v0.6.7) to: ERROR serverip: localhost timeout: 60 dbs_port: 3306 logfile: /var/log/refdbd.log logdest: 0 loglevel: 7 remoteadmin: off pidfile: /var/run/refdbd.pid So I guess it almost works now :) However, trying for example "listword" gives me: connected to database server using database: refdb1 SELECT DISTINCT name FROM t_journal_words WHERE name RLIKE '.*' and refdba: listword ERROR aborting... could not read from refdbd. Stop This in the refdba prompt. > As for the failed connection, the most likely reason is that you run > your mysqld with the --skip-networking option (or the corresponding entry > in my.cnf). refdbd always uses TCP/IP even when it talks to a database > server on the local machine. I start the mysqld from the standard mdk /etc/init.d/mysql, and nmapping localhost shows that 3306 is open and I can also telnet localhost 3306 just fine. So this is like it should be right? Thanks a lot for you time, really appreciate it. -- Ant...@uk... | Department of Applied Physics tel. +358 17 162 279 | University of Kuopio |
From: Markus H. <mar...@mh...> - 2003-06-19 21:18:31
|
Hi, Antti Vanne writes: > I tried the 0.9.3-pre5, and got a notch further: > > connected to database server using database: > refdb1 > SELECT VERSION() > Is that really the end of refdbd's log output? This would mean it crashes right away. The whole log output of a viewstat command looks like this on my box: server waiting n_max_fd=4 try to read from client serving client on fd 5 with protocol version 1 102-86-47-14 send pseudo-random string to client viewstat -u root -w 102073083099101051051 dbi_driver_dir went to: dbi is up using default driver dir localhost root xxx 5432 mysql connected to database server using database: refdb1 SELECT VERSION() command processing done, finish dialog now child finished client on fd 5 child exited with code 0 server waiting n_max_fd=4 > this is refdbd's output when viewstat is run and this is from the rfdba > screen: > > refdba: viewstat > > Connected via mysql driver (dbd_mysql v0.6.7) > to: ERROR > serverip: localhost > timeout: 60 > dbs_port: 3306 > logfile: /var/log/refdbd.log > logdest: 0 > loglevel: 7 > remoteadmin: off > pidfile: /var/run/refdbd.pid > > So I guess it almost works now :) However, trying for example > "listword" gives me: > I beg to differ. The "ERROR" thing above means that libdbi cannot execute the simple query "SELECT VERSION()" properly. If your make check results in libdbi wouldn't tell me otherwise, I'd say libdbi is broke on your box. > connected to database server using database: > refdb1 > SELECT DISTINCT name FROM t_journal_words WHERE name RLIKE '.*' > > and > > refdba: listword > ERROR > > aborting... > could not read from refdbd. Stop > > This in the refdba prompt. > This again would point to a refdbd crash. I've never seen this on any of my platforms. > > As for the failed connection, the most likely reason is that you run > > your mysqld with the --skip-networking option (or the corresponding entry > > in my.cnf). refdbd always uses TCP/IP even when it talks to a database > > server on the local machine. > > I start the mysqld from the standard mdk /etc/init.d/mysql, and nmapping > localhost shows that 3306 is open and I can also telnet localhost 3306 > just fine. So this is like it should be right? > Yeah, this looks ok to me. I'm at a loss how to debug this problem. It just looks weird to me. Did you build your libdbi from the sources or did you use some RPM's? Did you try building and installing again from scratch? regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |