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

I cannot finish the installation #17

Closed
xScorpionx opened this issue Jul 14, 2019 · 9 comments
Closed

I cannot finish the installation #17

xScorpionx opened this issue Jul 14, 2019 · 9 comments

Comments

@xScorpionx
Copy link

Continuously this error appears, and if I enter https: // localhost: 8443 appears 502 Bad Gateway.

api-ctrl_1           | 13:48:58.372 [Timer-3] ERROR  - [java.sql.SQLException: null,  message from server: "Host '172.26.0.6' is not allowed to connect to this MySQL server" []] java.lang.RuntimeException: java.sql.SQLException: null,  message from server: "Host '172.26.0.6' is not allowed to connect to this MySQL server" - org.apache.tomcat.jdbc.pool.DataSourceProxy.getActive(DataSourceProxy.java:711)
api-ctrl_1           | com.hutoma.api.connectors.db.DatabaseConnectionPool.borrowConnection(DatabaseConnectionPool.java:67)
api-ctrl_1           | com.hutoma.api.connectors.db.DatabaseTransaction.getTransactionConnection(DatabaseTransaction.java:101)
api-ctrl_1           | com.hutoma.api.connectors.db.DatabaseTransaction.getDatabaseCall(DatabaseTransaction.java:37)
api-ctrl_1           | com.hutoma.api.connectors.db.DatabaseAiStatusUpdates.getQueueSlotCounts(DatabaseAiStatusUpdates.java:49)
api-ctrl_1           | com.hutoma.api.controllers.QueueProcessor.processQueue(QueueProcessor.java:466)
api-ctrl_1           | com.hutoma.api.controllers.QueueProcessor.run(QueueProcessor.java:121)
api-ctrl_1           | java.util.TimerThread.mainLoop(Timer.java:555)
api-ctrl_1           | java.util.TimerThread.run(Timer.java:505)
api-ctrl_1           |
api-ctrl_1           | 14-Jul-2019 13:48:59.222 SEVERE [Timer-1] org.apache.tomcat.jdbc.pool.ConnectionPool.init Unable to create initial connections of pool.
api-ctrl_1           |  java.sql.SQLException: null,  message from server: "Host '172.26.0.6' is not allowed to connect to this MySQL server"
api-ctrl_1           |  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
api-ctrl_1           |  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
api-ctrl_1           |  at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
api-ctrl_1           |  at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:835)
api-ctrl_1           |  at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:455)
api-ctrl_1           |  at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240)
api-ctrl_1           |  at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199)
api-ctrl_1           |  at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:319)
api-ctrl_1           |  at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212)
api-ctrl_1           |  at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:739)
api-ctrl_1           |  at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:671)
api-ctrl_1           |  at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:483)
api-ctrl_1           |  at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154)
api-ctrl_1           |  at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
api-ctrl_1           |  at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
api-ctrl_1           |  at org.apache.tomcat.jdbc.pool.DataSourceProxy.getActive(DataSourceProxy.java:709)
api-ctrl_1           |  at com.hutoma.api.connectors.db.DatabaseConnectionPool.borrowConnection(DatabaseConnectionPool.java:67)
api-ctrl_1           |  at com.hutoma.api.connectors.db.DatabaseTransaction.getTransactionConnection(DatabaseTransaction.java:101)
api-ctrl_1           |  at com.hutoma.api.connectors.db.DatabaseTransaction.getDatabaseCall(DatabaseTransaction.java:37)
api-ctrl_1           |  at com.hutoma.api.connectors.db.DatabaseAiStatusUpdates.getQueueSlotCounts(DatabaseAiStatusUpdates.java:49)
api-ctrl_1           |  at com.hutoma.api.controllers.QueueProcessor.processQueue(QueueProcessor.java:466)
api-ctrl_1           |  at com.hutoma.api.controllers.QueueProcessor.run(QueueProcessor.java:121)
api-ctrl_1           |  at java.util.TimerThread.mainLoop(Timer.java:555)
api-ctrl_1           |  at java.util.TimerThread.run(Timer.java:505)
api-ctrl_1           |
api-ctrl_1           | 13:48:59.224 [Timer-1] ERROR  - [java.sql.SQLException: null,  message from server: "Host '172.26.0.6' is not allowed to connect to this MySQL server" []] java.lang.RuntimeException: java.sql.SQLException: null,  message from server: "Host '172.26.0.6' is not allowed to connect to this MySQL server" - org.apache.tomcat.jdbc.pool.DataSourceProxy.getActive(DataSourceProxy.java:711)
api-ctrl_1           | com.hutoma.api.connectors.db.DatabaseConnectionPool.borrowConnection(DatabaseConnectionPool.java:67)
api-ctrl_1           | com.hutoma.api.connectors.db.DatabaseTransaction.getTransactionConnection(DatabaseTransaction.java:101)
api-ctrl_1           | com.hutoma.api.connectors.db.DatabaseTransaction.getDatabaseCall(DatabaseTransaction.java:37)
api-ctrl_1           | com.hutoma.api.connectors.db.DatabaseAiStatusUpdates.getQueueSlotCounts(DatabaseAiStatusUpdates.java:49)
api-ctrl_1           | com.hutoma.api.controllers.QueueProcessor.processQueue(QueueProcessor.java:466)
api-ctrl_1           | com.hutoma.api.controllers.QueueProcessor.run(QueueProcessor.java:121)
api-ctrl_1           | java.util.TimerThread.mainLoop(Timer.java:555)
api-ctrl_1           | java.util.TimerThread.run(Timer.java:505)
api-ctrl_1           |
web-dev_console2_1   | Database isn’t ready yet
@mauriziocibelli mauriziocibelli assigned ghost Jul 14, 2019
@mauriziocibelli
Copy link
Member

Hi xScorpionx, looking into this. Will keep you posted.

@ghost
Copy link

ghost commented Jul 15, 2019

Hi, it looks somehow the database failed to create properly.
Could you please provide the results of docker logs $(docker ps -qf "name=api-db") --tail 200?
Alternatively (and probably quicker), you can try removing the db's docker volume so it gets recreated when you launch the system again (docker volume rm hutomaoss_api_store) while the containers are down.

@xScorpionx
Copy link
Author

xScorpionx commented Jul 19, 2019

Hello Pedrotei,
I tried your alternative (docker volume rm hutomaoss_api_store) but the error : 502 Bad Gateway continues.

api-db_1             | Database initialized
api-db_1             | Initializing certificates
api-db_1             | Generating a RSA private key
api-db_1             | ...........................................................................................................+++++
api-db_1             | ...............................................................................................................+++++
api-db_1             | unable to write 'random state'
api-db_1             | writing new private key to 'ca-key.pem'
api-db_1             | -----
api-db_1             | Generating a RSA private key
ai-entity-it_1       | {"asctime": "2019-07-19 13:19:44,701", "levelname": "WARNING", "name": "hu_entity.spacy_wrapper", "message": "Entity ids: GPE=382", "er_language": "it"}
ai-entity-it_1       | {"asctime": "2019-07-19 13:19:46,443", "levelname": "WARNING", "name": "hu_entity.server", "message": "Entity Recognizer initializing server.", "er_language": "it"}
ai-entity-it_1       | {"asctime": "2019-07-19 13:19:48,102", "levelname": "WARNING", "name": "hu_entity.server", "message": "Starting entity recognizer API on port 9095", "port": 9095, "er_language": "it"}
api-db_1             | ...................................+++++
api-db_1             | .....+++++
api-db_1             | unable to write 'random state'
api-db_1             | writing new private key to 'server-key.pem'
api-db_1             | -----
api-db_1             | Generating a RSA private key
api-db_1             | ...........................+++++
api-db_1             | .........................................................+++++
api-db_1             | unable to write 'random state'
api-db_1             | writing new private key to 'client-key.pem'
api-db_1             | -----
api-db_1             | Certificates initialized
web-dev_console2_1   | Found another file with the destination path 'css/datapicker.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'css/integration.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'css/elements.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'css/chat.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'css/prism-them.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'css/entities.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'css/tokenfield.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'css/formset.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'css/enhanced_textarea.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'css/insights.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'css/settings.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'css/intents.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'js/formset.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'js/chat.spec.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'js/charts.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'js/voice.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'js/enhanced_textarea.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'js/insights.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'js/elements.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'js/tokenfield.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'js/sanitize.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'js/webhook.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'js/training.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'js/chat.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'js/integration.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-dev_console2_1   | Found another file with the destination path 'images/empty-intents-illustration.png'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
web-reverse_proxy_1  | 2019/07/19 13:26:14 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET / HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:26:49 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:26:55 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:27:05 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET / HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:27:31 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:27:31 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:27:31 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:27:31 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:27:31 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:27:59 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:27:59 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:27:59 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:27:59 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:27:59 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:27:59 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:27:59 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:27:59 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET / HTTP/2.0", host: "localhost:8443"
log-fluent_1         | 2019-07-19 13:25:22.000000000 +0000 ai-embedding-chat-v1: {"name":"hu.api_register","levelname":"ERROR","levelno":40,"pathname":"/usr/local/lib/python3.7/site-packages/api_register/register.py","filename":"register.py","module":"register","exc_text":"Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/site-packages/api_register/register.py\", line 109, in register\n    url, data=json_data, headers=headers) as response:\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client.py\", line 1005, in __aenter__\n    self._resp = await self._coro\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client.py\", line 497, in _request\n    await resp.start(conn)\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py\", line 857, in start\n    self._continue = None\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/helpers.py\", line 585, in __exit__\n    raise asyncio.TimeoutError from None\nconcurrent.futures._base.TimeoutError","lineno":133,"funcName":"register","created":1563542722.4168575,"msecs":416.8574810028076,"relativeCreated":491648.1966972351,"thread":139987618931712,"threadName":"MainThread","processName":"MainProcess","process":1,"emb_language":"it","message":"Update to http://api-ctrl:8080/v1/aiservices/register failed with unexpected exception\nTraceback (most recent call last):\n  File \"/usr/local/lib/python3.7/site-packages/api_register/register.py\", line 109, in register\n    url, data=json_data, headers=headers) as response:\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client.py\", line 1005, in __aenter__\n    self._resp = await self._coro\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client.py\", line 497, in _request\n    await resp.start(conn)\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py\", line 857, in start\n    self._continue = None\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/helpers.py\", line 585, in __exit__\n    raise asyncio.TimeoutError from None\nconcurrent.futures._base.TimeoutError","hostname":"c0731e1c9ac3"}
web-reverse_proxy_1  | 2019/07/19 13:29:25 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:29:25 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:29:25 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:29:25 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
log-fluent_1         | 2019-07-19 13:25:53.000000000 +0000 ai-embedding-chat-v1: {"name":"hu.api_register","levelname":"ERROR","levelno":40,"pathname":"/usr/local/lib/python3.7/site-packages/api_register/register.py","filename":"register.py","module":"register","exc_text":"Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/site-packages/api_register/register.py\", line 109, in register\n    url, data=json_data, headers=headers) as response:\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client.py\", line 1005, in __aenter__\n    self._resp = await self._coro\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client.py\", line 497, in _request\n    await resp.start(conn)\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py\", line 857, in start\n    self._continue = None\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/helpers.py\", line 585, in __exit__\n    raise asyncio.TimeoutError from None\nconcurrent.futures._base.TimeoutError","lineno":133,"funcName":"register","created":1563542753.4410653,"msecs":441.06531143188477,"relativeCreated":522670.23158073425,"thread":139960210023424,"threadName":"MainThread","processName":"MainProcess","process":1,"emb_language":"en","message":"Update to http://api-ctrl:8080/v1/aiservices/register failed with unexpected exception\nTraceback (most recent call last):\n  File \"/usr/local/lib/python3.7/site-packages/api_register/register.py\", line 109, in register\n    url, data=json_data, headers=headers) as response:\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client.py\", line 1005, in __aenter__\n    self._resp = await self._coro\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client.py\", line 497, in _request\n    await resp.start(conn)\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py\", line 857, in start\n    self._continue = None\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/helpers.py\", line 585, in __exit__\n    raise asyncio.TimeoutError from None\nconcurrent.futures._base.TimeoutError","hostname":"d1146b3578ed"}
web-reverse_proxy_1  | 2019/07/19 13:29:25 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
log-fluent_1         | 2019-07-19 13:26:09.000000000 +0000 ai-embedding-chat-v1: {"name":"hu.api_register","levelname":"ERROR","levelno":40,"pathname":"/usr/local/lib/python3.7/site-packages/api_register/register.py","filename":"register.py","module":"register","exc_text":"Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/site-packages/api_register/register.py\", line 109, in register\n    url, data=json_data, headers=headers) as response:\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client.py\", line 1005, in __aenter__\n    self._resp = await self._coro\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client.py\", line 497, in _request\n    await resp.start(conn)\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py\", line 857, in start\n    self._continue = None\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/helpers.py\", line 585, in __exit__\n    raise asyncio.TimeoutError from None\nconcurrent.futures._base.TimeoutError","lineno":133,"funcName":"register","created":1563542769.753076,"msecs":753.0760765075684,"relativeCreated":533175.3294467926,"thread":140444691346432,"threadName":"MainThread","processName":"MainProcess","process":1,"emb_language":"es","message":"Update to http://api-ctrl:8080/v1/aiservices/register failed with unexpected exception\nTraceback (most recent call last):\n  File \"/usr/local/lib/python3.7/site-packages/api_register/register.py\", line 109, in register\n    url, data=json_data, headers=headers) as response:\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client.py\", line 1005, in __aenter__\n    self._resp = await self._coro\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client.py\", line 497, in _request\n    await resp.start(conn)\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py\", line 857, in start\n    self._continue = None\n  File \"/usr/local/lib/python3.7/site-packages/aiohttp/helpers.py\", line 585, in __exit__\n    raise asyncio.TimeoutError from None\nconcurrent.futures._base.TimeoutError","hostname":"224c50206b96"}
web-reverse_proxy_1  | 2019/07/19 13:29:25 [error] 6#6: *3 web-dev_console2 could not be resolved (110: Operation timed out), client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:30:36 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", upstream: "http://172.26.0.15:8000/null", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:30:51 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET / HTTP/2.0", upstream: "http://172.26.0.15:8000/", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:31:07 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", upstream: "http://172.26.0.15:8000/null", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:31:07 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", upstream: "http://172.26.0.15:8000/null", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:31:07 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", upstream: "http://172.26.0.15:8000/null", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:31:07 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", upstream: "http://172.26.0.15:8000/null", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:31:07 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", upstream: "http://172.26.0.15:8000/null", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:31:07 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", upstream: "http://172.26.0.15:8000/null", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:32:25 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET / HTTP/2.0", upstream: "http://172.26.0.15:8000/", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:32:48 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", upstream: "http://172.26.0.15:8000/null", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:32:48 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", upstream: "http://172.26.0.15:8000/null", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:32:48 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", upstream: "http://172.26.0.15:8000/null", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:32:48 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", upstream: "http://172.26.0.15:8000/null", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:32:48 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", upstream: "http://172.26.0.15:8000/null", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:32:48 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET /null HTTP/2.0", upstream: "http://172.26.0.15:8000/null", host: "localhost:8443"
web-reverse_proxy_1  | 2019/07/19 13:33:49 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.26.0.1, server: console_public, request: "GET / HTTP/2.0", upstream: "http://172.26.0.15:8000/", host: "localhost:8443"
log-fluent_1         | 2019-07-19 13:36:04.000000000 +0000 ai-embedding-chat-v1: {"name":"hu.api_register","levelname":"ERROR","levelno":40,"pathname":"/usr/local/lib/python3.7/site-packages/api_register/register.py","filename":"register.py","module":"register","exc_text":null,"lineno":129,"funcName":"register","created":1563543364.045425,"msecs":45.4249382019043,"relativeCreated":1133276.7641544342,"thread":139987618931712,"threadName":"MainThread","processName":"MainProcess","process":1,"emb_language":"it","message":"Update to http://api-ctrl:8080/v1/aiservices/register failed with exception: <class 'aiohttp.client_exceptions.ClientConnectorError'>","hostname":"c0731e1c9ac3"}

@ghost
Copy link

ghost commented Jul 19, 2019

Hi,
from the log you've posted, the web service hasn't finish initialising yet. In fact, it seems even the database service (which is one of the first services in the chain) hasn't initialised yet (so the API and all upstream services won't be initialised either). The db will show a message similar to the following when it finishes initialising:
[Note] mysqld: ready for connections.
Looking at the timestamps, it looks it taking a tremendous amount of time for services to start up. If you're running this under Windows or Mac, do make sure that you have set the minimum memory to 5Gb - this is described in the Requirements section of README.md - (and that you don't have any other containers running, otherwise you'll need to raise this value accordingly). In these systems the default memory limit is 2Gb and this will prevent the services from running correctly. Can you please double check what is the memory limit defined, and provide the hardware specs of the machine you're running this one please? Thanks.

@xScorpionx
Copy link
Author

xScorpionx commented Jul 19, 2019

I changed the memory to 4096 and now I think it's perfect.

when launch.sh its in:

web-dev_console2_1 | Running migrations:
web-dev_console2_1 | No migrations to apply.
web-dev_console2_1 | Starting Django
web-dev_console2_1 | [2019-07-20 15:32:00 +0000] [16] [INFO] Starting gunicorn 19.9.0
web-dev_console2_1 | [2019-07-20 15:32:00 +0000] [16] [INFO] Listening at: http://0.0.0.0:8000 (16)
web-dev_console2_1 | [2019-07-20 15:32:00 +0000] [16] [INFO] Using worker: sync
web-dev_console2_1 | [2019-07-20 15:32:00 +0000] [19] [INFO] Booting worker with pid: 19
web-dev_console2_1 | [2019-07-20 15:32:00 +0000] [20] [INFO] Booting worker with pid: 20
web-dev_console2_1 | [2019-07-20 15:32:00 +0000] [21] [INFO] Booting worker with pid: 21

But when using create_test_user.sh:

bash create_test_user.sh
OCI runtime exec failed: exec failed: container_linux.go:344: starting container
process caused "exec: "D:/Program Files/Git/usr/bin/mysql": stat D:/Program F
iles/Git/usr/bin/mysql: no such file or directory": unknown

mysql is not found in git.

@ghost
Copy link

ghost commented Jul 23, 2019

create_test_user.sh just runs a mysql command inside the container, to add a test user to the db. If for some reason this is not working on Windows, you can try to run the commands interactively inside the container:
docker exec -it hutomaoss_api-db_1 /bin/bash
then inside just call each mysql command:
`/usr/bin/mysql -h localhost -u$DB_USER -p$DB_PASSWORD -Dhutoma -e "INSERT INTO users (dev_token, plan_id, dev_id, valid, internal) VALUES ('$USER_DEV_TOKEN', 1, '$USER_DEV_ID', 1, 0)"
...
(remember to replace the environment variables with their values, you can get that from the top of the script)

@xScorpionx
Copy link
Author

To be able to recognize the folders in windows I had to change /bin/bash to //bin/bash with double slash. I did the same in the script with /usr/bin/mysql to //usr/bin/mysql and now the script has no problem recognizing the folders. I also had to delete the $DB_PASSWORD in script, since it gave me an error:

$ bash create_test_user.sh
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1062 (23000) at line 1: Duplicate entry 'a2b9d970-521c-493d-86b1-8d756c85d226' for key 'dev_id_UNIQUE'
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1062 (23000) at line 1: Duplicate entry 'hello@nowhere.com' for key 'username'
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1062 (23000) at line 1: Duplicate entry 'hello@nowhere.com' for key 'email'
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1062 (23000) at line 1: Duplicate entry 'a2b9d970-521c-493d-86b1-8d756c85d226' for key 'dev_id'

and put it manually in the console:

$ bash create_test_user.sh

Enter password:
ERROR 1062 (23000) at line 1: Duplicate entry 'a2b9d970-521c-493d-86b1-8d756c85d226' for key 'dev_id_UNIQUE'
Enter password:
ERROR 1062 (23000) at line 1: Duplicate entry 'hello@nowhere.com' for key 'username'
Enter password:
ERROR 1062 (23000) at line 1: Duplicate entry 'hello@nowhere.com' for key 'email'
Enter password:
ERROR 1062 (23000) at line 1: Duplicate entry 'a2b9d970-521c-493d-86b1-8d756c85d226' for key 'dev_id'

How to fix ERROR 1062?

@ghost
Copy link

ghost commented Jul 25, 2019

Thanks for looking into the Windows-specific issue.
Note that you don't need to remove the password,
mysql: [Warning] Using a password on the command line interface can be insecure
is just a warning but shouldn't affect the outcome.
Since now you already have entries in the db created by the script, the easiest option is to delete the db volume as the script will generate a new clean database. Alternatively you can connect to the db with MySQLWorkbench and manually remove those entries.

@xScorpionx
Copy link
Author

I installed everything again and it's going perfect, thanks for the help.

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