openstack-dashboard启动超时

本文详细介绍了在环境配置下,解决dashboard搭建后重启httpd服务时出现的超时问题。通过修改启动预处理命令的超时设置,将TimeoutStartSec从5分钟延长至20分钟,成功解决了httpd服务重启时的超时故障。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

       由于环境问题,我们在搭建完dashboard后重启httpd服务,会发生httpd超时的问题,在这里我为大家做个解答。

首先,关于这个问题的原因是由于启动httpd服务的时候他会首先执行以下两个命令:

/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear -v0

/usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force -v0

在下面图可以看到在第二个图中第二个命令被杀掉了,所以失败了

这两个命令一个是收集一个是压缩的意思,想更多了解可以百度这里就不多说。

解决:

sed -i 's/5min/20min/g' /usr/lib /systemd/system/httpd.service.d/openstack-dashboard.conf

执行这条命令之后重启服务就OK啦!

 

 

 

 

以下是我查看和重启的过程。很简单的步骤

[root@controller ~]# systemctl cat httpd

# /usr/lib/systemd/system/httpd.service

[Unit]

Description=The Apache HTTP Server

After=network.target remote-fs.target nss-lookup.target

Documentation=man:httpd(8)

Documentation=man:apachectl(8)

[Service]

Type=notify

EnvironmentFile=/etc/sysconfig/httpd

ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND

ExecReload=/usr/sbin/httpd $OPTIONS -k graceful

ExecStop=/bin/kill -WINCH ${MAINPID}

# We want systemd to give httpd some time to finish gracefully, but still want

# it to kill httpd after TimeoutStopSec if something went wrong during the

# graceful stop. Normally, Systemd sends SIGTERM signal right after the

# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give

# httpd time to finish.

KillSignal=SIGCONT

PrivateTmp=true

[Install]

WantedBy=multi-user.target

 

# /usr/lib/systemd/system/httpd.service.d/openstack-dashboard.conf

[Service]

ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear -v0

ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force -v0

TimeoutStartSec=5min

 

[Unit]

After=memcached.service

 

[root@controller~]#sed -i 's/5min/20min/g' /usr/lib/systemd/system/httpd.service.d/openstack-dashboard.conf

 

[root@controller~]# cat /usr/lib/systemd/system/httpd.service.d/openstack-dashboard.conf

[Service]

ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear -v0

ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force -v0

TimeoutStartSec=20min

[Unit]

After=memcached.service

 

成功了

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值