Docker
Docker copied to clipboard
Fresh docker image shows HTTP 500
Hi!
After getting fresh docker sources and running docker-compose build docker-compose up
and navigating to the url that should host cachet I see Internal Server Error Page.
My docker-compose.yml contenst are as follows:
version: "3"
services:
postgres:
image: postgres:9.5
volumes:
- /var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
restart: always
cachet:
build:
context: .
args:
- cachet_ver=v2.3.14
ports:
- 10080:8000
links:
- postgres:postgres
environment:
- DB_DRIVER=pgsql
- DB_HOST=postgres
- DB_PORT=5432
- DB_DATABASE=postgres
- DB_USERNAME=postgres
- DB_PASSWORD=postgres
- DB_PREFIX=chq_
- APP_KEY=base64:[actual key]
- APP_LOG=errorlog
- DEBUG=false
- MAIL_DRIVER=smtp
depends_on:
- postgres
restart: on-failure
In the logs the following is visible:
cachet_1 | [26-Apr-2018 09:30:14] WARNING: [pool www] child 128 said into stderr: "NOTICE: PHP message: [2018-04-26 09:30:14] development.CRITICAL: Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Too few arguments to function Illuminate\Support\Manager::createDriver(), 0 passed in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Manager.php on line 87 and exactly 1 expected in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Manager.php:77"
cachet_1 | [26-Apr-2018 09:30:14] WARNING: [pool www] child 128 said into stderr: "Stack trace:"
cachet_1 | [26-Apr-2018 09:30:14] WARNING: [pool www] child 128 said into stderr: "#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Manager.php(87): Illuminate\Support\Manager->createDriver()"
cachet_1 | [26-Apr-2018 09:30:14] WARNING: [pool www] child 128 said into stderr: "#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Manager.php(63): Illuminate\Support\Manager->createDriver('')"
cachet_1 | [26-Apr-2018 09:30:14] WARNING: [pool www] child 128 said into stderr: "#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(117): Illuminate\Support\Manager->driver()"
cachet_1 | [26-Apr-2018 09:30:14] WARNING: [pool www] child 128 said into stderr: "#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(100): Illuminate\Session\Middleware\StartSession->getSession(Object(Illuminate\Http\Request))"
cachet_1 | [26-Apr-2018 09:30:14] WARNING: [pool www] child 128 said into stderr: "#4 /var/www/html/vendor/la..."
cachet_1 | 2018/04/26 09:30:14 [error] 122#122: *1 FastCGI sent in stderr: "PHP message: [2018-04-26 09:30:14] development.CRITICAL: Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Too few arguments to function Illuminate\Support\Manager::createDriver(), 0 passed in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Manager.php on line 87 and exactly 1 expected in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Manager.php:77
cachet_1 | Stack trace:
cachet_1 | #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Manager.php(87): Illuminate\Support\Manager->createDriver()
cachet_1 | #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Manager.php(63): Illuminate\Support\Manager->createDriver('')
cachet_1 | #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(117): Illuminate\Support\Manager->driver()
cachet_1 | #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(100): Illuminate\Session\Middleware\StartSession->getSession(Object(Illuminate\Http\Request))
cachet_1 | #4 /var/www/html/vendor/laravel/fr" while reading response header from upstream, client: 172.18.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost:10080"
cachet_1 | 172.18.0.1 - - [26/Apr/2018:09:30:14 +0000] "GET / HTTP/1.1" 500 3177 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36" "-"
cachet_1 | [26-Apr-2018 09:30:14] WARNING: [pool www] child 128 said into stderr: "NOTICE: PHP message: [2018-04-26 09:30:14] development.CRITICAL: Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Too few arguments to function Illuminate\Support\Manager::createDriver(), 0 passed in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Manager.php on line 87 and exactly 1 expected in /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Manager.php:77"
cachet_1 | [26-Apr-2018 09:30:14] WARNING: [pool www] child 128 said into stderr: "Stack trace:"
cachet_1 | [26-Apr-2018 09:30:14] WARNING: [pool www] child 128 said into stderr: "#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Manager.php(87): Illuminate\Support\Manager->createDriver()"
cachet_1 | [26-Apr-2018 09:30:14] WARNING: [pool www] child 128 said into stderr: "#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Manager.php(63): Illuminate\Support\Manager->createDriver('')"
cachet_1 | [26-Apr-2018 09:30:14] WARNING: [pool www] child 128 said into stderr: "#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(245): Illuminate\Support\Manager->driver()"
cachet_1 | [26-Apr-2018 09:30:14] WARNING: [pool www] child 128 said into stderr: "#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(87): Illuminate\Session\Middleware\StartSession->usingCookieSessions()"
cachet_1 | [26-Apr-2018 09:30:14] WARNING: [pool www] child 128 said into stderr: "#4 /var/www/html/vendor/laravel/framework/src/Ill..."
I can easily reproduce this issue
I got around this using v2.3.14
by setting the SESSION_DRIVER
in docker-compose.yml
to apc
and running docker-compose up
again e.g.
- APP_LOG=errorlog
- DEBUG=true
- SESSION_DRIVER=apc
depends_on:
- postgres
restart: on-failure
I suppose the default in entrypoint.sh
would make more sense, I'll get a PR in for it.