Discussion:
[Refdb-devel] [ refdb-Bugs-1603652 ] Not able to run refdb with one remote MySQL database ...
SourceForge.net
2006-11-27 11:00:25 UTC
Permalink
Bugs item #1603652, was opened at 2006-11-27 12:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=385991&aid=1603652&group_id=26091

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: steletch (steletch)
Assigned to: Nobody/Anonymous (nobody)
Summary: Not able to run refdb with one remote MySQL database ...

Initial Comment:
Here is my current setup:

Database cm127107 on remotehost, initiated with:
mysql -h remotehost -u cm127107 -p cm127107 < /usr/local/share/refdb/sql/refdb.2.dump.mysql41
mysql -h remotehost -u cm127107 -p cm127107 < /usr/local/share/refdb/sql/empty.2.dump.mysql41

(as stated on http://www.mhoenicka.de/system-cgi/blog/index.php?itemid=974)

Refdb from svn, rev238 on localhost, (compiled with:
configure --with-main-db=cm127107 --disable-docs)
refdba on localhost

I've started refdb like this:

refdbd -V -s -e 0 -l 7 -i remotehost

and refdba with:

refdba -d cm127107 -u cm127107

I've also set up (and verified) on the database side, the commands had been correctly set up (via phpmysql).

On the refdba side, i can see the setup is correct via 'set':

#####
set
serverip 127.0.0.1
port 9734
verbose f
pager stdout
username cm127107
timeout 180
logfile /var/log/refdba.log
logdest 2
loglevel 6
refdblib
#####

On the server side (refdbd):

#####
dbi_driver_dir went to:

dbi is up using default driver dir
Available libdbi database drivers:
mysql
Requested libdbi driver found
Database directory:
/usr/local/var/lib/refdb/db
application server started
share extended notes by default
use /tmp/refdbd_fifo16182 as fifo
server waiting n_max_fd=4
adding client 127.0.0.1 on fd 5
server waiting n_max_fd=5
try to read from client
serving client on fd 5 with protocol version 4
021-00-31-26
send pseudo-random string to client
parent removing client on fd 5
server waiting n_max_fd=4
#####


When i want to do a 'viewstat', i get:

refdba:
#####
viewstat
main database is too old or corrupt
#####

refdbd:
#####
viewstat -u cm127107 -w 111068122108064067116122
dbi is up
195.8.66.15
cm127107
<password>


3306
mysql
/usr/local/var/lib/refdb/db

cm127107
connected to database server using database:
cm127107
main database is too old or corrupt
child finished client on fd 5
child exited with code 1
server waiting n_max_fd=4
#####

Anything i've missed ?

I can provide access (privately) to the mysql database in order to do further checks if needed)

Aside of this, is it logical to see the password IN CLEAR into the refdbd log console ? (i've replaced it here for <password> but it was in lcear ...).

Cheers,


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=385991&aid=1603652&group_id=26091
SourceForge.net
2006-11-27 14:45:08 UTC
Permalink
Bugs item #1603652, was opened at 2006-11-27 12:00
Message generated for change (Comment added) made by mhoenicka
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=385991&aid=1603652&group_id=26091

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: steletch (steletch)
Assigned to: Nobody/Anonymous (nobody)
Summary: Not able to run refdb with one remote MySQL database ...

Initial Comment:
Here is my current setup:

Database cm127107 on remotehost, initiated with:
mysql -h remotehost -u cm127107 -p cm127107 < /usr/local/share/refdb/sql/refdb.2.dump.mysql41
mysql -h remotehost -u cm127107 -p cm127107 < /usr/local/share/refdb/sql/empty.2.dump.mysql41

(as stated on http://www.mhoenicka.de/system-cgi/blog/index.php?itemid=974)

Refdb from svn, rev238 on localhost, (compiled with:
configure --with-main-db=cm127107 --disable-docs)
refdba on localhost

I've started refdb like this:

refdbd -V -s -e 0 -l 7 -i remotehost

and refdba with:

refdba -d cm127107 -u cm127107

I've also set up (and verified) on the database side, the commands had been correctly set up (via phpmysql).

On the refdba side, i can see the setup is correct via 'set':

#####
set
serverip 127.0.0.1
port 9734
verbose f
pager stdout
username cm127107
timeout 180
logfile /var/log/refdba.log
logdest 2
loglevel 6
refdblib
#####

On the server side (refdbd):

#####
dbi_driver_dir went to:

dbi is up using default driver dir
Available libdbi database drivers:
mysql
Requested libdbi driver found
Database directory:
/usr/local/var/lib/refdb/db
application server started
share extended notes by default
use /tmp/refdbd_fifo16182 as fifo
server waiting n_max_fd=4
adding client 127.0.0.1 on fd 5
server waiting n_max_fd=5
try to read from client
serving client on fd 5 with protocol version 4
021-00-31-26
send pseudo-random string to client
parent removing client on fd 5
server waiting n_max_fd=4
#####


When i want to do a 'viewstat', i get:

refdba:
#####
viewstat
main database is too old or corrupt
#####

refdbd:
#####
viewstat -u cm127107 -w 111068122108064067116122
dbi is up
195.8.66.15
cm127107
<password>


3306
mysql
/usr/local/var/lib/refdb/db

cm127107
connected to database server using database:
cm127107
main database is too old or corrupt
child finished client on fd 5
child exited with code 1
server waiting n_max_fd=4
#####

Anything i've missed ?

I can provide access (privately) to the mysql database in order to do further checks if needed)

Aside of this, is it logical to see the password IN CLEAR into the refdbd log console ? (i've replaced it here for <password> but it was in lcear ...).

Cheers,


----------------------------------------------------------------------
Comment By: Markus Hoenicka (mhoenicka)
Date: 2006-11-27 15:45

Message:
Logged In: YES
user_id=85809
Originator: NO

A quick glance at the MySQL tables revealed the following problem:
database dumps created with current versions of MySQL contain a "DROP
TABLE IF EXISTS" clause in front of each "CREATE TABLE" statement.
Therefore PostgreSQL and SQLite add another row to the existing t_meta
table when creating the reference database tables, whereas MySQL first
drops the existing table and then fills in the row. As a result, the MySQL
database lacks a row in t_meta. The fix is to run the following command in
mysql after using the two dump files refdb.2.dump.mysql41 and
empty.2.dump.mysql41 (in this particular order!):

mysql> INSERT INTO t_meta VALUES ('refdb', 'refdb',
'0.9.8-pre8',2,UTC_TIMESTAMP, UTC_TIMESTAMP);

I've updated the instructions at:

http://mhoenicka.de/system-cgi/blog/index.php?itemid=974

Let me know if your setup works now.

BTW it is indeed intentional that the passwords appear in plain text in
the logs. They appear only when you use log level 7, and I assume you know
what you do if you switch to that log level. A common connection problem is
a mistyped password, after all.


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=385991&aid=1603652&group_id=26091
Loading...