Unable to init microstack (snap version openstack) due to nginx complaining. any suggestions?

1.3k views Asked by At

Hi community out there.

Am trying to install openstack on an ubuntu 20.04 server but init fails by nginx complaining

user01@metropolis:/var/opt$ sudo microstack.init --auto
[sudo] Passwort für user01: 
2020-08-27 12:07:41,204 - microstack_init - INFO - Configuring networking ...
2020-08-27 12:07:53,190 - microstack_init - INFO - Opening horizon dashboard up to *
2020-08-27 12:07:56,342 - microstack_init - INFO - Waiting for RabbitMQ to start ...
Waiting for 10.20.20.1:5672
2020-08-27 12:08:46,544 - microstack_init - INFO - RabbitMQ started!
2020-08-27 12:08:46,544 - microstack_init - INFO - Configuring RabbitMQ ...
2020-08-27 12:08:50,572 - microstack_init - INFO - RabbitMQ Configured!
2020-08-27 12:08:50,629 - microstack_init - INFO - Waiting for MySQL server to start ...
Waiting for 10.20.20.1:3306
2020-08-27 12:08:50,643 - microstack_init - INFO - Mysql server started! Creating databases ...
/snap/microstack/206/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1007, "Can't create database 'neutron'; database exists")
  result = self._query(query)
/snap/microstack/206/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/206/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1007, "Can't create database 'nova'; database exists")
  result = self._query(query)
/snap/microstack/206/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/206/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/206/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1007, "Can't create database 'cinder'; database exists")
  result = self._query(query)
/snap/microstack/206/lib/python3.6/site-packages/pymysql/cursors.py:170: Warning: (1007, "Can't create database 'glance'; database exists")
  result = self._query(query)
/snap/microstack/206/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/206/bin/microstack_init", line 33, in <module>
    sys.exit(load_entry_point('microstack-init==0.0.1', 'console_scripts', 'microstack_init')())
  File "/snap/microstack/206/lib/python3.6/site-packages/init/main.py", line 54, in wrapper
    return func(*args, **kwargs)
  File "/snap/microstack/206/lib/python3.6/site-packages/init/main.py", line 138, in init
    question.ask()
  File "/snap/microstack/206/lib/python3.6/site-packages/init/questions/question.py", line 210, in ask
    self.yes(awr)
  File "/snap/microstack/206/lib/python3.6/site-packages/init/questions/__init__.py", line 358, in yes
    check('snapctl', 'start', 'microstack.nginx')
  File "/snap/microstack/206/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.
user01@metropolis:/var/opt$ netstat | grep :80 
tcp        0      0 metropolis:55384        192.168.178.75:8009     VERBUNDEN  
tcp        0      0 metropolis:48726        192.168.178.129:8009    VERBUNDEN  
tcp        0      0 metropolis:59164        192.168.178.101:8009    VERBUNDEN  
tcp        0      0 metropolis:50820        172.30.33.5:8086        VERBUNDEN  
user01@metropolis:/var/opt$ netstat | grep :443
tcp        0      0 metropolis:44324        192.168.178.12:http     TIME_WAIT  
tcp        0      0 metropolis:44376        192.168.178.12:http     TIME_WAIT  
user01@metropolis:/var/opt$ 

Can someone please explain, why nginx complains or where to review logs? Am new to snap. Any other suggestions also welcome? No Apache or Nginx running

2

There are 2 answers

0
Daniel Coral On

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

To solve the problem I had to install openvswitch-switch-dpdk.

Your solution may be to install nginx or reinstall it..

0
superrimal On

I encountered the same problem, I tried to check if apache2 was running on the same port but in my ubuntu-ec2 instance, I haven't installed apache2 so technically I shouldn't have this error.

So, I look for if any other service was running using the network tools

Then I found out that the datadog-agent service was using the same port, I removed the service and then tried to initialize microstack using microstack init --auto --control and it worked. After the microstack was up and running, I then installed a datadog-agent to monitor my ec2 instance.

If you still have this error, look for ports using the network tools and try to remove those services and re-install after you initialize the microstack.

My Ec2 Details:

Ubuntu server 20.04 LTS

RAM: 8GB

Storage: 20Gb

VCPU: 2

t2.large