mysqld_safe on Ubuntu fails to find sysctl binary

Bug #1670633 reported by Miguel Angel Nieto
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
New
Undecided
Unassigned
5.6
New
Undecided
Unassigned
5.7
Triaged
Medium
Unassigned

Bug Description

- Ubuntu trusty.
- Percona Server 5.7.17.

If --flush-caches is enabled, the service won't start with the following error:

sysctl command not found, required for --flush-caches

mysqld_safe try to find it in these places:

6632 stat("/usr/local/bin/sysctl", 0x7ffde6c3e590) = -1 ENOENT (No such file or directory)
6632 stat("/usr/bin/sysctl", 0x7ffde6c3e590) = -1 ENOENT (No such file or directory)
6632 stat("/bin/sysctl", 0x7ffde6c3e590) = -1 ENOENT (No such file or directory)
6632 stat("/usr/local/games/sysctl", 0x7ffde6c3e590) = -1 ENOENT (No such file or directory)
6632 stat("/usr/games/sysctl", 0x7ffde6c3e590) = -1 ENOENT (No such file or directory)

but it is on /sbin

The workarounds are:

1- Create a symbolic link:

# ln -s /sbin/sysctl /bin/sysctl

2- Add /sbin to mysqld_safe PATH. Edit /usr/bin/mysqld_safe and add:

PATH=$PATH:/sbin

mysqld_safe should be able to find the tool without users having to use those workarounds.

Tags: pkg
Changed in percona-server:
status: New → Confirmed
tags: added: pkg
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1788

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.