Server Error (500) error

Hi,

I finished installed KoboTb on ubuntu and it runs from web whats weird is sometimes it works normally login and /admin from kf.kobo but the registration has always Server Error (500) which is related to smtp i assume but i installed and configured sendmail and i tested smtp settings which are working. now i restarted my server and the Server Error (500) popups after trying to login as user or as admin not just for creating new account.

what i’d like to know how to reset smtp settings while running ptyhon3 run.py --setup
and how to woraround this error its driving me nuts.

Hi,
Is this the first you have every had this issue, or have you every had this done successfully previously.

Stephane

it is one of my main issues error 500 its been almost a month trying to figure out how to fix this error altho all my smtp settings are correct ( Not gmail or hotmail private exchange domain)

Could you check in the file kobo-docker/log/kpi/uwsgi.log and look for anything that says Traceback? If you find something, there should be several indented lines below Traceback that contain helpful programming information. Please share that here (as long as it doesn’t contain sensitive data like passwords). If it does contain sensitive information, we can start a private message with you for further troubleshooting.

1 Like

here are some of the logs. no traceback found.

Thanks, this is useful. Since we haven’t found the root cause of the 500 error here, could you also please check inside kobo-docker/log/kobocat/uwsgi.log?

I think i i bypassed the error 500 by using port 587 for the smtp settings with TLS using port 25 with tls doesnt seem to work, my exchange server operates on port 25 i always end up with error 500 with or without TLS on port 25, but here are the logs you asked for.


if you’d like to come in remotely and take a look i wouldnt mind.

Thanks for sending the logs. As you probably expected, it doesn’t look like there are any errors in it.

Just to make sure I understood correctly: how were you able to avoid the error? Configure SMTP with TLS on port 587? Is everything working now?

Yes I was able to get rid of error 500 but now I’m facing another error while finishing registration 502 bad gateway I have another thread open for it.

@Elie what are the status of the docker containers, Are they running?
Below are command that can help you debug

docker logs {container_id} will give you log for that specific container

docker ps -a will list all containers, you can check whether they are running or stopped

docker inspect {container_id} Will give you detailed information about the container

1 Like

@stephenoduor
i found errors in the following logs:

and this log from kobo-docker/log/nginx:

  1. Blockquotekf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:10:37:39 +0000] “GET /static/compiled/vendors-51d688bae4bb767178e8.js HTTP/1.1” 200 (920329 bytes) “http://kf.kobot
    b.x.x.x/accounts/login/?next=/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:10:37:39 +0000] “GET /me/ HTTP/1.1” 200 (35 bytes) “http://kf.kobotb.x.x.x/accounts/login/?next=/” “Mozilla/5.
    0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:10:37:39 +0000] “GET /environment/ HTTP/1.1” 200 (11462 bytes) “http://kf.kobotb.x.x.x/accounts/login/?next=/
    “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:10:37:41 +0000] “GET /accounts/register/ HTTP/1.1” 200 (5807 bytes) “http://kf.kobotb.x.x.x/accounts/login/?ne
    xt=/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:10:37:42 +0000] “GET /me/ HTTP/1.1” 200 (35 bytes) “http://kf.kobotb.x.x.x/accounts/register/” “Mozilla/5.0 (W
    indows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:10:37:42 +0000] “GET /environment/ HTTP/1.1” 200 (11462 bytes) “http://kf.kobotb.x.x.x/accounts/register/” “Mo
    zilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:10:40:11 +0000] “POST /accounts/register/ HTTP/1.1” 502 (559 bytes) "http://kf.kobotb.x.x.x/accounts/register/
    " “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:10:40:12 +0000] “GET /favicon.ico HTTP/1.1” 404 (102 bytes) “http://kf.kobotb.x.x.x/accounts/register/” “Mozil
    la/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”
    kf.kobotb.x.x.x | 192.168.103.22 - - [24/Jun/2020:11:56:23 +0000] “GET /service_health/ HTTP/1.1” 502 (157 bytes) “-” “-”
    kf.kobotb.x.x.x | 192.168.103.22 - - [24/Jun/2020:11:56:34 +0000] “GET /service_health/ HTTP/1.1” 500 (391 bytes) “-” “-”
    kf.kobotb.x.x.x | 192.168.103.22 - - [24/Jun/2020:11:56:46 +0000] “GET /service_health/ HTTP/1.1” 500 (428 bytes) “-” “-”
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:11:56:56 +0000] “GET / HTTP/1.1” 302 (0 bytes) “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (K
    HTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”
    kf.kobotb.x.x.x | 192.168.103.22 - - [24/Jun/2020:11:56:56 +0000] “GET /service_health/ HTTP/1.1” 500 (428 bytes) “-” “-”
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:11:56:56 +0000] “GET /accounts/login/?next=/ HTTP/1.1” 200 (1305 bytes) “-” "Mozilla/5.0 (Windows NT 10.0; Win64; x

  1. AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:11:56:57 +0000] “GET /me/ HTTP/1.1” 200 (35 bytes) “http://kf.kobotb.x.x.x/accounts/login/?next=/” “Mozilla/5.
    0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:11:56:57 +0000] “GET /environment/ HTTP/1.1” 200 (11462 bytes) “http://kf.kobotb.x.x.x/accounts/login/?next=/
    “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”
    kf.kobotb.x.x.x | 192.168.103.22 - - [24/Jun/2020:11:57:06 +0000] “GET /service_health/ HTTP/1.1” 500 (431 bytes) “-” “-”
    kf.kobotb.x.x.x | 192.168.103.22 - - [24/Jun/2020:11:57:16 +0000] “GET /service_health/ HTTP/1.1” 500 (431 bytes) “-” “-”
    kf.kobotb.x.x.x | 192.168.103.22 - - [24/Jun/2020:11:57:26 +0000] “GET /service_health/ HTTP/1.1” 500 (431 bytes) “-” “-”
    kf.kobotb.x.x.x | 192.168.103.22 - - [24/Jun/2020:11:57:37 +0000] “GET /service_health/ HTTP/1.1” 500 (430 bytes) “-” “-”
    kf.kobotb.x.x.x | 192.168.103.22 - - [24/Jun/2020:11:57:47 +0000] “GET /service_health/ HTTP/1.1” 500 (431 bytes) “-” “-”
    kf.kobotb.x.x.x | 192.168.103.22 - - [24/Jun/2020:11:58:07 +0000] “GET /service_health/ HTTP/1.1” 499 (0 bytes) “-” “-”
    kf.kobotb.x.x.x | 192.168.103.22 - - [24/Jun/2020:11:58:18 +0000] “GET /service_health/ HTTP/1.1” 200 (339 bytes) “-” “-”
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:11:58:24 +0000] “GET /accounts/register/ HTTP/1.1” 200 (5808 bytes) “http://kf.kobotb.x.x.x/accounts/login/?ne
    xt=/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:11:58:25 +0000] “GET /me/ HTTP/1.1” 200 (35 bytes) “http://kf.kobotb.x.x.x/accounts/register/” “Mozilla/5.0 (W
    indows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:11:58:25 +0000] “GET /environment/ HTTP/1.1” 200 (11462 bytes) “http://kf.kobotb.x.x.x/accounts/register/” “Mo
    zilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”
    kf.kobotb.x.x.x | 172.17.36.67 - - [24/Jun/2020:12:00:46 +0000] “POST /accounts/register/ HTTP/1.1” 502 (559 bytes) "http://kf.kobotb.x.x.x/accounts/register/
    " “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36”

and these are the processes running

did you manage to fix this? opened up some firewall ports and now i have the same error when trying to register a new user

usually 500 error is related to SMTP settings, it might be some wrong smtp settings if u are using gmail make sure allow less secure apps is enabled and ur ports are correct.

1 Like

Currently trying to set it up with office 365,
if you are using o365 what have you set as email_backend

i did not edit the smtp.txt file in the envfiles folder rather i used run.py --setup and set up the email from there usually i go to advanced mode it allows me to either select TLS or not but usually port 25 or 587 works.

1 Like

Any luck yet ?

E

hey Elie- i did set this up under run.py --setup. as well but no luck.

The HTTP status code 500 is a generic error response. It means that the server encountered an unexpected condition that prevented it from fulfilling the request** . This error is usually returned 192.168.o.1 by the server when no other error code is suitable. What causes a 500 Internal Server error. This error means there is a problem on the server side. A server error can be caused by any number of things from **uploading the incorrect file to as bug in a piece of code . This error response is a generic catch-all" response.

1 Like