nohup: redirecting stderr to stdout

pppplus

Verified User
Joined
Dec 19, 2008
Messages
524
What does it mean ?

How to solve this alert ?

I have this message when I restart mysqld

Thanks for your help

Debian 5
Currently running supported MySQL version 5.0.90
Switch to 64-bit OS - MySQL cannot currently use all of your RAM

I do not understand why I am not in 64bits
 
Regarding the first question, nohup must be used by your mysqld init script and do not worry about it, it's uncommon but accepted. It's not an error or a warning, it's just an informational message.

About the 64bit message, where did you read that? Please explain the context.
Also, you probably had the choice of what kind of system to install, and 32bit is enough if you don't need over 4GB of RAM for the same process (the PAE feature of modern debian *-bigmem kernels already allows to use more than that to different processes, if they are compatible).
I guess (hope) your MySQL setup doesn't have this need, otherwise you should already know about that.
 
Thanks for your reply.

About nohup message, if I can remove it (because I suppose there is something not perfect in installation...) I think it's better.

For 64bits system : I read it using mysqltuner.pl
This server has been installed by a company. I don't know it they do something wrong or not. Maybe it's my fault.

I have to reinstall mysql after an error.

I have 8Go of RAM, and only 4 are used.

Mem: 8276228k total, 4563160k used, 3713068k free, 253540k buffers
Swap: 4200988k total, 0k used, 4200988k free, 2843292k cached


Some big sites are on the server and the previous server, with 4Go used all memory. Traffic comes back now (after 15 days with sites offline), and I have to optimize mysql settings.

I have another problem using tuning-primer.sh
Code:
MEMORY USAGE
./tuning-primer.sh: line 1321: bc: command not found
./tuning-primer.sh: line 1322: bc: command not found
./tuning-primer.sh: line 1346: bc: command not found
./tuning-primer.sh: line 1349: bc: command not found
./tuning-primer.sh: line 1350: bc: command not found
./tuning-primer.sh: line 1352: bc: command not found
./tuning-primer.sh: line 1354: [: -gt: unary operator expected
./tuning-primer.sh: line 459: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 465: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 471: [: max_memoryHR: integer expression expected
./tuning-primer.sh: line 478: export: `=max_memoryHR': not a valid identifier
Max Memory Ever Allocated :  bytes
./tuning-primer.sh: line 459: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 465: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 471: [: per_thread_buffersHR: integer expression expected
./tuning-primer.sh: line 478: export: `=per_thread_buffersHR': not a valid identifier
Configured Max Per-thread Buffers :  bytes
./tuning-primer.sh: line 459: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 465: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 471: [: global_buffersHR: integer expression expected
./tuning-primer.sh: line 478: export: `=global_buffersHR': not a valid identifier
Configured Max Global Buffers :  bytes
./tuning-primer.sh: line 459: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 465: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 471: [: total_memoryHR: integer expression expected
./tuning-primer.sh: line 478: export: `=total_memoryHR': not a valid identifier
Configured Max Memory Limit :  bytes
./tuning-primer.sh: line 440: bc: command not found
Physical Memory :  G
Max memory limit seem to be within acceptable norms

KEY BUFFER
./tuning-primer.sh: line 754: bc: command not found
./tuning-primer.sh: line 755: bc: command not found
./tuning-primer.sh: line 440: bc: command not found
Current MyISAM index space =  M
./tuning-primer.sh: line 440: bc: command not found
Current key_buffer_size =  M
Key cache miss rate is 1 : 1928
Key buffer free ratio =  %
./tuning-primer.sh: line 792: [: -le: unary operator expected
./tuning-primer.sh: line 796: [: -le: unary operator expected
Your key_buffer_size seems to be fine

QUERY CACHE
./tuning-primer.sh: line 827: bc: command not found
./tuning-primer.sh: line 828: bc: command not found
Query cache is enabled
./tuning-primer.sh: line 440: bc: command not found
Current query_cache_size =  M
./tuning-primer.sh: line 440: bc: command not found
Current query_cache_used =  M
./tuning-primer.sh: line 440: bc: command not found
Current query_cache_limit =  M
Current Query cache Memory fill ratio =  %
./tuning-primer.sh: line 440: bc: command not found
Current query_cache_min_res_unit =  K
./tuning-primer.sh: line 845: bc: command not found
./tuning-primer.sh: line 846: bc: command not found
./tuning-primer.sh: line 847: [: -gt: unary operator expected
./tuning-primer.sh: line 854: [: -le: unary operator expected
./tuning-primer.sh: line 858: [: -ge: unary operator expected
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
./tuning-primer.sh: line 440: bc: command not found
Current sort_buffer_size =  M
./tuning-primer.sh: line 440: bc: command not found
Current read_rnd_buffer_size =  K
Sort buffer seems to be fine

JOINS
./tuning-primer.sh: line 440: bc: command not found
Current join_buffer_size =  K
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly

For example : lines 1321 and 1322 are
Code:
	per_thread_buffers=$(echo "($read_buffer_size+$read_rnd_buffer_size+$sort_buffer_size+$thread_stack+$join_buffer_size+$binlog_cache_size)*$max_connections" | bc -l)
	per_thread_max_buffers=$(echo "($read_buffer_size+$read_rnd_buffer_size+$sort_buffer_size+$thread_stack+$join_buffer_size+$binlog_cache_size)*$max_used_connections" | bc -l)

So probably some "big" details to solve
 
The nohup message is perfectly legit and correct, you don't need to fix what's not broken. That is (at least for me) the first rule of a sysadmin.

Since you already kept your customers offline for two weeks, I won't suggest you to reinstall your system with a debian 64bit. Using more than 4GB on MySQL only won't help so much unless you have a larger table index. This value is printed by mysqltuner.pl.

The shell errors are there because you miss "bc", a very powerful calculator that mysqltuner.pl uses for some reason beyond my understanding (the same calclulations can be done by bash itself). Just install it with "aptitude install bc".

When you run mysqltuner.pl after that it will work and it will tell you what do you need to do in order to make your MySQL distribution be more responsive. Now, it's very very important that you follow this instruction: run MySQL without interruptions, and run mysqltuner.pl the second time it passes its peak hour.
If, for example, 17h00 is the busiest time for your server and you restarted MySQL this evening at 18h00, let it run without interruption for at least 47h and run mysqltuner.pl at 17h00 in two days exactly.

If you don't follow this, it won't do any good. It will give you completely wrong suggestions and you'll be having problems with those suggestions values every time.

Now, when you have done all of that at least two times (wait two peak cycles, set accordingly to suggestions, wait two peak cycles, recheck suggestions) and MySQL still needs to go over 4GBs... then it's time to switch to 64bit (do a whole backup then contact the company that installed the system and ask to reinstall).
 
Thanks ! You help me so fast :)

1/ I am stupid, I don't imagine bc can be something to install... So easy to find... :mad:

So now, no more error.

Ok for message nohup

To optimize, I know how to do, I have already some servers, but I am a little surprised with this one.

About 64bits : I do not understand what you write (maybe my english, maybe a little stupid). I come back in a few days after some optimizations.

Best regards, and many thanks for your help ! :D
 
I come back with my MYSQL problems...

The server crashes, and after reboot, impossible to have mysql.

I try to update or to reinstall, always the same problem.

Trying to install
Code:
Stopping mysqld ...
Stopping mysqld:                [ FAILED ]
Starting mysqld:                [ OK ]
Giving mysqld a few seconds to start up...
Looking for 'mysql' as: /usr/local/mysql/bin/mysql
Looking for 'mysqlcheck' as: /usr/local/mysql/bin/mysqlcheck
Running 'mysqlcheck' with connection arguments: '--socket=/tmp/mysql.sock'
/usr/local/mysql/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
/usr/local/mysql/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) when trying to connect
Restarting MySQL.
Stopping mysqld:                [ FAILED ]
Starting mysqld:                [ OK ]

Trying to connect
Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

How to begin to reinstall, without problem ?
Always the same server with debian 5
 
Sorry I do not understand what you mean by : <location of the data>/<server name>.err
 
The MySQL error log is within the data directory. To know its path run "mysqladmin variables |grep datadir".
The logfile is named against the server name, the same as "uname -n", with a ".err" suffix.
 
Ok, I understand, its the same file as /var/log/message

Code:
100305 23:39:11  InnoDB: Starting shutdown...
100305 23:39:12  InnoDB: Shutdown completed; log sequence number 0 75736
100305 23:39:12 [Warning] Forcing shutdown of 1 plugins
100305 23:39:12 [Note] 
100305 23:39:12 mysqld_safe mysqld from pid file /usr/local/mysql/data/web.pid ended
100305 23:40:01 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
100305 23:40:01 [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 475 error messages,
but it should contain at least 630 error messages.
Check that the above file is the right version for this program!
100305 23:40:01  InnoDB: Started; log sequence number 0 75736
100305 23:40:01 [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--skip-bdb'
100305 23:40:01 [ERROR] Aborting

100305 23:40:01  InnoDB: Starting shutdown...
100305 23:40:02  InnoDB: Shutdown completed; log sequence number 0 75736
100305 23:40:02 [Warning] Forcing shutdown of 1 plugins
100305 23:40:02 [Note] 
100305 23:40:02 mysqld_safe mysqld from pid file /usr/local/mysql/data/web.pid ended
100305 23:40:11 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
100305 23:40:11 [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 475 error messages,
but it should contain at least 630 error messages.
Check that the above file is the right version for this program!
100305 23:40:11  InnoDB: Started; log sequence number 0 75736
100305 23:40:11 [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--skip-bdb'
100305 23:40:11 [ERROR] Aborting

100305 23:40:11  InnoDB: Starting shutdown...
100305 23:40:12  InnoDB: Shutdown completed; log sequence number 0 75736
100305 23:40:12 [Warning] Forcing shutdown of 1 plugins
100305 23:40:12 [Note] 
100305 23:40:12 mysqld_safe mysqld from pid file /usr/local/mysql/data/web.pid ended
 
It seems like you are missing the Berkeley DB headers needed during compile time.
This is not a problem, because you can instead remove the "skip-bdb" line from your config file (one of "/usr/local/mysql/bin/mysqld --verbose --help |grep /my.cnf") and restart MySQL.
 
You are an expert, it seems I am a newbie :rolleyes:

I have this :
Code:
(root@web)-(~) $ /usr/local/mysql/bin/mysqld --verbose --help |grep /my.cnf
100315 11:44:41 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
100315 11:44:41 [ERROR] Aborting
 
That's correct. Now check all of /etc/my.cnf, /etc/mysql/my.cnf and /usr/local/mysql/etc/my.cnf". If they exist, and there is a line "skip-dbd", remove the line.
I'm an expert in my field, and I know some about almost everything in IT, but I'm far from an everything expert :)
 
/etc/my.cnf is empty
/etc/mysql/my.cnf => I remove skip-bdb
/usr/local/mysql/etc/my.cnf no such file
~/.my.cnf no skip-bdb

And I've just seen, log I give you was from 5 of march...
There is nothing new from today

The file do not change actually.

Have you another idea ? Another test ?
 
MySQL should log something if it exits, for whatever reason. Check the .err logfile instead of the messages log.
You may also run "ps auxww |grep mysql" and see if at least mysqld_safe is running.
 
I have this :

Code:
root     29920  0.2  0.0   4132  1292 ?        S    13:25   0:00 /bin/sh /usr/lo                                                                                                 cal/mysql/bin/mysqld_safe --log-error=/var/log/messages --user=mysql --datadir=/                                                                                                 usr/local/mysql/data --pid-file=/usr/local/mysql/data/web.pid
mysql    30051  0.2  0.1 117980 15324 ?        Sl   13:25   0:00 /usr/local/mysq                                                                                                 l/bin/mysqld --basedir=/usr --datadir=/usr/local/mysql/data --user=mysql --log-e                                                                                                 rror=/var/log/messages.err --pid-file=/usr/local/mysql/data/web.pid --socket=/va                                                                                                 r/run/mysqld/mysqld.sock --port=3306
 
messages.err
Code:
100315 13:26:11  InnoDB: Starting shutdown...
100315 13:26:16  InnoDB: Shutdown completed; log sequence number 0 75766
100315 13:26:16 [Note] 
100315 13:26:16 mysqld_safe mysqld from pid file /usr/local/mysql/data/web.pid ended
100315 13:27:01 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
100315 13:27:01 [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 475 error messages,
but it should contain at least 641 error messages.
Check that the above file is the right version for this program!
100315 13:27:01 [Note] Plugin 'FEDERATED' is disabled.
100315 13:27:01  InnoDB: Started; log sequence number 0 75766
100315 13:27:01 [ERROR] Aborting

100315 13:27:01  InnoDB: Starting shutdown...
100315 13:27:06  InnoDB: Shutdown completed; log sequence number 0 75766
100315 13:27:06 [Note] 
100315 13:27:06 mysqld_safe mysqld from pid file /usr/local/mysql/data/web.pid ended
100315 13:27:11 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
100315 13:27:11 [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 475 error messages,
but it should contain at least 641 error messages.
Check that the above file is the right version for this program!
100315 13:27:11 [Note] Plugin 'FEDERATED' is disabled.
100315 13:27:11  InnoDB: Started; log sequence number 0 75766
100315 13:27:11 [ERROR] Aborting

100315 13:27:11  InnoDB: Starting shutdown...

My databases are in /home/mysql
Can it be a problem or not ? I don't think because it works like that in the beginning.
 
Last edited:
For starters, remove that error about the error messages. It's because you have installed the distribution package *and* a compiled version, so run "aptitude remove mysql-server" or mysql-server-5.0 or mysql-server-5.1, whatever is installed.
Then retry, start it and see what does it say in the messages.err logfile. If there is the "Aborting" message again recompile and retry.
 
Ok, I remove all, then I try to reinstall mysql

./build update
./build mysql

And I have these messages :
Code:
Stopping mysqld ...
Stopping mysqld:                [ FAILED ]
Starting mysqld:                [ OK ]
Giving mysqld a few seconds to start up...
/usr/local/mysql/bin/my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2)
Fatal error in defaults handling. Program aborted
/usr/local/mysql/bin/my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2)
Fatal error in defaults handling. Program aborted
/usr/local/mysql/bin/mysql_upgrade: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2)
Fatal error in defaults handling. Program aborted
Looking for 'mysql' as: /usr/local/mysql/bin/mysql
Looking for 'mysqlcheck' as: /usr/local/mysql/bin/mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock'
/usr/local/mysql/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
/usr/local/mysql/bin/mysqlcheck: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2)
Fatal error in defaults handling. Program aborted
/usr/local/mysql/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
Restarting MySQL.
Stopping mysqld:                [ FAILED ]
Starting mysqld:                [ OK ]
It is recommended to do "./build php n" after MySQL update.
/usr/local/mysql/bin/my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2)
Fatal error in defaults handling. Program aborted
/usr/local/mysql/bin/my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2)
Fatal error in defaults handling. Program aborted

/etc/mysql/conf.d/ does not exist
I have /etc/mysql/ with
debian-start debian.cnf and my.cnf

And in messages.err
Code:
100315 14:03:01  InnoDB: Starting shutdown...
100315 14:03:07  InnoDB: Shutdown completed; log sequence number 0 75766
100315 14:03:07 [Note] 
100315 14:03:07 mysqld_safe mysqld from pid file /usr/local/mysql/data/web.pid ended
100315 14:03:11 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
/usr/local/mysql/bin/mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2)
Fatal error in defaults handling. Program aborted
100315 14:03:11 [ERROR] Can't find messagefile '/usr/share/mysql/english/errmsg.sys'
100315 14:03:11 [Note] Plugin 'FEDERATED' is disabled.
100315 14:03:11  InnoDB: Started; log sequence number 0 75766
100315 14:03:11 [ERROR] Aborting

100315 14:03:11  InnoDB: Starting shutdown...
100315 14:03:17  InnoDB: Shutdown completed; log sequence number 0 75766
100315 14:03:17 [Note] 
100315 14:03:17 mysqld_safe mysqld from pid file /usr/local/mysql/data/web.pid ended
 
Last edited:
Errors are caused by the config files left behind by the mysql-server package. Usually you would get rid of them with "aptitude purge mysql-server" but in this case I suggest you open them and try to remove the offending configs instead.
In this case you open each my.cnf and search for the "/etc/mysql/conf.d/" reference, and remove it. Also remove the debian* files and any reference to them within any my.cnf.
 
Back
Top