Re: mysql 4.0.2 startup problems
am 21.10.2002 13:26:28 von mmokrejs
On Mon, 12 Aug 2002, Martin MOKREJ© wrote:
Hi,
few more nfor about this problem still apearing with 4.0.5-bk:
/scratch$ /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/data/mysql2 --user=mysql --pid-file=/usr/local/mysql/var/kulan.pid2 --skip-locking --port=3305
021021 13:07:15 Warning: setrlimit couldn't increase number of open files to more than 1024 (request: 32878)
021021 13:07:15 Can't find messagefile 'mysql-BK-20021018/share/mysql/english/errmsg.sys'
021021 13:07:15 Aborting
/scratch$
Please ignore the setrlimit(), I'm running this test as a wrong user.
I post full debug, as it is short and I'll comment few lines:
/scratch$ strace -a -f /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/data/mysql2 --user=mysql --pid-file=/usr/local/mysql/var/kulan.pid2 --skip-locking --port=3305
execve("/usr/local/mysql/libexec/mysqld", ["/usr/local/mysql/libexec/mysqld", "--basedir=/usr/local/mysql", "--datadir=/data/mysql2", "--user=mysql", "--pid-file=/usr/local/mysql/var/kulan.pid2", "--skip-locking", "--port=3305"], [/* 26 vars */]) = 0
fcntl64(0, F_GETFD) = 0
fcntl64(1, F_GETFD) = 0
fcntl64(2, F_GETFD) = 0
uname({sys="Linux", node="kulan", ...}) = 0
geteuid32() = 1001
getuid32() = 1001
getegid32() = 1001
getgid32() = 1001
getrlimit(0x3, 0xbffff580) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2044*1024, rlim_max=RLIM_INFINITY}) = 0
getpid() = 1645
rt_sigaction(SIGRTMIN, {0x81acf20, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x81acf88, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGRT_2, {0x81ad064, [], 0x4000000}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0
_sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbffff388, 35, (nil), 0}) = 0
brk(0) = 0x82ee4e8
brk(0x82ee518) = 0x82ee518
brk(0x82ef000) = 0x82ef000
open("/etc/localtime", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=837, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40000000
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\0\0\0\10"..., 4096) = 837
close(3) = 0
munmap(0x40000000, 4096) = 0
time(NULL) = 1035198446
uname({sys="Linux", node="kulan", ...}) = 0
open("/etc/my.cnf", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=5592, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40000000
read(3, "# Example mysql config file for "..., 4096) = 4096
brk(0x82f0000) = 0x82f0000
read(3, "ing Innobase tables\n#innodb_data"..., 4096) = 1496
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40000000, 4096) = 0
open("/usr/local/mysql/var/my.cnf", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/home/users/bioadmin/.my.cnf", O_RDONLY|O_LARGEFILE) = 3
--------------------------^ so where does mysql read the /etc/my.cnf?
Did I compile binaries with some other defaults, hmm?
fstat64(3, {st_mode=S_IFREG|0600, st_size=314, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40000000
read(3, "[client]\nhost=127.0.0.1\nuser=ped"..., 4096) = 314
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40000000, 4096) = 0
readlink("/usr/local/mysql", "mysql-BK-20021018", 511) = 17
------------------------^ now mysql realizes /usr/local/mysql is a softlink to /usr/local/mysql-BK-20021018
rt_sigaction(SIGINT, {0x81ad4f8, [], 0x4000000}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [INT], NULL, 8) = 0
rt_sigaction(SIGALRM, {0x81ad4f8, [], 0x4000000}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGSEGV, {0x81ad4f8, [], SA_NOMASK|SA_ONESHOT|0x4000000}, NULL, 8) = 0
rt_sigaction(SIGBUS, {0x81ad4f8, [], SA_NOMASK|SA_ONESHOT|0x4000000}, NULL, 8) = 0
rt_sigaction(SIGILL, {0x81ad4f8, [], SA_NOMASK|SA_ONESHOT|0x4000000}, NULL, 8) = 0
rt_sigaction(SIGFPE, {0x81ad4f8, [], SA_NOMASK|SA_ONESHOT|0x4000000}, NULL, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0x81ad4f8, [], 0x4000000}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [TERM], NULL, 8) = 0
rt_sigaction(SIGHUP, {0x81ad4f8, [], 0x4000000}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [HUP], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [HUP QUIT PIPE TERM TSTP RTMIN], NULL, 8) = 0
open("mysql-BK-20021018/share/mysql/charsets/Index", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
-----------------------------------------------^ But wait. mysqld_safe expects current working directory
to be /usr/local/mysql, right. Then, why is the mysqld searching for
mysql-BK-20021018/share/.... That's the reason I have to make a soflink
to itself (see original post below).
But did mysqld inspect, what is current directory?
In my situation it does not work (note that cd /usr/local/mysql
doesn't help, unless I create the softlink -- see below).
I just guess, that for others it works as their /etc/my.cnf is found
at the very beginning of startup.
sched_setscheduler(0x66d, 0, 0xbffff9b8) = -1 EINVAL (Invalid argument)
sched_get_priority_max(0) = 0
sched_get_priority_min(0) = 0
getrlimit(0x7, 0xbffff974) = 0
setrlimit(RLIMIT_NOFILE, {rlim_cur=32878, rlim_max=32878}) = -1 EPERM (Operation not permitted)
time(NULL) = 1035198446
write(2, "021021 13:07:26 ", 17021021 13:07:26 ) = 17
write(2, "Warning: setrlimit couldn\'t incr"..., 92Warning: setrlimit couldn't increase number of open files to more than 1024 (request: 32878)) = 92
write(2, "\n", 1
) = 1
getpid() = 1645
time(NULL) = 1035198446
open("mysql-BK-20021018/share/mysql/english/errmsg.sys", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
time(NULL) = 1035198446
write(2, "021021 13:07:26 ", 17021021 13:07:26 ) = 17
write(2, "Can\'t find messagefile \'mysql-BK"..., 73Can't find messagefile 'mysql-BK-20021018/share/mysql/english/errmsg.sys') = 73
write(2, "\n", 1
) = 1
time(NULL) = 1035198446
write(2, "021021 13:07:26 ", 17021021 13:07:26 ) = 17
write(2, "Aborting\n", 9Aborting
) = 9
write(2, "\n", 1
) = 1
unlink("/usr/local/mysql/var/kulan.pid2") = -1 ENOENT (No such file or directory)
----------------------------------------^ the PID file has not been created yet!?
_exit(1) = ?
/scratch$
Please note that the text below I've sent to mysql@lists....
> Hi,
> it's a bit late reply, to my original mail sent to bugs list. Now the
> problem reappeared as the box got rebooted. I was receiving in
> $hostname.err:
>
> 020812 11:34:20 mysqld started
> 020812 11:34:20 Can't find messagefile 'mysql-4.0.2-alpha-pc-linux-gnu-i686/share/mysql/english/err msg.sys'
> 020812 11:34:20 Aborting
>
> 020812 11:34:20 mysqld ended
[...]
> I've suspected that mysqld operates in unexpected current directory, and this
> really helped:
>
> cd /usr/local/mysql (which is a symlink to /usr/local/mysql-4.0.2-alpha-pc-linux-gnu-i686)
> ln -s . mysql-4.0.2-alpha-pc-linux-gnu-i686
>
> Now when mysqld proscess is in /usr/local/mysql and want's to see mysql-4.0.2-alpha-pc-linux-gnu-i686/share*,
> it can get it. Please note that I did not re-set "$bindir" inside /etc/my.cnf.
> However, $basedir is reported by 'mysqladmin variables' to be set to
> 'mysql-4.0.2-alpha-pc-linux-gnu-i686/'. Maybe that's my problem?
>
> TIA
> Please Cc: me in replies, if possible.
--
Martin Mokrejs ,
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax: +49-89-3187 3585
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12811@lists.mysql.com
To unsubscribe, e-mail