Bug #14690 Can't connect to server when built with ndbcluster support
Submitted: 7 Nov 2005 6:48 Modified: 22 Nov 2005 22:44
Reporter: Robert Uzzi Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:mysql-5.0.15 OS:Solaris (Solaris 9 sparc)
Assigned to: CPU Architecture:Any

[7 Nov 2005 6:48] Robert Uzzi
Description:
When built with the following combination of switches the server errors while connecting to a database.

./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-curses-libs=-lcurses --disable-shared --with-ndbcluster --with-archive-storage-engine --with-csv-storage-engine

using the mysql client to connect and issue the "use database" command results in the following error.

mysql> use test;
No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (146)
ERROR:
Can't connect to the server

Building without the ndbcluster support results in a working condition.

How to repeat:
On Solaris 9 sparc, build with the listed switches. 
 
Connect with the mysql client and issue a "use database" command.
[7 Nov 2005 15:37] Valeriy Kravchuk
Thank you for a problem report. 

Please, describe your hardware, send uname -a results. What compiler (version) do you use?
[7 Nov 2005 16:06] Robert Uzzi
This is fairly straight out of the box Solaris 9 on a Sparcstation 20 with dual Ross procs. Uname results are "SunOS LabRat 5.9 Generic_118558-09 sun4m sparc SUNW,SPARCstation-20" with gcc 3.4.4 present.
[10 Nov 2005 17:00] Valeriy Kravchuk
I was not able to find sun4m with gcc 3.x.x for experiments. Have to guess now...

What is the content of your my.cnf file, if any. Have you tried to connect to port and not to the socket? And, finaly, what is in you error log after that failed attempt?
[14 Nov 2005 0:41] Robert Uzzi
I took a look and the gcc is installed from the BOLT pkg-get package available from http://www.blastwave.org/pkg-get.php . Connecting through tcp/ip has the same results as  the socket.

my.cnf

# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /usr/local/mysql/var) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password       = your_password
port            = 3306
socket          = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
server-id       = 100

# Uncomment the following if you want to log updates
log-bin=mysql-bin

# Uncomment the following if you are NOT using BDB tables
#skip-bdb

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/mysql/var/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /usr/local/mysql/var/
#innodb_log_arch_dir = /usr/local/mysql/var/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

# Added for slave replication
log-slave-updates
log-warnings
replicate-ignore-db=mysql
replicate-ignore-db=information_schema
master-host=172.25.242.11
master-user=slave
master-password=XXXXXXXX

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 8M
sort_buffer_size = 8M

[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout
[14 Nov 2005 0:44] Robert Uzzi
Almost forgot, error log shows no entries other than the prior normal entries..
[15 Nov 2005 18:16] Valeriy Kravchuk
I was not able to repeat the problem you described when started server without any my.cnf (with default server variables values) and tried to connect to it using socket:

bash-2.05$ bin/mysqld_safe --socket=/users/vkravchuk/mysql5.sock --skip-networking
[1] 18913
bash-2.05$ Starting mysqld daemon with databases from /users/vkravchuk/dbs/5.0-butch/var

bash-2.05$ bin/mysql --socket=/users/vkravchuk/mysql5.sock -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.15

No entry for terminal type "cygwin";
using dumb terminal settings.
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.0.15    |
+-----------+
1 row in set (0.00 sec)

mysql> show variables like 'hav%';
+-----------------------+----------+
| Variable_name         | Value    |
+-----------------------+----------+
| have_archive          | YES      |
| have_bdb              | NO       |
| have_blackhole_engine | NO       |
| have_compress         | YES      |
| have_crypt            | YES      |
| have_csv              | YES      |
| have_example_engine   | NO       |
| have_federated_engine | NO       |
| have_geometry         | YES      |
| have_innodb           | YES      |
| have_isam             | NO       |
| have_ndbcluster       | DISABLED |
| have_openssl          | NO       |
| have_query_cache      | YES      |
| have_raid             | NO       |
| have_rtree_keys       | YES      |
| have_symlink          | YES      |
+-----------------------+----------+
17 rows in set (0.03 sec)

mysql> exit
Bye
bash-2.05$ uname -a
SunOS butch 5.9 Generic_118558-09 sun4u sparc SUNW,UltraAX-i2

I had performed the following commands before that:

cd mysql-5.0.15

make clean

./configure --prefix=/users/vkravchuk/dbs/5.0-butch --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler
--with-named-curses-libs=-lcurses --disable-shared --with-ndbcluster --with-archive-storage-engine --with-csv-storage-engine

make
make install
cd ~/dbs/5.0-butch/

So, please, rename your my.cnf and try to connect to your server just as I did. Inform about the results.
[22 Nov 2005 22:44] Robert Uzzi
Some packages, libs and other various pkg's, outside of MySQL were updated and I can no longer reproduce this behavior. The server behaves as it should.