0

Me & my computer (mac) are trying to follow with the monetdb tutorial (https://www.monetdb.org/Documentation/UserGuide/Tutorial)

We went up until running this mclient -u monetdb -d voc, entered "monetdb" as a password and the following message was returned :

there are no available connections for 'voc'

Do anyone knows what is happening ? I mean after all we just followed the tutorial.

Furthermore, do you know if there is a db with all the monetdb error codes and their meanings + a proposition to solve the error ?


edit0 --adding the log file--

2017-03-22 16:17:53 MSG merovingian[29679]: Merovingian 1.7 (Dec2016-SP2) starting
2017-03-22 16:17:53 MSG merovingian[29679]: monitoring dbfarm /Volumes/Transcend/monetdb/
2017-03-22 16:17:53 MSG merovingian[29679]: accepting connections on TCP socket localhost:50000
2017-03-22 16:17:53 MSG merovingian[29679]: accepting connections on UNIX domain socket /tmp/.s.monetdb.50000
2017-03-22 16:17:53 MSG discovery[29679]: listening for UDP messages on localhost:50000
2017-03-22 16:17:53 MSG control[29679]: accepting connections on UNIX domain socket /tmp/.s.merovingian.50000
2017-03-22 16:20:50 MSG control[29679]: (local): created database 'voc'
2017-03-22 16:21:22 MSG control[29679]: (local): served status list
2017-03-22 16:21:22 MSG control[29679]: (local): released database 'voc'
2017-03-22 16:23:19 MSG merovingian[29679]: starting database 'voc', up min/avg/max: 0s/0s/0s, crash average: 0.00 0.00 0.00 (0-0=0)
2017-03-22 16:23:20 MSG voc[29783]: arguments: /usr/local/monetdb/bin/mserver5 --dbpath=/Volumes/Transcend/monetdb/voc --set merovingian_uri=mapi:monetdb://macbook-pro-de-teva-1.home:50000/voc --set mapi_open=false --set mapi_port=0 --set mapi_usock=/Volumes/Transcend/monetdb/voc/.mapi.sock --set monet_vault_key=/Volumes/Transcend/monetdb/voc/.vaultkey --set gdk_nr_threads=8 --set max_clients=64 --set sql_optimizer=default_pipe --set monet_daemon=yes
2017-03-22 16:23:20 MSG merovingian[29679]: sending process 29783 (database 'voc') the TERM signal
2017-03-22 16:23:21 MSG merovingian[29679]: database 'voc' has shut down
2017-03-22 16:23:21 ERR control[29679]: !monetdbd: an internal error has occurred 'database 'voc' started up, but failed to open up a communication channel'
2017-03-22 16:23:21 ERR merovingian[29679]: client error: database 'voc' started up, but failed to open up a communication channel
2017-03-22 21:43:40 MSG merovingian[37128]: Merovingian 1.7 (Dec2016-SP2) starting
2017-03-22 21:43:40 MSG merovingian[37128]: monitoring dbfarm /Volumes/Transcend/monetdb/
2017-03-22 21:51:06 MSG merovingian[37290]: Merovingian 1.7 (Dec2016-SP2) starting
2017-03-22 21:51:06 MSG merovingian[37290]: monitoring dbfarm /Volumes/Transcend//monetdb/
2017-03-22 21:51:06 ERR merovingian[37290]: binding to stream socket port 50000 failed: Address already in use
2017-03-22 21:51:06 ERR merovingian[37290]: fatal startup condition encountered, aborting startup
2017-03-23 10:52:34 MSG merovingian[1950]: Merovingian 1.7 (Dec2016-SP2) starting
2017-03-23 10:52:34 MSG merovingian[1950]: monitoring dbfarm /Volumes/Transcend/monetdb/
2017-03-23 10:52:34 MSG merovingian[1950]: accepting connections on TCP socket localhost:50000
2017-03-23 10:52:34 MSG merovingian[1950]: accepting connections on UNIX domain socket /tmp/.s.monetdb.50000
2017-03-23 10:52:34 MSG discovery[1950]: listening for UDP messages on localhost:50000
2017-03-23 10:52:34 MSG control[1950]: accepting connections on UNIX domain socket /tmp/.s.merovingian.50000
2017-03-23 10:53:17 MSG control[1950]: (local): served status list
2017-03-23 10:53:37 MSG merovingian[1950]: starting database 'voc', up min/avg/max: 2s/8h/17h, crash average: 0.00 0.00 0.00 (2-2=0)
2017-03-23 10:53:37 MSG merovingian[1950]: sending process 1975 (database 'voc') the TERM signal
2017-03-23 10:53:37 MSG voc[1975]: arguments: /usr/local/monetdb/bin/mserver5 --dbpath=/Volumes/Transcend/monetdb/voc --set merovingian_uri=mapi:monetdb://MacBook-Pro-de-teva.local:50000/voc --set mapi_open=false --set mapi_port=0 --set mapi_usock=/Volumes/Transcend/monetdb/voc/.mapi.sock --set monet_vault_key=/Volumes/Transcend/monetdb/voc/.vaultkey --set gdk_nr_threads=8 --set max_clients=64 --set sql_optimizer=default_pipe --set monet_daemon=yes
2017-03-23 10:53:38 MSG merovingian[1950]: database 'voc' has shut down
2017-03-23 10:53:38 ERR control[1950]: !monetdbd: an internal error has occurred 'database 'voc' started up, but failed to open up a communication channel'

2017-03-23 10:53:38 ERR merovingian[1950]: client error: database 'voc' started up, but failed to open up a communication channel

edit1 --- adding the mserver5 response---

From the terminal pointing to the farm on the sd card :

MacBook-Pro****:monetdb Teva$ mserver5
# MonetDB 5 server v11.25.9 "Dec2016-SP2"
# Serving database 'demo', using 8 threads
# Compiled for x86_64-apple-darwin16/64bit with 128bit integers
# Found 16.000 GiB available main-memory.
# Copyright (c) 1993-July 2008 CWI.
# Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
# Visit http://www.monetdb.org/ for further information
!IOException:mal_mapi.listen:operation failed: bind to stream socket port 50000 failed: Address already in use

From the terminal pointing to the farm sitting on /mydocuments

MacBook-Pro-***:Documents Teva$ sudo mserver5
!FATAL: GDKlockHome: Database lock '.gdk_lock' denied
Pelican
  • 193
  • 2
  • 17
  • @kutsurak any idea? – Hannes Mühleisen Mar 23 '17 at 09:43
  • please provide more context, which OS, which MonetDB version etc. – Hannes Mühleisen Mar 23 '17 at 09:45
  • On MacOs (10.12.4), monetdb database server toolkit v1.1 (Dec2016-SP2). This morning when running the same command mclient is prompting me with the password, I fill it and press enter and it get stuck there, in order to get my terminal back I am sending "Ctrl + C". – Pelican Mar 23 '17 at 10:00
  • Mserver5 is running fine, monetdb daemon also, However i can't get mclient to communicate with the db. – Pelican Mar 23 '17 at 10:02
  • Can you share the contents of the file `merovingian.log` from the dbfarm directory please? – Hannes Mühleisen Mar 23 '17 at 10:22
  • the first error was the following : "ERR control[29679]: !monetdbd: an internal error has occurred 'database 'voc' started up, but failed to open up a communication channel'" – Pelican Mar 23 '17 at 11:58
  • whats the output of `echo $LC_CTYPE` ? – Hannes Mühleisen Mar 23 '17 at 12:23
  • I have just tried to create a new farm and redo the tutorial. The first encountered error is when I try to start the start the newly created db. Terminal msg is : "testdb" failed: "testdb started up, but failed to open up a communication channel. Then the last line of the log file reads : "ERR control [4710]: (local): failed to fork mserver: database "testdb" started up, but failed to open up a communication channel." – Pelican Mar 23 '17 at 12:26
  • Currently the farm is sitting on my sd drive, i will try on the computer's drive and be back asap. – Pelican Mar 23 '17 at 12:29
  • @HannesMühleisen running "echo $LC_CTYPE" return nothing, it returned an empty row – Pelican Mar 23 '17 at 12:34
  • and `echo $LANG` ? – Hannes Mühleisen Mar 23 '17 at 12:36
  • @HannesMühleisen "fr_FR.UTF8" – Pelican Mar 23 '17 at 12:41
  • Ok, and what is the output if you just write `mserver5`? – Hannes Mühleisen Mar 23 '17 at 12:44
  • @HannesMühleisen I have updated the post with the mserver5 outpout. What is odd is when I run monetdbd get port on each and every farm none of them is using the port 50000 – Pelican Mar 23 '17 at 12:59
  • looks ok to me so far. Very strange it does not work. – Hannes Mühleisen Mar 23 '17 at 13:04
  • what is funny is that event though I tell monetdb daemon to set the port to 53523, mclient will still try to connect to localhost:5000 when asking to connect to the db. then when I specify the port {mclient -p54323 -db1} the output is {"monetdbd: there are no available connections for 'db1'"}, with the same log {"but failed to open up a communication channel"}. in order to have the list process listening ports i used : {lsof -i | grep LISTEN} – Pelican Mar 23 '17 at 13:24
  • Can you please try the command `netstat -ltap` (or the equivalent for MacOS) and see if any process is using the port 50000. I have encountered the same errors in the past with servers that had not been shut down correctly. – Panagiotis Koutsourakis Mar 23 '17 at 14:10
  • You are right, even thought the terminal is closed, the process are still up (and that's the normal expected behavior for a db). One hour ago I did have one monedb process and one mserver5 that were listening to the port 50000. I then killed the 2 pid and retried connecting mclient to the db on the right port, the error msg was "there are no available connection for "db1". I don't know why but it seems I can't connect mclient and my monetdb database on my machine. I'll try on Debian server later this evening. – Pelican Mar 23 '17 at 14:23

1 Answers1

0

!IOException:mal_mapi.listen:operation failed: bind to stream socket port 50000 failed: Address already in use

Seem like something is blocking the port needed for monetdb

kill the process and try again

user3137112
  • 316
  • 1
  • 12