Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm having problems getting Sentry (https://www.getsentry.com - not enough rep for a link) running as a service using supervisor. I can run Sentry in the command line and view it correctly in the browser but when it comes to supervisor I am completely in the dark.

I shall try and give all the details I can

Initial user warning

  • By no means a server admin, just playing/learning in VirtualBox.
  • Literally only just discovered supervisor from reading the Sentry documentation so I may well be making some obvious mistakes here.

The setup:

  • Ubuntu server 11.10 (fresh install, VirtualBox)
  • virtualenv with Sentry and its dependencies.
  • supervisor

Instructions followed

My supervisor ini (Sentry section)

[program:sentry-web]
directory=/root/.virtualenvs/sentry/
command= start http /root/.virtualenvs/sentry/bin/sentry
autostart=true
autorestart=true
redirect_stderr=true

OK so here we go:

When I run supervisord -n I get the following messages rather than a nice web interface to play with.

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) suggests a big problem, probably shouldn't be running this as root?

CRIT Server 'unix_http_server' running without any HTTP authentication checking Surely authentication is optional?

INFO exited: sentry-web (exit status 1; not expected) *sad face* here. Google hasn't been much help yet.

Anyway, that is it as far as I know. If anyone can help me that would be greatly appreciated.

Thanks in advance.

Update 1

@Mark Henwood, thanks.

$ 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.
share|improve this question
    
What happens when you: $ sudo start http /root/.virtualenvs/sentry/bin/sentry ? –  Mark Henwood Apr 13 '12 at 13:16
    
Thanks Mark. Clearly it cant find the config file for whatever reason. I will move the virtualenvsout of /root/ (didnt mean for it to be there anyway) and see how that goes. –  rockingskier Apr 14 '12 at 10:54
    
OK it was a mixture of permissions, typos and adding --config to the command but I am there now. Thanks –  rockingskier Apr 14 '12 at 11:37
    
@rockingskier: Could you post the solution as an answer? I have similar issue and your solution may be helpful also to others. –  Tadeck May 16 '12 at 21:46
add comment

1 Answer

up vote 5 down vote accepted

The --config option must be specified before the sentry subcommand, like so:

sentry --config=/somedir/sentry.conf.py start ....
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.