MicroStack does not start: Command 'snapctl start microstack.nginx' returned non-zero exit status 1

3.8k Views Asked by At

I am trying to start the MicroStack on Ubuntu 18.04 and receiving the following error:

sudo microstack.init --auto
2020-05-07 16:23:52,073 - microstack_init - INFO - Configuring networking ...
2020-05-07 16:23:52,955 - microstack_init - INFO - Setting up ipv4 forwarding...
2020-05-07 16:23:53,676 - microstack_init - INFO - Opening horizon dashboard up to *
2020-05-07 16:23:54,336 - microstack_init - INFO - Waiting for RabbitMQ to start ...
Waiting for 10.20.20.1:5672
2020-05-07 16:23:54,340 - microstack_init - INFO - RabbitMQ started!
2020-05-07 16:23:54,340 - microstack_init - INFO - Configuring RabbitMQ ...
2020-05-07 16:23:54,919 - microstack_init - INFO - RabbitMQ Configured!
2020-05-07 16:23:55,016 - microstack_init - INFO - Waiting for MySQL server to start ...
Waiting for 10.20.20.1:3306
2020-05-07 16:23:55,038 - microstack_init - INFO - Mysql server started! Creating databases ...
/snap/microstack/196/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1007, "Can't create database 'neutron'; database exists")
  result = self._query(query)
/snap/microstack/196/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1287, "Using GRANT statement to modify existing user's properties other than privileges is deprecated and will be removed in future release. Use ALTER USER statement for this operation.")
  result = self._query(query)
/snap/microstack/196/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1007, "Can't create database 'nova'; database exists")
  result = self._query(query)
/snap/microstack/196/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1007, "Can't create database 'nova_api'; database exists")
  result = self._query(query)
/snap/microstack/196/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1007, "Can't create database 'nova_cell0'; database exists")
  result = self._query(query)
/snap/microstack/196/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1007, "Can't create database 'cinder'; database exists")
  result = self._query(query)
/snap/microstack/196/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1007, "Can't create database 'glance'; database exists")
  result = self._query(query)
/snap/microstack/196/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1007, "Can't create database 'keystone'; database exists")
  result = self._query(query)
Traceback (most recent call last):
  File "/snap/microstack/196/bin/microstack_init", line 11, in <module>
    load_entry_point('microstack-init==0.0.1', 'console_scripts', 'microstack_init')()
  File "/snap/microstack/196/lib/python3.6/site-packages/init/main.py", line 122, in main
    question.ask()
  File "/snap/microstack/196/lib/python3.6/site-packages/init/questions/question.py", line 210, in ask
    self.yes(awr)
  File "/snap/microstack/196/lib/python3.6/site-packages/init/questions/__init__.py", line 355, in yes
    check('snapctl', 'start', 'microstack.nginx')
  File "/snap/microstack/196/lib/python3.6/site-packages/init/shell.py", line 68, in check
    raise subprocess.CalledProcessError(proc.returncode, " ".join(args))
subprocess.CalledProcessError: Command 'snapctl start microstack.nginx' returned non-zero exit status 1.
3

There are 3 best solutions below

0
On BEST ANSWER

Some time ago I found this bug in the lauchpad, which had one workaround: stop the Apache server. At that time, apparently I was not running the Apache. This week I tried again to start the Microstack services and got the same error message. Then, I checked and the Apache was running on my machine. I stopped the Apache service and the Microstack services started correctly:

sudo service apache2 stop
0
On

Do a journalctl -xe and see if you find details on the error there. For me, I got an error message like

Address already in use 0.0.0.0:9292

And it turned out in my case it was emacs:

ss -lnp|grep :9292
tcp LISTEN 0 5 127.0.0.1:9292 0.0.0.0:* users:(("emacs",pid=126434,fd=15))       

After I stopped emacs, nginx would start without issues.

0
On

I Had the same problem but with microstack.ovs.vswitchd

To solve the problem i'd to install openvswitch-switch-dpdk.

Your solution may be to install nginx.