You are not logged in.
I did pacman -S percona-server
I then did systemctl enable mysqld and systemctl start mysqld
However, it never starts, it just goes into a start loop failure.
Unfortunately, systemctl and journalctl aren't particularly helpful about what's wrong:
May 16 18:03:34 robot1 systemd[1]: mysqld.service holdoff time over, scheduling restart.
May 16 18:03:34 robot1 systemd[1]: Stopping MySQL database server...
May 16 18:03:34 robot1 systemd[1]: Starting MySQL database server...
May 16 18:03:34 robot1 systemd[651]: Failed at step USER spawning /usr/bin/mysqld: No such process
May 16 18:03:34 robot1 systemd[1]: mysqld.service: main process exited, code=exited, status=217/USER
May 16 18:03:34 robot1 systemd[652]: Failed at step USER spawning /usr/bin/mysqld-post: No such process
May 16 18:03:34 robot1 systemd[1]: mysqld.service: control process exited, code=exited status=217
May 16 18:03:34 robot1 systemd[1]: Failed to start MySQL database server.
May 16 18:03:34 robot1 systemd[1]: Unit mysqld.service entered failed state.
May 16 18:03:34 robot1 systemd[1]: mysqld.service holdoff time over, scheduling restart.
May 16 18:03:34 robot1 systemd[1]: Stopping MySQL database server...
May 16 18:03:34 robot1 systemd[1]: Starting MySQL database server...
May 16 18:03:34 robot1 systemd[1]: mysqld.service start request repeated too quickly, refusing to start.
May 16 18:03:34 robot1 systemd[1]: Failed to start MySQL database server.
May 16 18:03:34 robot1 systemd[1]: Unit mysqld.service entered failed state.
May 16 18:03:35 robot1 gpsd[295]: gpsd:WARN: Satellite data no good (1 of 1).
it just keeps repeating like this.
How do I debug and fix this?
Offline
More information: The same problems happen after removing -ss percona-server, and instead installing mariadb and re-enabling mysqld.
Other information:
I read the unit file for mysqld.service, and found the following inconsistencies:
ExecStart=/usr/bin/mysqld --pid-file=/run/mysqld/mysqld.pid
/run/mysqld is not a created directory
[Service]
User=mysql
Group=mysql
neither the mysql user nor group exists
Aren't those supposed to be created by the install package?
Also, adduser seems to have disappeared (I haven't looked for it in a long time)
useradd mysql fails:
[jwatte@robot1 ~]$ sudo useradd mysql
useradd: PAM: Authentication service cannot retrieve authentication info
[jwatte@robot1 ~]$
I have done pacman -Syu and rebooted today, so running the latest.
Last edited by jwatte (2014-05-17 01:25:06)
Offline
Both percona-server and mariadb create create the mysql user/group on first install.
they also have a postupgrade section in the .install file that checks if myqsl user/group exists, and creates them if they don't.
Upon removal of either package, they remove that user/group again.
The pam error suggests you may have problems on your system.
check 1 of the install files and try to run the groupadd / useradd manually.
see https://projects.archlinux.org/svntogit … es/mariadb
Last edited by Lone_Wolf (2014-05-17 13:19:32)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Thanks for the answer.
Tthey clearly failed to create the user, as I looked for the user while the package was installed.
I also tried to run useradd, and it failed, as displayed.
This raises two follow-on questions:
1) What could be broken on my system such that useradd doesn't work? I've done approximately zero customization of the system other than just running pacman for packages I need.
2) The installation scripts declared success. Why do they declare success when they failed to create the users?
Last edited by jwatte (2014-05-17 16:49:35)
Offline
More information: Running strace on pam, it seems quite capable of opening /etc/shadow and /etc/passwd, and getuid() returns 0 for "root":
open("/etc/pam.d/other", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1a7c0eb000
read(3, "#%PAM-1.0\nauth\t\trequired\tpam_uni"..., 4096) = 127
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f1a7c0eb000, 4096) = 0
getuid() = 0
getuid() = 0
open("/etc/login.defs", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=5519, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1a7c0eb000
read(3, "#\n# /etc/login.defs - Configurat"..., 4096) = 4096
read(3, "gular users using chfn - use\n# a"..., 4096) = 1423
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f1a7c0eb000, 4096) = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=610, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1a7c0eb000
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 610
close(3) = 0
munmap(0x7f1a7c0eb000, 4096) = 0
geteuid() = 0
open("/etc/shadow", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0600, st_size=413, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1a7c0eb000
read(3, "root:x::::::\nbin:x:14871::::::\nd"..., 4096) = 413
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f1a7c0eb000, 4096) = 0
write(2, "useradd: PAM: Authentication ser"..., 73useradd: PAM: Authentication service cannot retrieve authentication info
) = 73
The config files look fine:
[root@robot1 jwatte]# cat /etc/pam.d/useradd
#%PAM-1.0
auth sufficient pam_rootok.so
auth required pam_unix.so
account required pam_unix.so
session required pam_unix.so
password required pam_permit.so
[root@robot1 jwatte]# cat /etc/pam.d/other
#%PAM-1.0
auth required pam_unix.so
account required pam_unix.so
password required pam_unix.so
session required pam_unix.so
[root@robot1 jwatte]#
I'll re-post this in a separate topic.
Offline