jurra / rockin-webapp

A simple data entry webapp to enter rock sample data from wells drilled at TU Delft
MIT License
0 stars 0 forks source link

Server setup failing #2

Closed jurra closed 1 year ago

jurra commented 1 year ago

Not able to reproduce the example we made in the ./services/composetest folder in our server, for the new django app located at ./services/rockin_webapp.git

So far I have managed to build the image without issues and make services run, but I am getting a bad gateway issue: To reproduce the error you can go in the server to branch setup/server-setup and run docker-compose up Current behavior: This is my docker log:

rocky@gsedata:~/services/rockin_webapp.git$ docker-compose up
WARNING: The ACME_KID variable is not set. Defaulting to a blank string.
WARNING: The ACME_HMAC variable is not set. Defaulting to a blank string.
Starting rockin_webappgit_db_1    ... done
Starting rockin_webappgit_redis_1 ... done
Recreating rockin_webappgit_web_1 ... done
Recreating rockin_webappgit_nginx_1 ... done
Recreating rockin_webappgit_certbot_1 ... done
Attaching to rockin_webappgit_redis_1, rockin_webappgit_db_1, rockin_webappgit_web_1, rockin_webappgit_nginx_1, rockin_webappgit_certbot_1
nginx_1    | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx_1    | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx_1    | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx_1    | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
nginx_1    | 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
nginx_1    | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx_1    | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx_1    | /docker-entrypoint.sh: Configuration complete; ready for start up
redis_1    | 1:C 05 Jul 2023 14:05:02.122 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1    | 1:C 05 Jul 2023 14:05:02.122 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1    | 1:C 05 Jul 2023 14:05:02.122 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1    | 1:M 05 Jul 2023 14:05:02.123 * monotonic clock: POSIX clock_gettime
redis_1    | 1:M 05 Jul 2023 14:05:02.125 * Running mode=standalone, port=6379.
redis_1    | 1:M 05 Jul 2023 14:05:02.125 # Server initialized
redis_1    | 1:M 05 Jul 2023 14:05:02.125 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1    | 1:M 05 Jul 2023 14:05:02.126 * Loading RDB produced by version 7.0.11
redis_1    | 1:M 05 Jul 2023 14:05:02.126 * RDB age 197 seconds
redis_1    | 1:M 05 Jul 2023 14:05:02.126 * RDB memory usage when created 0.82 Mb
redis_1    | 1:M 05 Jul 2023 14:05:02.126 * Done loading RDB, keys loaded: 0, keys expired: 0.
redis_1    | 1:M 05 Jul 2023 14:05:02.126 * DB loaded from disk: 0.000 seconds
redis_1    | 1:M 05 Jul 2023 14:05:02.126 * Ready to accept connections
db_1       | 2023-07-05 14:05:02+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.42-1.el7 started.
web_1      | Watching for file changes with StatReloader
db_1       | 2023-07-05 14:05:02+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db_1       | 2023-07-05 14:05:02+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.42-1.el7 started.
db_1       | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
db_1       | 2023-07-05T14:05:03.751168Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
db_1       | 2023-07-05T14:05:03.757270Z 0 [Note] mysqld (mysqld 5.7.42) starting as process 1 ...
db_1       | 2023-07-05T14:05:03.765428Z 0 [Note] InnoDB: PUNCH HOLE support available
db_1       | 2023-07-05T14:05:03.765596Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1       | 2023-07-05T14:05:03.765668Z 0 [Note] InnoDB: Uses event mutexes
db_1       | 2023-07-05T14:05:03.765746Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
db_1       | 2023-07-05T14:05:03.765817Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
db_1       | 2023-07-05T14:05:03.765894Z 0 [Note] InnoDB: Using Linux native AIO
db_1       | 2023-07-05T14:05:03.766264Z 0 [Note] InnoDB: Number of pools: 1
db_1       | 2023-07-05T14:05:03.766504Z 0 [Note] InnoDB: Using CPU crc32 instructions
db_1       | 2023-07-05T14:05:03.775527Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
db_1       | 2023-07-05T14:05:03.790645Z 0 [Note] InnoDB: Completed initialization of buffer pool
db_1       | 2023-07-05T14:05:03.798717Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1       | 2023-07-05T14:05:03.813760Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
db_1       | 2023-07-05T14:05:03.831730Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
db_1       | 2023-07-05T14:05:03.832812Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
db_1       | 2023-07-05T14:05:03.878513Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
db_1       | 2023-07-05T14:05:03.879259Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
db_1       | 2023-07-05T14:05:03.879269Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
db_1       | 2023-07-05T14:05:03.879507Z 0 [Note] InnoDB: Waiting for purge to start
db_1       | 2023-07-05T14:05:03.929671Z 0 [Note] InnoDB: 5.7.42 started; log sequence number 12217902
db_1       | 2023-07-05T14:05:03.929844Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db_1       | 2023-07-05T14:05:03.929997Z 0 [Note] Plugin 'FEDERATED' is disabled.
db_1       | 2023-07-05T14:05:03.931819Z 0 [Note] InnoDB: Buffer pool(s) load completed at 230705 14:05:03
db_1       | 2023-07-05T14:05:03.994114Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
db_1       | 2023-07-05T14:05:03.994130Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
db_1       | 2023-07-05T14:05:03.994135Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
db_1       | 2023-07-05T14:05:03.994137Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
db_1       | 2023-07-05T14:05:04.001550Z 0 [Warning] CA certificate ca.pem is self signed.
db_1       | 2023-07-05T14:05:04.001957Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
db_1       | 2023-07-05T14:05:04.004446Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
db_1       | 2023-07-05T14:05:04.010900Z 0 [Note] IPv6 is available.
db_1       | 2023-07-05T14:05:04.011035Z 0 [Note]   - '::' resolves to '::';
db_1       | 2023-07-05T14:05:04.011806Z 0 [Note] Server socket created on IP: '::'.
db_1       | 2023-07-05T14:05:04.023246Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
db_1       | 2023-07-05T14:05:04.070464Z 0 [Note] Event Scheduler: Loaded 0 events
db_1       | 2023-07-05T14:05:04.076720Z 0 [Note] mysqld: ready for connections.
db_1       | Version: '5.7.42'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
certbot_1  | usage: 
certbot_1  |   certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...
certbot_1  | 
certbot_1  | Certbot can obtain and install HTTPS/TLS/SSL certificates.  By default,
certbot_1  | it will attempt to use a webserver both for obtaining and installing the
certbot_1  | certificate. 
certbot_1  | certbot: error: argument --eab-kid: expected one argument
rockin_webappgit_certbot_1 exited with code 2
nginx_1    | 2023/07/05 14:05:34 [error] 29#29: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 145.94.187.251, server: , request: "GET / HTTP/2.0", upstream: "http://172.20.0.4:5000/", host: "gsedata.citg.tudelft.nl"
nginx_1    | 145.94.187.251 - - [05/Jul/2023:14:05:34 +0000] "GET / HTTP/2.0" 502 559 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
nginx_1    | 2023/07/05 14:05:34 [error] 29#29: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 145.94.187.251, server: , request: "GET /favicon.ico HTTP/2.0", upstream: "http://172.20.0.4:5000/favicon.ico", host: "gsedata.citg.tudelft.nl", referrer: "https://gsedata.citg.tudelft.nl/"
nginx_1    | 145.94.187.251 - - [05/Jul/2023:14:05:34 +0000] "GET /favicon.ico HTTP/2.0" 502 559 "https://gsedata.citg.tudelft.nl/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
nginx_1    | 2023/07/05 14:06:01 [error] 29#29: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 145.94.187.251, server: , request: "GET / HTTP/2.0", upstream: "http://172.20.0.4:5000/", host: "gsedata.citg.tudelft.nl"
nginx_1    | 145.94.187.251 - - [05/Jul/2023:14:06:01 +0000] "GET / HTTP/2.0" 502 559 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
nginx_1    | 2023/07/05 14:06:01 [error] 29#29: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 145.94.187.251, server: , request: "GET /favicon.ico HTTP/2.0", upstream: "http://172.20.0.4:5000/favicon.ico", host: "gsedata.citg.tudelft.nl", referrer: "https://gsedata.citg.tudelft.nl/"
nginx_1    | 145.94.187.251 - - [05/Jul/2023:14:06:01 +0000] "GET /favicon.ico HTTP/2.0" 502 559 "https://gsedata.citg.tudelft.nl/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
^CGracefully stopping... (press Ctrl+C again to force)