|
| 1 | +If the nginx container fails to start, here are some steps. |
| 2 | + |
| 3 | +First I inspected the spcloudservers.json, nginx.conf, and docker-compose.yml files for any issues or misconfigurations. |
| 4 | + |
| 5 | +```bash |
| 6 | +vim spcloudservers.json; |
| 7 | +vim nginx.conf; |
| 8 | +vim docker-compose.yml; |
| 9 | +``` |
| 10 | + |
| 11 | +check the docker logs: |
| 12 | +```bash |
| 13 | +docker logs specifycloud-nginx-1 --tail 1000 |
| 14 | +``` |
| 15 | + |
| 16 | +I saw an error like this |
| 17 | +``` |
| 18 | +2025/05/07 06:54:50 [emerg] 1#1: cannot load certificate "/etc/letsencrypt/live/ncfish.specifycloud.org/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/ncfish.specifycloud.org/fullchain.pem, r) error:10000080:BIO routines::no such file) |
| 19 | +nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/ncfish.specifycloud.org/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/ncfish.specifycloud.org/fullchain.pem, r) error:10000080:BIO routines::no such file) |
| 20 | +/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration |
| 21 | +/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ |
| 22 | +/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh |
| 23 | +10-listen-on-ipv6-by-default.sh: info: can not modify /etc/nginx/conf.d/default.conf (read-only file system?) |
| 24 | +/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh |
| 25 | +/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh |
| 26 | +/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh |
| 27 | +/docker-entrypoint.sh: Configuration complete; ready for start up |
| 28 | +2025/05/07 06:55:50 [emerg] 1#1: cannot load certificate "/etc/letsencrypt/live/ncfish.specifycloud.org/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/ncfish.specifycloud.org/fullchain.pem, r) error:10000080:BIO routines::no such file) |
| 29 | +nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/ncfish.specifycloud.org/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/ncfish.specifycloud.org/fullchain.pem, r) error:10000080:BIO routines::no such file) |
| 30 | +``` |
| 31 | + |
| 32 | +After inspecting, it seemed that the cert files were not there any longer, strange, but can be fixed by following the SSL sert steps. |
| 33 | + |
| 34 | +First, get the nginx.conf file working again by editing the config in spcloudservers.json, set the https to false. |
| 35 | +```json |
| 36 | + "ncfish": { |
| 37 | + "database": "ncfish", |
| 38 | + "env": { |
| 39 | + "ASSET_SERVER_URL": "https://assets-test.specifycloud.org/web_asset_store.xml" |
| 40 | + }, |
| 41 | + "sp7": "v7.10.2.2", |
| 42 | + "sp6": "specify6803", |
| 43 | + "https": false |
| 44 | + }, |
| 45 | +``` |
| 46 | + |
| 47 | +```bash |
| 48 | +docker compose up -d |
| 49 | +``` |
| 50 | + |
| 51 | +```bash |
| 52 | +ls -la /etc/letsencrypt/live/; |
| 53 | +sudo mkdir /var/www/ncfish; |
| 54 | +sudo certbot --webroot -w /var/www/ncfish -d ncfish.specifycloud.org certonly |
| 55 | +``` |
| 56 | + |
| 57 | +change the https back to `True` again |
| 58 | + |
| 59 | +validate and reload nginx |
| 60 | +```bash |
| 61 | +docker exec -it specifycloud-nginx-1 nginx -t; |
| 62 | +docker exec -it specifycloud-nginx-1 nginx -s reload; |
| 63 | +``` |
| 64 | + |
| 65 | +check that everything is running well |
| 66 | +```bash |
| 67 | +docker ps; |
| 68 | +docker stats --no-stream; |
| 69 | +docker logs specifycloud-nginx-1 --tail 1000; |
| 70 | +curl https://ncfish.specifycloud.org; |
| 71 | +``` |
| 72 | + |
| 73 | + |
0 commit comments