cannot access '/var/lib/rabbitmq': No such file or directory

Bug #1417205 reported by Ryan Beisner
This bug report is a duplicate of:  Bug #1416854: Fail to install rabbitmq-server. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rabbitmq-server (Juju Charms Collection)
New
Undecided
Unassigned
rabbitmq-server (Ubuntu)
New
Undecided
Unassigned

Bug Description

For Vivid-Kilo OpenStack deployments, the config-changed hook fails. It looks like either the charm needs to handle a missing /var/lib/rabbitmq path, or the vivid rabbitmq-server package needs to create it.

# from juju stat
    units:
      rabbitmq-server/0:
        agent-state: error
        agent-state-info: 'hook failed: "config-changed"'

## rmq unit juju log:
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 Setting up rabbitmq-server (3.4.3-1) ...
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 chown: cannot access '/var/lib/rabbitmq': No such file or directory
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 dpkg: error processing package rabbitmq-server (--configure):
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 subprocess installed post-installation script returned error exit status 1
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 Errors were encountered while processing:
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 rabbitmq-server
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 E: Sub-process /usr/bin/dpkg returned an error code (1)
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 Traceback (most recent call last):
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 File "/var/lib/juju/agents/unit-rabbitmq-server-0/charm/hooks/config-changed", line 698, in <module>
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 hooks.execute(sys.argv)
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 File "/var/lib/juju/agents/unit-rabbitmq-server-0/charm/hooks/charmhelpers/core/hookenv.py", line 544, in execute
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 self._hooks[hook_name]()
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 File "/var/lib/juju/agents/unit-rabbitmq-server-0/charm/hooks/charmhelpers/core/host.py", line 312, in wrapped_f
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 f(*args)
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 File "/var/lib/juju/agents/unit-rabbitmq-server-0/charm/hooks/config-changed", line 647, in config_changed
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 apt_install(rabbit.PACKAGES, fatal=True)
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 File "/var/lib/juju/agents/unit-rabbitmq-server-0/charm/hooks/charmhelpers/fetch/__init__.py", line 183, in apt_install
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 _run_apt_command(cmd, fatal)
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 File "/var/lib/juju/agents/unit-rabbitmq-server-0/charm/hooks/charmhelpers/fetch/__init__.py", line 428, in _run_apt_command
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 result = subprocess.check_call(cmd, env=env)
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 raise CalledProcessError(retcode, cmd)
2015-02-01 23:19:31 INFO unit.rabbitmq-server/0.config-changed logger.go:40 subprocess.CalledProcessError: Command '['apt-get', '--assume-yes', '--option=Dpkg::Options::=--force-confold', 'install', 'rabbitmq-server', 'python-amqplib']' returned non-zero exit status 100
2015-02-01 23:19:31 INFO juju.worker.uniter.context context.go:304 handling reboot
2015-02-01 23:19:31 ERROR juju.worker.uniter uniter.go:608 hook "config-changed" failed: exit status 1

## manually apt-get installing rabbitmq-server on vivid:
Setting up rabbitmq-server (3.4.3-2) ...
Adding group `rabbitmq' (GID 118) ...
Done.
Adding system user `rabbitmq' (UID 111) ...
Adding new user `rabbitmq' (UID 111) with group `rabbitmq' ...
Not creating home directory `/var/lib/rabbitmq'.
 * Starting message broker rabbitmq-server
   ...done.
Processing triggers for libc-bin (2.19-13ubuntu3) ...
Processing triggers for ureadahead (0.100.0-17) ...
ubuntu@vivid173314:~$ apt-cache policy rabbitmq-server
rabbitmq-server:
  Installed: 3.4.3-2
  Candidate: 3.4.3-2
  Version table:
 *** 3.4.3-2 0
        500 http://nova.clouds.archive.ubuntu.com/ubuntu/ vivid/main i386 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Ryan Beisner (1chb1n) wrote :

FYI juju deployment used amd64 images; my manual test inadvertently used the i386 image. I re-confirmed manual apt pkg install with an amd64 vivid image.

Adding system user `rabbitmq' (UID 111) ...
Adding new user `rabbitmq' (UID 111) with group `rabbitmq' ...
Not creating home directory `/var/lib/rabbitmq'.
 * Starting message broker rabbitmq-server
   ...done.
Processing triggers for libc-bin (2.19-13ubuntu3) ...
Processing triggers for ureadahead (0.100.0-17) ...
ubuntu@vivid181213:~$ apt-cache policy rabbitmq-server
rabbitmq-server:
  Installed: 3.4.3-2
  Candidate: 3.4.3-2
  Version table:
 *** 3.4.3-2 0
        500 http://nova.clouds.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
        100 /var/lib/dpkg/status
ubuntu@vivid181213:~$

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.