我在获取 Sentry 时遇到问题(https://www.getsentry.com- 链接的代表数量不足)使用主管作为服务运行。我可以在命令行中运行 Sentry 并在浏览器中正确查看它,但当谈到主管时,我完全不知道。
我将尽力提供所有细节
初始用户警告
- 绝不是服务器管理员,只是在 VirtualBox 中玩耍/学习。
- 从字面上看,我刚刚通过阅读 Sentry 文档发现了主管,所以我很可能在这里犯了一些明显的错误。
设置:
- Ubuntu 服务器 11.10(全新安装,VirtualBox)
- virtualenv 与 Sentry 及其依赖项。
- 导师
遵循指示
我的主管 ini(哨兵部分)
[program:sentry-web]
directory=/root/.virtualenvs/sentry/
command= start http /root/.virtualenvs/sentry/bin/sentry
autostart=true
autorestart=true
redirect_stderr=true
好的,我们开始吧:
当我运行时,supervisord -n
我收到以下消息,而不是一个可用的良好 Web 界面。
2012-04-12 23:48:09,024 CRIT Supervisor running as root (no user in config file)
2012-04-12 23:48:09,097 INFO RPC interface 'supervisor' initialized
2012-04-12 23:48:09,099 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2012-04-12 23:48:09,100 INFO supervisord started with pid 17813
2012-04-12 23:48:10,126 INFO spawned: 'sentry-web' with pid 17816
2012-04-12 23:48:10,169 INFO exited: sentry-web (exit status 1; not expected)
2012-04-12 23:48:11,199 INFO spawned: 'sentry-web' with pid 17817
2012-04-12 23:48:11,238 INFO exited: sentry-web (exit status 1; not expected)
2012-04-12 23:48:13,269 INFO spawned: 'sentry-web' with pid 17818
2012-04-12 23:48:13,309 INFO exited: sentry-web (exit status 1; not expected)
2012-04-12 23:48:16,343 INFO spawned: 'sentry-web' with pid 17819
2012-04-12 23:48:16,389 INFO exited: sentry-web (exit status 1; not expected)
2012-04-12 23:48:17,394 INFO gave up: sentry-web entered FATAL state, too many start retries too quickly
CRIT Supervisor running as root (no user in config file)
这表明存在一个大问题,可能不应该以 root 身份运行它?
CRIT Server 'unix_http_server' running without any HTTP authentication checking
身份验证肯定是可选的吗?
INFO exited: sentry-web (exit status 1; not expected)
*悲伤的脸*。谷歌还没有提供太多帮助。
无论如何,据我所知就是这样。如果有人能帮助我,我将不胜感激。
提前致谢。
更新 1
@Mark Henwood,谢谢。
$ sudo /root/.virtualenvs/sentry/bin/sentry start http
Traceback (most recent call last):
File "/root/.virtualenvs/sentry/bin/sentry", line 8, in <module>
load_entry_point('sentry==3.8.2', 'console_scripts', 'sentry')()
File "/root/.virtualenvs/sentry/local/lib/python2.7/site-packages/sentry/utils/runner.py", line 93, in main
initializer=initialize_app,
File "/root/.virtualenvs/sentry/local/lib/python2.7/site-packages/logan/runner.py", line 120, in run_app
raise ValueError("Configuration file does not exist. Use '%s init' to initialize the file." % runner_name)
ValueError: Configuration file does not exist. Use 'sentry init' to initialize the file.
答案1
必须在 sentry 子命令之前指定 --config 选项,如下所示:
sentry --config=/somedir/sentry.conf.py start ....