Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker image doesn't work : The server returned a "500 Internal Server Error". #24

Closed
cyberius0 opened this issue Jul 21, 2022 · 2 comments

Comments

@cyberius0
Copy link

Hello,
I created a docker-compose.yml with this content:


version: '3'
services:
  kyela:
    image: abienvenu/kyela
    container_name: kyela
    restart: unless-stopped
    ports:
      - 8042:80
    volumes:
      - ./kyela-data:/var/www/kyela/data
    environment:
      - APP_ENV=prod
      - APP_SECRET=mypassword

I use SWAG to forward my subdomain to Kyela (e.g. polls.mydomain.com).

This works - Kyela opens where I can choose between languages on top, I can click on "FAQ" or "About". But when I click on "Create new poll" then I get this error:

"Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused. "

sudo docker logs kyela doesn't show any error message, only this:

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.2. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.2. Set the 'ServerName' directive globally to suppress this message
[Thu Jul 21 20:08:34.820640 2022] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.25 (Debian) PHP/7.3.3 configured -- resuming normal operations
[Thu Jul 21 20:08:34.822056 2022] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
172.20.0.3 - - [21/Jul/2022:20:08:42 +0000] "GET / HTTP/1.1" 200 1949 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0"
172.20.0.3 - - [21/Jul/2022:20:09:01 +0000] "GET /static/switch/de HTTP/1.1" 302 733 "https://poll.mydomain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0"
172.20.0.3 - - [21/Jul/2022:20:09:01 +0000] "GET / HTTP/1.1" 200 1968 "https://poll.mydomain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0"
172.20.0.3 - - [21/Jul/2022:20:09:20 +0000] "GET /static/switch/en HTTP/1.1" 302 659 "https://poll.mydomain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0"
172.20.0.3 - - [21/Jul/2022:20:09:20 +0000] "GET / HTTP/1.1" 200 1917 "https://poll.mydomain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0"

What can I do next to find the cause of the error?

@abienvenu
Copy link
Owner

Hello cyberius,

Thank you for your interest in Kyélà.

You can find detailed logs inside the container :
docker exec -it kyela cat /var/www/kyela/var/log/prod.log

As the problem occurs when you try to create a new poll, it is probably a write permission problem.

I am not sure whether you intentionally mounted a volume directory. You could try this modified docker-compose :

version: '3'
services:
  kyela:
    image: abienvenu/kyela
    container_name: kyela
    restart: unless-stopped
    ports:
      - 8042:80
    volumes:
      - kyela-data:/var/www/kyela/data
    environment:
      - APP_ENV=prod
      - APP_SECRET=mypassword

volumes:
        kyela-data:

Have a nice day!

@cyberius0
Copy link
Author

Hello cyberius,

Thank you for your interest in Kyélà.

You can find detailed logs inside the container : docker exec -it kyela cat /var/www/kyela/var/log/prod.log

As the problem occurs when you try to create a new poll, it is probably a write permission problem.

I am not sure whether you intentionally mounted a volume directory. You could try this modified docker-compose :

version: '3'
services:
  kyela:
    image: abienvenu/kyela
    container_name: kyela
    restart: unless-stopped
    ports:
      - 8042:80
    volumes:
      - kyela-data:/var/www/kyela/data
    environment:
      - APP_ENV=prod
      - APP_SECRET=mypassword

volumes:
        kyela-data:

Have a nice day!

This one worked. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants