forms-worker crashed #31

Closed
opened 3 years ago by max.mehl · 8 comments
max.mehl commented 3 years ago
Owner

By chance I noticed that forms-worker crashed 5 days ago. forms-redis and forms-web continued to work but no confirmation mails have been sent out.

Logfile forms-worker: link

Log forms-web:

WARNING: Error loading config file:/root/.docker/config.json - stat /root/.docker/config.json: permission denied
[2019-03-13 16:05:50 +0000] [6] [INFO] Starting gunicorn 19.7.1
[2019-03-13 16:05:50 +0000] [6] [INFO] Listening at: http://0.0.0.0:8080 (6)
[2019-03-13 16:05:50 +0000] [6] [INFO] Using worker: sync
[2019-03-13 16:05:50 +0000] [9] [INFO] Booting worker with pid: 9
Traceback (most recent call last):
  File "/usr/local/bin/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/usr/local/bin/bottle.py", line 1740, in wrapper
    rv = callback(*a, **ka)
  File "/var/share/forms/src/web/controller.py", line 11, in wrapper
    return func(*args, **kwargs)
  File "/var/share/forms/src/web/controller.py", line 50, in confirmation
    config = SenderService.confirm_email(id)
  File "/var/share/forms/src/common/services/SenderService.py", line 40, in confirm_email
    id = uuid.UUID(id)
  File "/usr/local/lib/python3.6/uuid.py", line 140, in __init__
    raise ValueError('badly formed hexadecimal UUID string')
ValueError: badly formed hexadecimal UUID string
[2019-03-20 23:15:36 +0000] [6] [INFO] Starting gunicorn 19.7.1
[2019-03-20 23:15:36 +0000] [6] [INFO] Listening at: http://0.0.0.0:8080 (6)
[2019-03-20 23:15:36 +0000] [6] [INFO] Using worker: sync
[2019-03-20 23:15:36 +0000] [9] [INFO] Booting worker with pid: 9
By chance I noticed that forms-worker crashed 5 days ago. forms-redis and forms-web continued to work but no confirmation mails have been sent out. Logfile forms-worker: [link](https://p.mehl.mx/?0765fe7253e93ed8#KXK8tHZ52zndKVsAasIpnb19EpDos+PyLpkGbDdRPRo=) Log forms-web: ``` WARNING: Error loading config file:/root/.docker/config.json - stat /root/.docker/config.json: permission denied [2019-03-13 16:05:50 +0000] [6] [INFO] Starting gunicorn 19.7.1 [2019-03-13 16:05:50 +0000] [6] [INFO] Listening at: http://0.0.0.0:8080 (6) [2019-03-13 16:05:50 +0000] [6] [INFO] Using worker: sync [2019-03-13 16:05:50 +0000] [9] [INFO] Booting worker with pid: 9 Traceback (most recent call last): File "/usr/local/bin/bottle.py", line 862, in _handle return route.call(**args) File "/usr/local/bin/bottle.py", line 1740, in wrapper rv = callback(*a, **ka) File "/var/share/forms/src/web/controller.py", line 11, in wrapper return func(*args, **kwargs) File "/var/share/forms/src/web/controller.py", line 50, in confirmation config = SenderService.confirm_email(id) File "/var/share/forms/src/common/services/SenderService.py", line 40, in confirm_email id = uuid.UUID(id) File "/usr/local/lib/python3.6/uuid.py", line 140, in __init__ raise ValueError('badly formed hexadecimal UUID string') ValueError: badly formed hexadecimal UUID string [2019-03-20 23:15:36 +0000] [6] [INFO] Starting gunicorn 19.7.1 [2019-03-20 23:15:36 +0000] [6] [INFO] Listening at: http://0.0.0.0:8080 (6) [2019-03-20 23:15:36 +0000] [6] [INFO] Using worker: sync [2019-03-20 23:15:36 +0000] [9] [INFO] Booting worker with pid: 9 ```
max.mehl added the
bug
label 3 years ago
Collaborator

Hi Max,

What's the last commit push in production before this error ?

Hi Max, What's the last commit push in production before this error ?
Collaborator

In the forms-worker we can see a problem about the data that come from Redis.
In the code, there aren't security if the data that come from the Redis is None.
So, in this special case, we try to use a property of None and there a bug.

First, I will proposed a fix for this problem. If the object is None, we write a error in the log. I don't think that we can do more..

Second, I will catch error from bad uuid. I think this error come with someone that modify the id of /confirm?id= url manually.

In the forms-worker we can see a problem about the data that come from Redis. In the code, there aren't security if the data that come from the Redis is `None`. So, in this special case, we try to use a property of `None` and there a bug. First, I will proposed a fix for this problem. If the object is `None`, we write a error in the log. I don't think that we can do more.. Second, I will catch error from bad uuid. I think this error come with someone that modify the id of `/confirm?id=` url manually.
Poster
Owner

Okay, sounds good, thanks!

Okay, sounds good, thanks!
Poster
Owner

Closed with #32

Closed with #32
max.mehl closed this issue 3 years ago
Poster
Owner

I had to revert #32. When signing up to the pmpc application for example, I received an internal server error. Funnily, the email has been sent correctly, and also the confirmation seems to work.

Ways to reproduce with the local docker env:

  1. On publiccode.eu, replace https://forms.fsfe.org/email in the signup form with the IP and port of the locally running instance.
  2. Fill in the form, submit, and see the error.
  3. Check in the fake smtp that the email has been sent correctly.
I had to revert #32. When signing up to the pmpc application for example, I received an internal server error. Funnily, the email has been sent correctly, and also the confirmation seems to work. Ways to reproduce with the local docker env: 1. On publiccode.eu, replace `https://forms.fsfe.org/email` in the signup form with the IP and port of the locally running instance. 2. Fill in the form, submit, and see the error. 3. Check in the fake smtp that the email has been sent correctly.
max.mehl reopened this issue 3 years ago
Collaborator

My bad! It's a really stupid error...

For more information https://bottlepy.org/docs/dev/tutorial.html#http-errors-and-redirects.

Sorry for the lost of time. I push a fix.

My bad! It's a really stupid error... For more information https://bottlepy.org/docs/dev/tutorial.html#http-errors-and-redirects. Sorry for the lost of time. I push a fix.
Collaborator

@max.mehl, the fix was pushed on #34 :)

@max.mehl, the fix was pushed on https://git.fsfe.org/fsfe-system-hackers/forms/pulls/34 :)
Poster
Owner

Thanks, #34 did the trick! :)

Thanks, #34 did the trick! :)
max.mehl closed this issue 3 years ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.