我有一个comperied to-rpm opscenter软件包,将文件转储到/opt/mypckage
当我执行/opt/opt/mypackage/opscenter/bin/opscenter -f时,一切都还好
我创建了一个从tarball测试的start-script
#!/bin/sh
echo "exec 'sudo /etc/init.d/opscenterd start'"
exec sudo /etc/init.d/opscenterd start
Wierd Thing是 - 是的,它将使用上面的脚本启动OpsCenter服务,但URL未使用端口8888和未生成的HTTP.LOG运行。有什么方法可以在此上调整?
opscenterd.log
2016-06-21 02:13:32+0800 [] INFO: Log opened.
2016-06-21 02:13:32+0800 [] INFO: twistd 10.2.0 (/usr/bin/python2.6 2.6.6) starting up.
2016-06-21 02:13:32+0800 [] INFO: reactor class: twisted.internet.epollreactor.EPollReactor.
2016-06-21 02:13:32+0800 [] INFO: set uid/gid 9093/9094
2016-06-21 02:13:32+0800 [] INFO: Logging level set to 'info'
2016-06-21 02:13:32+0800 [] INFO: OpsCenter version: 5.2.4
2016-06-21 02:13:32+0800 [] INFO: Compatible agent version: 5.2.4
2016-06-21 02:13:32+0800 [] INFO: Cluster config dir './conf/clusters' does not exist yet
2016-06-21 02:13:32+0800 [] INFO: No clusters are configured yet, checking to see if a config migration is needed
2016-06-21 02:13:32+0800 [] INFO: Cluster config dir './conf/clusters' does not exist yet
2016-06-21 02:13:32+0800 [] INFO: No clusters are configured
2016-06-21 02:13:32+0800 [] INFO: Authentication disabled
2016-06-21 02:13:32+0800 [] INFO: Starting webserver with ssl disabled.
2016-06-21 02:13:32+0800 [] INFO: Stats Reporter is connected via HTTP
2016-06-21 02:13:32+0800 [] INFO: SSL disabled
2016-06-21 02:13:32+0800 [] WARN: Unable to import SSL, further definition actions will fail.
2016-06-21 02:13:32+0800 [] INFO: Starting Definition Update Service
2016-06-21 02:13:32+0800 [] WARN: Python may not have been compiled with SSL support, disabling cloud provisioning (No module named Ec2Launcher)
2016-06-21 02:13:32+0800 [] INFO: opscenterd.WebServer.OpsCenterdWebServer starting on 8888
2016-06-21 02:13:32+0800 [] INFO: Starting factory <opscenterd.WebServer.OpsCenterdWebServer instance at 0x1dbf758>
2016-06-21 02:13:32+0800 [] INFO: Unhandled error in Deferred:
2016-06-21 02:13:32+0800 [] Unhandled Error
Traceback (most recent call last):
File "/opt/mypakage/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/scripts/_twistd_unix.py", line 317, in startApplication
File "/opt/mypakage/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/application/app.py", line 653, in startApplication
File "/opt/mypakage/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/application/service.py", line 277, in startService
File "/opt/mypakage/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/internet/defer.py", line 1141, in unwindGenerator
--- <exception caught here> ---
File "/opt/mypakage/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/internet/defer.py", line 1020, in _inlineCallbacks
File "build/lib/python2.6/site-packages/opscenterd/OpsCenterdService.py", line 55, in startService
File "/opt/mypakage/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/application/service.py", line 277, in startService
File "/opt/msp/pkgmypakage/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/application/internet.py", line 110, in startService
File "/opt/mypakage/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/application/internet.py", line 131, in _getPort
File "/opt/mypakage/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/internet/posixbase.py", line 419, in listenTCP
File "/opt/mypakage/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/internet/tcp.py", line 867, in startListening
File "/opt/mypakage/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/internet/protocol.py", line 45, in doStart
File "/opt/mypakage/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/web/http.py", line 1755, in startFactory
File "build/lib/python2.6/site-packages/opscenterd/Logging.py", line 72, in _openLogFile
File "/opt/mypakage/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/python/logfile.py", line 162, in __init__
File "/opt/mypakage/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/python/logfile.py", line 34, in __init__
exceptions.AssertionError:
检查OPSCenter的写入日志的权限。
尝试允许opsCenter实际编写在opscenter.conf
中定义的日志这意味着将/var/log/opscenter的所有权分配给opscenter用户。
chown -R opscenter:opscenter /var/log/opscenter
重新启动OPSCenterd服务,尾部opscenter.log查看服务如何启动。
将其加载到您的浏览器中,享受。