redis-server fails at startup, installation failed

Bug #1663911 reported by Samuele Giovanni Tonon
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
redis (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hello,
it is quite easy to reproduce the bug:

root@fuffa:~# apt-get update && apt-get install redis-server
[....]

The following NEW packages will be installed:
  redis-server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/397 kB of archives.
After this operation, 1.055 kB of additional disk space will be used.
Selecting previously unselected package redis-server.
(Reading database ... 421904 files and directories currently installed.)
Preparing to unpack .../redis-server_2%3a3.2.1-1_amd64.deb ...
Unpacking redis-server (2:3.2.1-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (231-9ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up redis-server (2:3.2.1-1) ...
Created symlink /etc/systemd/system/redis.service → /lib/systemd/system/redis-server.service.
Created symlink /etc/systemd/system/multi-user.target.wants/redis-server.service → /lib/systemd/system/redis-server.service.
Job for redis-server.service failed because the control process exited with error code.
See "systemctl status redis-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript redis-server, action "start" failed.
● redis-server.service - Advanced key-value store
   Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since sab 2017-02-11 18:58:26 CET; 14ms ago
     Docs: http://redis.io/documentation,
           man:redis-server(1)
  Process: 26199 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=226/NAMESPACE)
  Process: 26196 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d (code=exited, status=226/NAMESPACE)

feb 11 18:58:26 fuffa systemd[1]: redis-server.service: Control process exited, code=exited status=226
feb 11 18:58:26 fuffa systemd[1]: Failed to start Advanced key-value store.
feb 11 18:58:26 fuffa systemd[1]: redis-server.service: Unit entered failed state.
feb 11 18:58:26 fuffa systemd[1]: redis-server.service: Failed with result 'exit-code'.
dpkg: error processing package redis-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (231-9ubuntu2) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 redis-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Of course it is quite impossible to understand what is happening

root@fuffa:~# journalctl -xe
-- Subject: Process /bin/run-parts could not be executed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The process /bin/run-parts could not be executed and failed.
--
-- The error number returned by this process is 2.
feb 11 19:01:09 fuffa systemd[31304]: redis-server.service: Failed at step NAMESPACE spawning /usr/bin/redis-server: No such file or directory
-- Subject: Process /usr/bin/redis-server could not be executed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The process /usr/bin/redis-server could not be executed and failed.
--
-- The error number returned by this process is 2.
feb 11 19:01:09 fuffa systemd[1]: redis-server.service: Control process exited, code=exited status=226
feb 11 19:01:09 fuffa systemd[1]: Failed to start Advanced key-value store.
-- Subject: Unit redis-server.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit redis-server.service has failed.
--
-- The result is failed.
feb 11 19:01:09 fuffa systemd[1]: redis-server.service: Unit entered failed state.
feb 11 19:01:09 fuffa systemd[1]: redis-server.service: Failed with result 'exit-code'.
feb 11 19:01:09 fuffa systemd[1]: redis-server.service: Service hold-off time over, scheduling restart.
feb 11 19:01:09 fuffa systemd[1]: Stopped Advanced key-value store.
-- Subject: Unit redis-server.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit redis-server.service has finished shutting down.
feb 11 19:01:09 fuffa systemd[1]: redis-server.service: Start request repeated too quickly.
feb 11 19:01:09 fuffa systemd[1]: Failed to start Advanced key-value store.
-- Subject: Unit redis-server.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit redis-server.service has failed.
--
-- The result is failed.
feb 11 19:01:09 fuffa systemd[1]: redis-server.service: Unit entered failed state.
feb 11 19:01:09 fuffa systemd[1]: redis-server.service: Failed with result 'start-limit-hit'.

Of course, launching it from command line simply works:

root@fuffa:~# su - redis -s /bin/bash
redis@fuffa:~$ /usr/bin/redis-server /etc/redis/redis.conf
redis@fuffa:~$ echo $?
0
redis@fuffa:~$ ps auxw| grep redis-ser
redis 31431 0.0 0.0 40288 5836 ? Ssl 19:04 0:00 /usr/bin/redis-server 127.0.0.1:6379

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in redis (Ubuntu):
status: New → Confirmed
Revision history for this message
Alexander Zharinov (zharinov) wrote :

I can reproduce this bug inside LXC container with Ubuntu 16.04. It is related to bug of systemd: "https://github.com/systemd/systemd/issues/6121". There is a workaround to disable PrivateDevices for redis-server service. Example:

    $ sudo su
    $ mkdir /etc/systemd/system/redis-server.service.d/
    $ cd /etc/systemd/system/redis-server.service.d/
    $ echo '[Service]' > redis.override.conf
    $ echo 'PrivateDevices=no' >> redis.override.conf

My software versions: redis-server 2:3.0.6-1, systemd 229-4ubuntu17.

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.