MicroStack 未启动:命令 'snapctl start microstack.nginx' 返回非零退出状态 1
MicroStack does not start: Command 'snapctl start microstack.nginx' returned non-zero exit status 1
我试图在 Ubuntu 18.04 上启动 MicroStack 并收到以下错误:
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.
前段时间我发现 this bug in the lauchpad,它有一个解决方法:停止 Apache 服务器。那时候,显然我还不是运行的Apache。这周我再次尝试启动 Microstack 服务并得到相同的错误信息。然后,我检查了一下,Apache 在我的机器上是 运行。我停止了 Apache 服务,而 Microstack 服务正确启动:
sudo service apache2 stop
我遇到了同样的问题但是 microstack.ovs.vswitchd
为了解决这个问题,我安装了 openvswitch-switch-dpdk。
您的解决方案可能是安装 nginx。
执行 journalctl -xe
并查看您是否在那里找到错误的详细信息。对我来说,我收到了类似
的错误消息
Address already in use 0.0.0.0:9292
结果在我的例子中是 emacs:
ss -lnp|grep :9292
tcp LISTEN 0 5 127.0.0.1:9292 0.0.0.0:* users:(("emacs",pid=126434,fd=15))
在我停止 emacs 后,nginx 将正常启动。
我试图在 Ubuntu 18.04 上启动 MicroStack 并收到以下错误:
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.
前段时间我发现 this bug in the lauchpad,它有一个解决方法:停止 Apache 服务器。那时候,显然我还不是运行的Apache。这周我再次尝试启动 Microstack 服务并得到相同的错误信息。然后,我检查了一下,Apache 在我的机器上是 运行。我停止了 Apache 服务,而 Microstack 服务正确启动:
sudo service apache2 stop
我遇到了同样的问题但是 microstack.ovs.vswitchd
为了解决这个问题,我安装了 openvswitch-switch-dpdk。
您的解决方案可能是安装 nginx。
执行 journalctl -xe
并查看您是否在那里找到错误的详细信息。对我来说,我收到了类似
Address already in use 0.0.0.0:9292
结果在我的例子中是 emacs:
ss -lnp|grep :9292
tcp LISTEN 0 5 127.0.0.1:9292 0.0.0.0:* users:(("emacs",pid=126434,fd=15))
在我停止 emacs 后,nginx 将正常启动。