[Monetdb-developers] database 'mydbname' does not allow connections error
Hello, I have a start up script as part of a server image that runs the first time a new instance of the server is started. It performs the following: # start the monetdb server /usr/bin/merovingian # create and start the db monetdb create mydb monetdb start mydb # create tables mclient -lsql --time --database=mydb < /db/schemas.sql However the mclient fails to execute the schemas. The consoles shows the following: successfully created database 'mydb' database 'bhtg' does not allow connections However, if I execute the same exact commands from a bash shell once the system is booted, then it works fine and the mclient executes the .sql script and creates the tables as expected. What could then be causing the error about not allowing connections? The startup script is running with this: # chkconfig: 345 15 95 So I think the network is fully initialized and operational by the time this runs. Any advice please? Thank you.
On 17-06-2008 12:52:40 -0700, Rt Ibmer wrote:
successfully created database 'mydb' database 'bhtg' does not allow connections
Any advice please? Thank you.
Please look into your merovingian.log file, it will contain more information why the database "does not allow connections". Also, check with `monetdb status` if the database is online, and not under maintenance.
Please look into your merovingian.log file, it will contain more information why the database "does not allow connections".
The logs simply have this: error.log: TME 2008-06-17 16:06:43 ERR merovingian[941]: client error: database 'mydb' does not allow connections msg.log: TME 2008-06-17 16:06:43 MSG merovingian[941]: Merovingian 0.7 starting ... MSG merovingian[941]: monitoring dbfarm /mnt/MonetDB5/dbfarm MSG merovingian[941]: listening for TCP connections on xyz:50000 MSG bhtg[948]: executing '/usr/bin/mserver5' for database 'mydb' MSG merovingian[941]: listening for UDP messages on xyz:50000 MSG merovingian[941]: starting database mydb due to control signal MSG merovingian[941]: starting database 'mydb', up min/avg/max: 0/0/0, crash average: 0.00 0.00 0.00 (0-0=0) MSG merovingian[941]: database 'mydb' already running since 2008-06-17 16:06:43, up min/avg/max: 0/0/0, crash average: 0.00 0.00 0.00 (1-0=0) MSG bhtg[948]: !WARNING: BBPdir: initializing BBP. MSG bhtg[948]: # MonetDB server v5.6.0, based on kernel v1.24.0 MSG bhtg[948]: # Serving database 'mydb' MSG bhtg[948]: # Compiled for i686-pc-linux-gnu/32bit with 32bit OIDs dynamically linked MSG bhtg[948]: # Copyright (c) 1993-2008 CWI, all rights reserved MSG bhtg[948]: # Visit http://monetdb.cwi.nl/ for further information MSG bhtg[948]: # Listening for connection requests on mapi:monetdb://xyz:50001/
Also, check with `monetdb status` if the database is online, and not under maintenance.
Yes the status if fine. The output just before the failure even says it was started successfully. And this is happening during boot up so there is no way for the db to be in maintenance mode. Any tips on where to go from here? Thanks.
On 17-06-2008 13:14:19 -0700, Rt Ibmer wrote:
Please look into your merovingian.log file, it will contain more information why the database "does not allow connections".
The logs simply have this:
error.log:
TME 2008-06-17 16:06:43 ERR merovingian[941]: client error: database 'mydb' does not allow connections
Ok, this error indicates that the server is running, but the sql module has not been properly loaded (it may not have finished loading).
msg.log:
TME 2008-06-17 16:06:43 MSG merovingian[941]: Merovingian 0.7 starting ... MSG merovingian[941]: monitoring dbfarm /mnt/MonetDB5/dbfarm MSG merovingian[941]: listening for TCP connections on xyz:50000 MSG bhtg[948]: executing '/usr/bin/mserver5' for database 'mydb'
This seems to be a very early start, do you use pre-starting of database mydb?
MSG merovingian[941]: listening for UDP messages on xyz:50000 MSG merovingian[941]: starting database mydb due to control signal
here the database is started again
MSG merovingian[941]: starting database 'mydb', up min/avg/max: 0/0/0, crash average: 0.00 0.00 0.00 (0-0=0) MSG merovingian[941]: database 'mydb' already running since 2008-06-17 16:06:43, up min/avg/max: 0/0/0, crash average: 0.00 0.00 0.00 (1-0=0)
however it was already started, log might look confusing here, but this is due to different processes
MSG bhtg[948]: !WARNING: BBPdir: initializing BBP. MSG bhtg[948]: # MonetDB server v5.6.0, based on kernel v1.24.0 MSG bhtg[948]: # Serving database 'mydb' MSG bhtg[948]: # Compiled for i686-pc-linux-gnu/32bit with 32bit OIDs dynamically linked MSG bhtg[948]: # Copyright (c) 1993-2008 CWI, all rights reserved MSG bhtg[948]: # Visit http://monetdb.cwi.nl/ for further information MSG bhtg[948]: # Listening for connection requests on mapi:monetdb://xyz:50001/
the database reports here that it's ready and waiting, having a "connection" available.
Also, check with `monetdb status` if the database is online, and not under maintenance.
Yes the status if fine. The output just before the failure even says it was started successfully. And this is happening during boot up so there is no way for the db to be in maintenance mode.
Maintenance mode is persistent. However, if you start the database, do you use `monetdb start -w mydb` or without "-w"?
Ok, this error indicates that the server is running, but the sql module has not been properly loaded (it may not have finished loading).
Interesting. Is there a way I can make merovingian not return until modules are loaded? This way I can put the commands in succession like I have them and be sure then when the next line runs that everything is loaded and ready.
This seems to be a very early start, do you use pre-starting of database mydb?
I'm not sure what you mean by that. This is what I do (and this is the first monetdb related code/processes that are kicked off at the time the server boots): merovingian monetdb create mydb monetdb start mydb mclient -lsql --time --database=mydb < /sql/schemas.sql
Maintenance mode is persistent. However, if you start the
I've never used maintenance mode or put the db into that mode so it sounds impossible then that it could be in maintenance mode.
database, do you use `monetdb start -w mydb` or without "-w"?
Without. I just use this: monetdb start mydb Thank you!
On 17-06-2008 14:38:31 -0700, Rt Ibmer wrote:
Ok, this error indicates that the server is running, but the sql module has not been properly loaded (it may not have finished loading).
Interesting. Is there a way I can make merovingian not return until modules are loaded? This way I can put the commands in succession like I have them and be sure then when the next line runs that everything is loaded and ready.
merovingian not, but the monetdb tool can.
I'm not sure what you mean by that. This is what I do (and this is the first monetdb related code/processes that are kicked off at the time the server boots):
merovingian monetdb create mydb monetdb start mydb mclient -lsql --time --database=mydb < /sql/schemas.sql
Ok, you might get into a time shortage problem here.
database, do you use `monetdb start -w mydb` or without "-w"?
Without. I just use this: monetdb start mydb
In your case, `monetdb start -w mydb` will make an good difference. The "-w" stands for "wait", which means it will block until the database has a connection available. The mclient in your example above should always succeed to at least connect to the database if you use the "-w" flag to `monetdb`. See also the monetdb(1) man-page.
participants (2)
-
Fabian Groffen
-
Rt Ibmer