Reviewbot daemonization

77 views
Skip to first unread message

Дмитрий Лисичкин

unread,
May 31, 2021, 6:15:11 AM5/31/21
to Review Board Community

I know that reviewbot will work through docker soon but I try to setup it manualy for current version and I have some troubles with this.
All work fine when we run reviewbot worker from command line but i can't setup it as service.

Documentation sended us to
but for non-python developer it hard to understand what it is about.
After several hours I understand what is celery is and try to start reviewbot worker through:
"celery -A reviewbot.celery ..."
but this is not works because of:
```
if __name__ == '__main__':
    main()
```
in reviewbot/celery.py

After some time I recognize that I can use reviewbot executable with the same arguments as celery but when I use `reviewbot worker --detach` or `reviewbot multi start` extension stop working:
In debug mode in worker log I see:
```
[2021-05-31 12:25:13,896: ERROR/MainProcess] pidbox command error: KeyError(u'update_tools_list',)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/kombu/pidbox.py", line 105, in dispatch
    reply = handle(method, kwdict(arguments))
  File "/usr/lib/python2.7/site-packages/kombu/pidbox.py", line 123, in handle_call
    return self.handle(method, arguments)
  File "/usr/lib/python2.7/site-packages/kombu/pidbox.py", line 120, in handle
    return self.handlers[method](self.state, **arguments)
KeyError: u'update_tools_list'
```
Is any suggestions?

Christian Hammond

unread,
Jun 8, 2021, 12:20:02 AM6/8/21
to revie...@googlegroups.com
Hi,

I unfortunately have no idea why you’d be getting g that error. I can’t reproduce it and it’s not clear to me what’s going on there… could potentially be some issue with some dependency or something, but it looks like some part of the internal state for celery’s dependencies is all messed up.

As you know, I’m working to get 3.0 ready, with an official Docker image. 2.0 doesn’t work well in Docker, but it shouldn’t fail like this… I suspect it would take some deep sleuthing to figure out where it’s failing and why.

Christian

--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/cd1e4725-95c9-4410-af77-009cc5caa9c5n%40googlegroups.com.
--
--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

Дмитрий Лисичкин

unread,
Jul 23, 2021, 3:48:10 AM7/23/21
to Review Board Community
Thanks. Will wait for next version.
вторник, 8 июня 2021 г. в 07:20:02 UTC+3, Christian Hammond:

Hassanaien Abdullah kareem moa'ebar Alshammry

unread,
Jul 23, 2021, 10:43:03 PM7/23/21
to revie...@googlegroups.com, Hassanaien Abdullah Alshammry Support, Hassanaien Alshammry (Choonyco)

Дмитрий Лисичкин

unread,
Aug 27, 2021, 8:24:48 AM8/27/21
to Review Board Community
I install reviewbot 3 on another server and see same problem there too.
Worker started but not in workable condition.
Checks not starts and when open configure reviewbot extension page there exception.

Traceback:

File "/usr/local/lib/python3.8/dist-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py" in _legacy_get_response
  249.             response = self._get_response(request)

File "/usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.8/dist-packages/django/views/generic/base.py" in view
  68.             return self.dispatch(request, *args, **kwargs)

File "/usr/local/lib/python3.8/dist-packages/django/views/generic/base.py" in dispatch
  88.         return handler(request, *args, **kwargs)

File "/usr/local/lib/python3.8/dist-packages/reviewbotext/views.py" in get
  248.                     'hosts': [

File "/usr/local/lib/python3.8/dist-packages/reviewbotext/views.py" in <listcomp>
  251.                             'tools': data['tools'],

Exception Type: KeyError at /admin/extensions/reviewbotext.extension.ReviewBotExtension/config/worker-status/
Exception Value: 'tools'

I start worker with
reviewbot worker -b amqp://*****:*****@localhost:5672/review --detach

Right way to configure celery systemd service have same problem.
Only workable solution that works for me:
```
[Unit]
Description=reviewbot worker

[Service]
User=some_user
WorkingDirectory=/opt/reviewbot

ExecStart=reviewbot worker -b amqp://*****:*****@localhost:5672/review
board

Type=simple

[Install]
WantedBy=default.target
```
суббота, 24 июля 2021 г. в 05:43:03 UTC+3, hasso...@gmail.com:

Christian Hammond

unread,
Sep 20, 2021, 6:23:54 PM9/20/21
to revie...@googlegroups.com
Finally had some time to dive into this.

Looks like what's happening is that the worker is unable to talk to Review Board, and is providing an error message (and is therefore not providing "tools"). However, the extension side isn't properly checking for this, crashing when it encounters the one with the error. I'll get that fixed for 3.0, but in the meantime, I'd see if you can determine why the worker isn't able to reach the Review Board server. Maybe try an HTTP request from the worker server, if it's not running on the same machine as Review Board.

Alternatively, you could be hitting an issue with authentication.

The Review Bot log should have details on whatever issue is triggering this.

Christian

Reply all
Reply to author
Forward
0 new messages