Giter Club home page Giter Club logo

learninglocker2-docker's People

Contributors

michzimny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

learninglocker2-docker's Issues

Conflict with other dockers on the same vps machine

Hello everyone,

Let's say that in my example, my VPS IP address is 10.11.12.13.

I have multiple dockers running on my VPS machine and one docker uses port 80 already.
They all use different ports so I can access each docker app like that: 10.11.12.13:{port}
When I run learninglocker2-docker with docker-compose, it seems that it's expecting to run on port 80, so I cannot access like that 10.11.12.13:3000.
If it's possible, how do I change the config?

Much thanks in advance!

What is the DOCKER_TAG variable advantage?

I'm asking it because in docker-compose.yml I could create the image this way:

    api:
        build:
          context: ./app/
        environment:
            - DOMAIN_NAME
            - APP_SECRET
            - SMTP_HOST
            - SMTP_PORT
            - SMTP_SECURED
            - SMTP_USER
            - SMTP_PASS
        command: "node api/dist/server"
        restart: unless-stopped
        depends_on:
            - mongo
            - redis
        volumes:
            - "${DATA_LOCATION}/app-storage:/opt/learninglocker/storage"

Best

pm2

Forks of this repository are installing npm install -g pm2, and this repo is not. Needed?

Error: ENOENT: no such file or directory, open '.env'

Hi MichaΕ‚, I am learning to use your code and I got two issues.

  1. when I run ./build-dev.sh. there are some errors:
    { Error: ENOENT: no such file or directory, open '.env'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at Object.config (/opt/learninglocker/node_modules/dotenv/lib/main.js:30:37)
    at /opt/learninglocker/node_modules/dotenv/config.js:10:25
    at Object. (/opt/learninglocker/node_modules/dotenv/config.js:11:3)
    at Module._compile (module.js:653:30)
    at Module._extensions..js (module.js:664:10)
    at Object.require.extensions.(anonymous function) [as .js] (/opt/learninglocker/node_modules/babel-register/lib/node.js:152:7)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12) errno: -2, code: 'ENOENT', syscall: 'open', path: '.env' }
  2. After I run docker-compose up -d
    learninglocker2docker_nginx_1, learninglocker2docker_ui_1,learninglocker2docker_api_1 and learninglocker2docker_worker_1 were keep restarting loop.

Do you know how to fix this? thanks a lot.

EXPRESS_PORT setting in xapi-service

The xapi-service image has setting EXPRESS_PORT that should, most probably, point at the api endpoint. In this repository, that setting is not used and it might cause xapi being unable to talk to api. However, no side effects have been observed so far.

Mongo connection errors and cannot log in

Hello,
Thanks for setting up this repo. I tried it last night and it had some issues that I'm not sure how to resolve, seems to be due to communication problems with MongoDB.

From the output after docker-compose up:

xapi_1    | 2019-05-08 06:40:26:003 - info: Listening on port 8081
xapi_1    | 2019-05-08 06:40:26:273 - error: Failed Mongo connection: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.24.0.3:27017]
xapi_1    | 2019-05-08 06:40:26:289 - info: Starting retry 1 in 1000ms
xapi_1    | 2019-05-08 06:40:27:408 - error: Failed Mongo connection: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.24.0.3:27017]
xapi_1    | 2019-05-08 06:40:27:409 - info: Starting retry 2 in 1000ms
xapi_1    | 2019-05-08 06:40:28:419 - error: Failed Mongo connection: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.24.0.3:27017]
xapi_1    | 2019-05-08 06:40:28:419 - info: Starting retry 3 in 1000ms
xapi_1    | 2019-05-08 06:40:29:438 - error: Failed Mongo connection: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.24.0.3:27017]
xapi_1    | 2019-05-08 06:40:29:442 - error: Failed initial mongo connection: Too many retries
ui_1      | 2019-05-08 06:40:30:920 - info: 
ui_1      |  --- 
ui_1      |  ==> βœ…  Learning Locker is running, talking to API server on 8080. 
ui_1      |  ==> πŸ’»  Open http://localhost in a browser to view the app. 
ui_1      |  --- 
ui_1      | 
ui_1      | { MongoNetworkError: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.24.0.3:27017]
ui_1      |     at Pool.<anonymous> (/opt/learninglocker/node_modules/mongodb-core/lib/topologies/server.js:564:11)
ui_1      |     at emitOne (events.js:116:13)
ui_1      |     at Pool.emit (events.js:211:7)
ui_1      |     at Connection.<anonymous> (/opt/learninglocker/node_modules/mongodb-core/lib/connection/pool.js:317:12)
ui_1      |     at Object.onceWrapper (events.js:317:30)
ui_1      |     at emitTwo (events.js:126:13)
ui_1      |     at Connection.emit (events.js:214:7)
ui_1      |     at Socket.<anonymous> (/opt/learninglocker/node_modules/mongodb-core/lib/connection/connection.js:246:50)
ui_1      |     at Object.onceWrapper (events.js:315:30)
ui_1      |     at emitOne (events.js:116:13)
ui_1      |     at Socket.emit (events.js:211:7)
ui_1      |     at emitErrorNT (internal/streams/destroy.js:66:8)
ui_1      |     at _combinedTickCallback (internal/process/next_tick.js:139:11)
ui_1      |     at process._tickDomainCallback (internal/process/next_tick.js:219:9)
ui_1      |   name: 'MongoNetworkError',
ui_1      |   errorLabels: [ 'TransientTransactionError' ],
ui_1      |   [Symbol(mongoErrorContextSymbol)]: {} }

It seems like those are all happening before MongoDB has a chance to start up. Further down there is output from Mongo indicating that it is starting up

mongo_1   | 2019-05-08T06:40:33.832+0000 I CONTROL  [initandlisten] 
mongo_1   | 2019-05-08T06:40:33.832+0000 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
mongo_1   | 2019-05-08T06:40:33.832+0000 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
mongo_1   | 2019-05-08T06:40:33.832+0000 I CONTROL  [initandlisten] 
mongo_1   | 2019-05-08T06:40:33.860+0000 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
mongo_1   | 2019-05-08T06:40:33.897+0000 I INDEX    [initandlisten] build index on: admin.system.version properties: { v: 2, key: { version: 1 }, name: "incompatible_with_version_32", ns: "admin.system.version" }
mongo_1   | 2019-05-08T06:40:33.897+0000 I INDEX    [initandlisten] 	 building index using bulk method; build may temporarily use up to 500 megabytes of RAM
mongo_1   | 2019-05-08T06:40:33.905+0000 I INDEX    [initandlisten] build index done.  scanned 0 total records. 0 secs
mongo_1   | 2019-05-08T06:40:33.911+0000 I COMMAND  [initandlisten] setting featureCompatibilityVersion to 3.4
mongo_1   | 2019-05-08T06:40:33.913+0000 I NETWORK  [thread1] waiting for connections on port 27017
mongo_1   | 2019-05-08T06:40:34.346+0000 I NETWORK  [thread1] connection accepted from 172.24.0.4:57082 #1 (1 connection now open)
mongo_1   | 2019-05-08T06:40:34.500+0000 I NETWORK  [thread1] connection accepted from 172.24.0.4:57084 #2 (2 connections now open)
mongo_1   | 2019-05-08T06:40:34.505+0000 I NETWORK  [thread1] connection accepted from 172.24.0.4:57086 #3 (3 connections now open)
mongo_1   | 2019-05-08T06:40:34.505+0000 I NETWORK  [thread1] connection accepted from 172.24.0.4:57088 #4 (4 connections now open)

and there is various output after that which looks like LearningLockers is talking to it setting up entries in the database.

The first time I started it, I was able to browse to the login screen, but trying to log in was met with a long pause and

Unable to connect to "/api/auth/jwt/password" 

which is in their issue tracker as a closed issue. It seems like the problem was that mongo was being started to late and that it was resolved by making sure to start mongo earlier.

I tried a second time, shutting down and running docker-compose up again and things went a bit differently, now trying to log in gives the message

There was an error communicating with the login server.

It still seems to be a mongo-related thing looking at the logs in the terminal window. The second time mongo seemed to start up much quicker, and successfully, but there are still errors from api_1, saying MongoNetworkError: failed to connect to server [mongo:27017]

More log output below.

➜  learninglocker2-docker git:(master) docker-compose up
Starting learninglocker2-docker_redis_1 ... done
Starting learninglocker2-docker_mongo_1 ... done
Starting learninglocker2-docker_worker_1 ... done
Starting learninglocker2-docker_api_1    ... done
Starting learninglocker2-docker_xapi_1   ... done
Starting learninglocker2-docker_ui_1     ... done
Starting learninglocker2-docker_nginx_1  ... done
Attaching to learninglocker2-docker_mongo_1, learninglocker2-docker_redis_1, learninglocker2-docker_worker_1, learninglocker2-docker_xapi_1, learninglocker2-docker_api_1, learninglocker2-docker_ui_1, learninglocker2-docker_nginx_1
mongo_1   | 2019-05-08T14:41:50.301+0000 I CONTROL  [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=0ac7a78bdd2d
redis_1   | 1:C 08 May 14:41:48.949 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1   | 1:C 08 May 14:41:48.950 # Redis version=4.0.14, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1   | 1:C 08 May 14:41:48.950 # 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 08 May 14:41:48.965 * Running mode=standalone, port=6379.
mongo_1   | 2019-05-08T14:41:50.306+0000 I CONTROL  [initandlisten] db version v3.4.20
mongo_1   | 2019-05-08T14:41:50.306+0000 I CONTROL  [initandlisten] git version: 447847d93d6e0a21b018d5df45528e815c7c13d8
mongo_1   | 2019-05-08T14:41:50.306+0000 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
mongo_1   | 2019-05-08T14:41:50.306+0000 I CONTROL  [initandlisten] allocator: tcmalloc
mongo_1   | 2019-05-08T14:41:50.306+0000 I CONTROL  [initandlisten] modules: none
mongo_1   | 2019-05-08T14:41:50.306+0000 I CONTROL  [initandlisten] build environment:
mongo_1   | 2019-05-08T14:41:50.306+0000 I CONTROL  [initandlisten]     distmod: ubuntu1604
mongo_1   | 2019-05-08T14:41:50.306+0000 I CONTROL  [initandlisten]     distarch: x86_64
mongo_1   | 2019-05-08T14:41:50.306+0000 I CONTROL  [initandlisten]     target_arch: x86_64
mongo_1   | 2019-05-08T14:41:50.306+0000 I CONTROL  [initandlisten] options: {}
redis_1   | 1:M 08 May 14:41:48.975 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1   | 1:M 08 May 14:41:48.975 # Server initialized
xapi_1    | yarn run v1.3.2
redis_1   | 1:M 08 May 14:41:48.976 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1   | 1:M 08 May 14:41:48.976 * Ready to accept connections
mongo_1   | 2019-05-08T14:41:50.314+0000 W -        [initandlisten] Detected unclean shutdown - /data/db/mongod.lock is not empty.
xapi_1    | $ node dist/server.js
mongo_1   | 2019-05-08T14:41:50.338+0000 I -        [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
mongo_1   | 2019-05-08T14:41:50.360+0000 W STORAGE  [initandlisten] Recovering data from the last clean checkpoint.
mongo_1   | 2019-05-08T14:41:50.366+0000 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=5484M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),verbose=(recovery_progress),
xapi_1    | 2019-05-08 14:42:04:713 - info: Listening on port 8081
nginx_1   | 2019/05/08 14:42:05 [error] 7#7: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 172.24.0.1, server: localhost, request: "POST /api/auth/jwt/password HTTP/1.1", upstream: "http://172.24.0.7:3000/api/auth/jwt/password", host: "localhost", referrer: "https://localhost/login"
nginx_1   | 172.24.0.1 - [email protected] [08/May/2019:14:42:05 +0000] "POST /api/auth/jwt/password HTTP/1.1" 502 537 "https://localhost/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36"
xapi_1    | 2019-05-08 14:42:05:125 - error: Failed Mongo connection: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.24.0.3:27017]
xapi_1    | 2019-05-08 14:42:05:133 - info: Starting retry 1 in 1000ms
ui_1      | 2019-05-08 14:42:05:321 - info: 
ui_1      |  --- 
ui_1      |  ==> βœ…  Learning Locker is running, talking to API server on 8080. 
ui_1      |  ==> πŸ’»  Open http://localhost in a browser to view the app. 
ui_1      |  --- 
ui_1      | 
ui_1      | { MongoNetworkError: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.24.0.3:27017]
ui_1      |     at Pool.<anonymous> (/opt/learninglocker/node_modules/mongodb-core/lib/topologies/server.js:564:11)
ui_1      |     at emitOne (events.js:116:13)
ui_1      |     at Pool.emit (events.js:211:7)
ui_1      |     at Connection.<anonymous> (/opt/learninglocker/node_modules/mongodb-core/lib/connection/pool.js:317:12)
ui_1      |     at Object.onceWrapper (events.js:317:30)
ui_1      |     at emitTwo (events.js:126:13)
ui_1      |     at Connection.emit (events.js:214:7)
ui_1      |     at Socket.<anonymous> (/opt/learninglocker/node_modules/mongodb-core/lib/connection/connection.js:246:50)
ui_1      |     at Object.onceWrapper (events.js:315:30)
ui_1      |     at emitOne (events.js:116:13)
ui_1      |     at Socket.emit (events.js:211:7)
ui_1      |     at emitErrorNT (internal/streams/destroy.js:66:8)
ui_1      |     at _combinedTickCallback (internal/process/next_tick.js:139:11)
ui_1      |     at process._tickDomainCallback (internal/process/next_tick.js:219:9)
ui_1      |   name: 'MongoNetworkError',
ui_1      |   errorLabels: [ 'TransientTransactionError' ],
ui_1      |   [Symbol(mongoErrorContextSymbol)]: {} }
xapi_1    | 2019-05-08 14:42:06:167 - info: Starting retry 2 in 1000ms
xapi_1    | 2019-05-08 14:42:06:167 - error: Failed Mongo connection: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.24.0.3:27017]
worker_1  | 2019-05-08 14:42:06:245 - info: Subscribing to 'LEARNINGLOCKER:statement.notify' and will rpop on key 'LEARNINGLOCKER:statement.new'
worker_1  | 2019-05-08 14:42:06:302 - info: STARTED WORKER
worker_1  | (node:1) UnhandledPromiseRejectionWarning: MongoError: failed to connect to server [mongo:27017] on first connect [MongoError: connect ECONNREFUSED 172.24.0.3:27017]
worker_1  |     at Pool.<anonymous> (/opt/learninglocker/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:336:35)
worker_1  |     at emitOne (events.js:116:13)
worker_1  |     at Pool.emit (events.js:211:7)
worker_1  |     at Connection.<anonymous> (/opt/learninglocker/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:280:12)
worker_1  |     at Object.onceWrapper (events.js:317:30)
worker_1  |     at emitTwo (events.js:126:13)
worker_1  |     at Connection.emit (events.js:214:7)
worker_1  |     at Socket.<anonymous> (/opt/learninglocker/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:189:49)
worker_1  |     at Object.onceWrapper (events.js:315:30)
worker_1  |     at emitOne (events.js:116:13)
worker_1  |     at Socket.emit (events.js:211:7)
worker_1  |     at emitErrorNT (internal/streams/destroy.js:66:8)
worker_1  |     at _combinedTickCallback (internal/process/next_tick.js:139:11)
worker_1  |     at process._tickDomainCallback (internal/process/next_tick.js:219:9)
worker_1  | (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
worker_1  | (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
worker_1  | { MongoNetworkError: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.24.0.3:27017]
worker_1  |     at Pool.<anonymous> (/opt/learninglocker/node_modules/mongodb-core/lib/topologies/server.js:564:11)
worker_1  |     at emitOne (events.js:116:13)
worker_1  |     at Pool.emit (events.js:211:7)
worker_1  |     at Connection.<anonymous> (/opt/learninglocker/node_modules/mongodb-core/lib/connection/pool.js:317:12)
worker_1  |     at Object.onceWrapper (events.js:317:30)
worker_1  |     at emitTwo (events.js:126:13)
worker_1  |     at Connection.emit (events.js:214:7)
worker_1  |     at Socket.<anonymous> (/opt/learninglocker/node_modules/mongodb-core/lib/connection/connection.js:246:50)
worker_1  |     at Object.onceWrapper (events.js:315:30)
worker_1  |     at emitOne (events.js:116:13)
worker_1  |     at Socket.emit (events.js:211:7)
worker_1  |     at emitErrorNT (internal/streams/destroy.js:66:8)
worker_1  |     at _combinedTickCallback (internal/process/next_tick.js:139:11)
worker_1  |     at process._tickDomainCallback (internal/process/next_tick.js:219:9)
worker_1  |   name: 'MongoNetworkError',
worker_1  |   errorLabels: [ 'TransientTransactionError' ],
worker_1  |   [Symbol(mongoErrorContextSymbol)]: {} }
api_1     | 2019-05-08 14:42:07:155 - info: 
api_1     |  --- 
api_1     |  ==> 🌎  API is running on port 8080 
api_1     |  ==> πŸ’»  Send requests to http://undefined:8080 
api_1     |  --- 
api_1     | 
xapi_1    | 2019-05-08 14:42:07:180 - error: Failed Mongo connection: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.24.0.3:27017]
xapi_1    | 2019-05-08 14:42:07:181 - info: Starting retry 3 in 1000ms
api_1     | (node:1) UnhandledPromiseRejectionWarning: MongoError: failed to connect to server [mongo:27017] on first connect [MongoError: connect ECONNREFUSED 172.24.0.3:27017]
api_1     |     at Pool.<anonymous> (/opt/learninglocker/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:336:35)
api_1     |     at emitOne (events.js:116:13)
api_1     |     at Pool.emit (events.js:211:7)
api_1     |     at Connection.<anonymous> (/opt/learninglocker/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:280:12)
api_1     |     at Object.onceWrapper (events.js:317:30)
api_1     |     at emitTwo (events.js:126:13)
api_1     |     at Connection.emit (events.js:214:7)
api_1     |     at Socket.<anonymous> (/opt/learninglocker/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:189:49)
api_1     |     at Object.onceWrapper (events.js:315:30)
api_1     |     at emitOne (events.js:116:13)
api_1     |     at Socket.emit (events.js:211:7)
api_1     |     at emitErrorNT (internal/streams/destroy.js:66:8)
api_1     |     at _combinedTickCallback (internal/process/next_tick.js:139:11)
api_1     |     at process._tickDomainCallback (internal/process/next_tick.js:219:9)
api_1     | (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
api_1     | (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
api_1     | { MongoNetworkError: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.24.0.3:27017]
api_1     |     at Pool.<anonymous> (/opt/learninglocker/node_modules/mongodb-core/lib/topologies/server.js:564:11)
api_1     |     at emitOne (events.js:116:13)
api_1     |     at Pool.emit (events.js:211:7)
api_1     |     at Connection.<anonymous> (/opt/learninglocker/node_modules/mongodb-core/lib/connection/pool.js:317:12)
api_1     |     at Object.onceWrapper (events.js:317:30)
api_1     |     at emitTwo (events.js:126:13)
api_1     |     at Connection.emit (events.js:214:7)
api_1     |     at Socket.<anonymous> (/opt/learninglocker/node_modules/mongodb-core/lib/connection/connection.js:246:50)
api_1     |     at Object.onceWrapper (events.js:315:30)
api_1     |     at emitOne (events.js:116:13)
api_1     |     at Socket.emit (events.js:211:7)
api_1     |     at emitErrorNT (internal/streams/destroy.js:66:8)
api_1     |     at _combinedTickCallback (internal/process/next_tick.js:139:11)
api_1     |     at process._tickDomainCallback (internal/process/next_tick.js:219:9)
api_1     |   name: 'MongoNetworkError',
api_1     |   errorLabels: [ 'TransientTransactionError' ],
api_1     |   [Symbol(mongoErrorContextSymbol)]: {} }
xapi_1    | 2019-05-08 14:42:08:189 - error: Failed Mongo connection: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.24.0.3:27017]
xapi_1    | 2019-05-08 14:42:08:191 - error: Failed initial mongo connection: Too many retries
mongo_1   | 2019-05-08T14:42:12.539+0000 I STORAGE  [initandlisten] WiredTiger message [1557326532:538979][1:0x7f6f4cd83d40], txn-recover: Main recovery loop: starting at 2/128
mongo_1   | 2019-05-08T14:42:12.570+0000 I STORAGE  [initandlisten] WiredTiger message [1557326532:570902][1:0x7f6f4cd83d40], txn-recover: Recovering log 2 through 3
mongo_1   | 2019-05-08T14:42:13.216+0000 I STORAGE  [initandlisten] WiredTiger message [1557326533:216331][1:0x7f6f4cd83d40], file:index-1-4402564953620306929.wt, txn-recover: Recovering log 3 through 3
mongo_1   | 2019-05-08T14:42:13.585+0000 I CONTROL  [initandlisten] 
mongo_1   | 2019-05-08T14:42:13.585+0000 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
mongo_1   | 2019-05-08T14:42:13.586+0000 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
mongo_1   | 2019-05-08T14:42:13.586+0000 I CONTROL  [initandlisten] 
mongo_1   | 2019-05-08T14:42:13.667+0000 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
mongo_1   | 2019-05-08T14:42:13.673+0000 I NETWORK  [thread1] waiting for connections on port 27017
mongo_1   | 2019-05-08T14:42:14.013+0000 I FTDC     [ftdc] Unclean full-time diagnostic data capture shutdown detected, found interim file, some metrics may have been lost. OK
mongo_1   | 2019-05-08T14:42:14.162+0000 I NETWORK  [thread1] connection accepted from 172.24.0.6:51036 #1 (1 connection now open)
mongo_1   | 2019-05-08T14:42:14.211+0000 I NETWORK  [thread1] connection accepted from 172.24.0.6:51038 #2 (2 connections now open)
mongo_1   | 2019-05-08T14:42:14.216+0000 I NETWORK  [thread1] connection accepted from 172.24.0.6:51040 #3 (3 connections now open)
mongo_1   | 2019-05-08T14:42:14.217+0000 I NETWORK  [thread1] connection accepted from 172.24.0.6:51042 #4 (4 connections now open)


nginx_1   | 2019/05/08 14:43:20 [error] 7#7: *2 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.24.0.1, server: localhost, request: "POST /api/auth/jwt/password HTTP/1.1", upstream: "http://172.24.0.7:3000/api/auth/jwt/password", host: "localhost", referrer: "https://localhost/login"
nginx_1   | 172.24.0.1 - [email protected] [08/May/2019:14:43:20 +0000] "POST /api/auth/jwt/password HTTP/1.1" 504 537 "https://localhost/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36"
mongo_1   | 2019-05-08T14:48:13.849+0000 I -        [conn1] end connection 172.24.0.6:51036 (4 connections now open)
mongo_1   | 2019-05-08T14:48:13.850+0000 I -        [conn4] end connection 172.24.0.6:51042 (4 connections now open)
mongo_1   | 2019-05-08T14:48:13.850+0000 I -        [conn2] end connection 172.24.0.6:51038 (4 connections now open)
mongo_1   | 2019-05-08T14:48:13.850+0000 I -        [conn3] end connection 172.24.0.6:51040 (4 connections now open)
mongo_1   | 2019-05-08T14:48:14.858+0000 I NETWORK  [thread1] connection accepted from 172.24.0.6:56450 #5 (1 connection now open)
mongo_1   | 2019-05-08T14:48:14.861+0000 I NETWORK  [thread1] connection accepted from 172.24.0.6:56452 #6 (2 connections now open)
mongo_1   | 2019-05-08T14:48:14.861+0000 I NETWORK  [thread1] connection accepted from 172.24.0.6:56454 #7 (3 connections now open)
mongo_1   | 2019-05-08T14:48:14.866+0000 I NETWORK  [thread1] connection accepted from 172.24.0.6:56456 #8 (4 connections now open)

nginx_1   | 2019/05/08 14:51:07 [error] 7#7: *6 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.24.0.1, server: localhost, request: "POST /api/auth/jwt/password HTTP/1.1", upstream: "http://172.24.0.7:3000/api/auth/jwt/password", host: "localhost", referrer: "https://localhost/login"
nginx_1   | 172.24.0.1 - [email protected] [08/May/2019:14:51:07 +0000] "POST /api/auth/jwt/password HTTP/1.1" 504 537 "https://localhost/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36"
redis_1   | 1:M 08 May 14:52:36.097 * 100 changes in 300 seconds. Saving...
redis_1   | 1:M 08 May 14:52:36.098 * Background saving started by pid 12
redis_1   | 12:C 08 May 14:52:36.106 * DB saved on disk
redis_1   | 12:C 08 May 14:52:36.112 * RDB: 0 MB of memory used by copy-on-write
redis_1   | 1:M 08 May 14:52:36.199 * Background saving terminated with success
mongo_1   | 2019-05-08T14:54:14.545+0000 I -        [conn6] end connection 172.24.0.6:56452 (4 connections now open)
mongo_1   | 2019-05-08T14:54:14.546+0000 I -        [conn5] end connection 172.24.0.6:56450 (3 connections now open)
mongo_1   | 2019-05-08T14:54:14.548+0000 I -        [conn7] end connection 172.24.0.6:56454 (2 connections now open)
mongo_1   | 2019-05-08T14:54:14.549+0000 I -        [conn8] end connection 172.24.0.6:56456 (1 connection now open)
mongo_1   | 2019-05-08T14:54:15.563+0000 I NETWORK  [thread1] connection accepted from 172.24.0.6:33630 #9 (1 connection now open)
mongo_1   | 2019-05-08T14:54:15.564+0000 I NETWORK  [thread1] connection accepted from 172.24.0.6:33638 #10 (2 connections now open)
mongo_1   | 2019-05-08T14:54:15.566+0000 I NETWORK  [thread1] connection accepted from 172.24.0.6:33640 #11 (3 connections now open)
mongo_1   | 2019-05-08T14:54:15.568+0000 I NETWORK  [thread1] connection accepted from 172.24.0.6:33642 #12 (4 connections now open)

Perhaps it is still an issue with mongo needing some time to start up and everything else needing to be delayed? I noticed you already have the depends_on clauses in the docker-compose file, one would think that would be enough, but I'm not sure if those will make the later stages wait until mongo is really available? I wonder if there is some way to add a delay, "after service X starts, wait n seconds and start service Y"?

Thanks in advance for your suggestions.

Way to upgrade to Version 3 in a deployed LearningLocker

Hello,

We have deployed a Learning Locker (V2) to production. However, V2 does not feature the Statement Deletion API. This is introduced in V3. Some questions came up concerning the upgrade.

  1. How would we upgrade to V3 ?
  2. Is it possible to upgrade to V3 in a deployed container ? If not, how should we proceed ?

Thanks a lot in advance.

Feature Request: Don't enforce https for the included nginx

TLS termination is often handled outside of Docker and the current nginx config enforces a redirect to a https:// url - this creates infinite redirect loops if the docker setup is used i.e. behind an Apache with ProxyPass to the HTTP-Port.

Of course it's possible to move the nginx part into Apache or traefik or something else but a working setup out of the box that doesn't enforce a redirect to HTTPS or a configuration knob for that would be nice :)

Workaround for Apache2 Proxy:

        ProxyPreserveHost on
        SSLProxyEngine on
        # we can't really verifiy that self-signed cert
        SSLProxyVerify none 
        SSLProxyCheckPeerCN off
        SSLProxyCheckPeerName off
        SSLProxyCheckPeerExpire off
        ProxyPass / https://localhost:4443/
        ProxyPassReverse / https://localhost:4443/

Thanks for providing these docker images!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.