nhurel / nylas-sync-engine

Docker image to run the nylas sync-engine
96 stars 17 forks source link

Problem with runing docker image on vps #13

Closed djedlajn closed 8 years ago

djedlajn commented 8 years ago

Hi

I have encountered following error when i try to run the container via docker-compose.

Creating kadza_redis_1
Creating kadza_mysql_1
Creating kadza_sync-engine_1
Attaching to kadza_mysql_1, kadza_redis_1, kadza_sync-engine_1
mysql_1        | Initializing database
mysql_1        | 2016-11-10T22:40:52.362454Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
redis_1        | 1:C 10 Nov 22:40:52.121 # 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        |                 _._                                                  
redis_1        |            _.-``__ ''-._                                             
redis_1        |       _.-``    `.  `_.  ''-._           Redis 3.2.5 (00000000/0) 64 bit
redis_1        |   .-`` .-```.  ```\/    _.,_ ''-._                                   
redis_1        |  (    '      ,       .-`  | `,    )     Running in standalone mode
redis_1        |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
redis_1        |  |    `-._   `._    /     _.-'    |     PID: 1
redis_1        |   `-._    `-._  `-./  _.-'    _.-'                                   
redis_1        |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
redis_1        |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
redis_1        |   `-._    `-._`-.__.-'_.-'    _.-'                                   
redis_1        |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
redis_1        |  |    `-._`-._        _.-'_.-'    |                                  
redis_1        |   `-._    `-._`-.__.-'_.-'    _.-'                                   
redis_1        |       `-._    `-.__.-'    _.-'                                       
redis_1        |           `-._        _.-'                                           
redis_1        |               `-.__.-'                                               
redis_1        | 
redis_1        | 1:M 10 Nov 22:40:52.140 # 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 10 Nov 22:40:52.140 # Server started, Redis version 3.2.5
redis_1        | 1:M 10 Nov 22:40:52.140 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. 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 10 Nov 22:40:52.140 * The server is now ready to accept connections on port 6379
mysql_1        | 2016-11-10T22:40:52.972657Z 0 [Warning] InnoDB: New log files created, LSN=45790
mysql_1        | 2016-11-10T22:40:53.079710Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
mysql_1        | 2016-11-10T22:40:53.143255Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: bc8963a6-a796-11e6-9b9a-0242ac110003.
mysql_1        | 2016-11-10T22:40:53.145368Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
mysql_1        | 2016-11-10T22:40:53.146272Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
mysql_1        | 2016-11-10T22:40:53.851128Z 1 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1        | 2016-11-10T22:40:53.851909Z 1 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1        | 2016-11-10T22:40:53.852209Z 1 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1        | 2016-11-10T22:40:53.852705Z 1 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1        | 2016-11-10T22:40:53.853045Z 1 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
sync-engine_1  |  * Restarting with stat
sync-engine_1  | Setting up database: inbox
sync-engine_1  | Traceback (most recent call last):
sync-engine_1  |   File "bin/create-db", line 85, in <module>
sync-engine_1  |     main()
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 488, in __call__
sync-engine_1  |     return self.main(*args, **kwargs)
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 474, in main
sync-engine_1  |     self.invoke(ctx)
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 659, in invoke
sync-engine_1  |     ctx.invoke(self.callback, **ctx.params)
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 325, in invoke
sync-engine_1  |     return callback(*args, **kwargs)
sync-engine_1  |   File "bin/create-db", line 49, in main
sync-engine_1  |     format(schema_name))
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1990, in execute
sync-engine_1  |     connection = self.contextual_connect(close_with_result=True)
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2039, in contextual_connect
sync-engine_1  |     self._wrap_pool_connect(self.pool.connect, None),
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2078, in _wrap_pool_connect
sync-engine_1  |     e, dialect, self)
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1405, in _handle_dbapi_exception_noconnection
sync-engine_1  |     exc_info
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
sync-engine_1  |     reraise(type(exception), exception, tb=exc_tb, cause=cause)
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2074, in _wrap_pool_connect
sync-engine_1  |     return fn()
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 376, in connect
sync-engine_1  |     return _ConnectionFairy._checkout(self)
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 713, in _checkout
sync-engine_1  |     fairy = _ConnectionRecord.checkout(pool)
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 480, in checkout
sync-engine_1  |     rec = pool._do_get()
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 1060, in _do_get
sync-engine_1  |     self._dec_overflow()
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
sync-engine_1  |     compat.reraise(exc_type, exc_value, exc_tb)
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 1057, in _do_get
sync-engine_1  |     return self._create_connection()
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 323, in _create_connection
sync-engine_1  |     return _ConnectionRecord(self)
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 449, in __init__
sync-engine_1  |     self.connection = self.__connect()
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 607, in __connect
sync-engine_1  |     connection = self.__pool._invoke_creator(self)
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 97, in connect
sync-engine_1  |     return dialect.connect(*cargs, **cparams)
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 385, in connect
sync-engine_1  |     return self.dbapi.connect(*cargs, **cparams)
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
sync-engine_1  |     return Connection(*args, **kwargs)
sync-engine_1  |   File "/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py", line 204, in __init__
sync-engine_1  |     super(Connection, self).__init__(*args, **kwargs2)
sync-engine_1  | sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (2003, "Can't connect to MySQL server on 'mysql' (111)")
mysql_1        | Database initialized
mysql_1        | MySQL init process in progress...
mysql_1        | 2016-11-10T22:40:56.593715Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql_1        | 2016-11-10T22:40:56.599594Z 0 [Note] mysqld (mysqld 5.7.16) starting as process 54 ...
mysql_1        | 2016-11-10T22:40:56.617145Z 0 [Note] InnoDB: PUNCH HOLE support available
mysql_1        | 2016-11-10T22:40:56.617362Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1        | 2016-11-10T22:40:56.617832Z 0 [Note] InnoDB: Uses event mutexes
mysql_1        | 2016-11-10T22:40:56.617921Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysql_1        | 2016-11-10T22:40:56.618214Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
mysql_1        | 2016-11-10T22:40:56.618295Z 0 [Note] InnoDB: Using Linux native AIO
mysql_1        | 2016-11-10T22:40:56.619263Z 0 [Note] InnoDB: Number of pools: 1
mysql_1        | 2016-11-10T22:40:56.624249Z 0 [Note] InnoDB: Using CPU crc32 instructions
mysql_1        | 2016-11-10T22:40:56.634892Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
mysql_1        | 2016-11-10T22:40:56.682213Z 0 [Note] InnoDB: Completed initialization of buffer pool
mysql_1        | 2016-11-10T22:40:56.694282Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mysql_1        | 2016-11-10T22:40:56.718159Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
mysql_1        | 2016-11-10T22:40:56.754192Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql_1        | 2016-11-10T22:40:56.754889Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql_1        | 2016-11-10T22:40:56.825968Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql_1        | 2016-11-10T22:40:56.828186Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
mysql_1        | 2016-11-10T22:40:56.828318Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
mysql_1        | 2016-11-10T22:40:56.829258Z 0 [Note] InnoDB: Waiting for purge to start
mysql_1        | 2016-11-10T22:40:56.879585Z 0 [Note] InnoDB: 5.7.16 started; log sequence number 2532034
mysql_1        | 2016-11-10T22:40:56.880882Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysql_1        | 2016-11-10T22:40:56.881392Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql_1        | 2016-11-10T22:40:56.913150Z 0 [Note] InnoDB: Buffer pool(s) load completed at 161110 22:40:56
mysql_1        | 2016-11-10T22:40:56.924168Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
mysql_1        | 2016-11-10T22:40:56.933821Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1        | 2016-11-10T22:40:56.934131Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1        | 2016-11-10T22:40:56.934618Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1        | 2016-11-10T22:40:56.934990Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1        | 2016-11-10T22:40:56.942942Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1        | 2016-11-10T22:40:56.966925Z 0 [Note] Event Scheduler: Loaded 0 events
mysql_1        | 2016-11-10T22:40:56.967749Z 0 [Note] mysqld: ready for connections.
mysql_1        | Version: '5.7.16'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server (GPL)
mysql_1        | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
mysql_1        | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
sync-engine_1  | {"key": 3, "level": "info", "timestamp": "2016-11-10T22:40:59.314560Z", "hostname": "mysql", "module": "inbox.ignition:125", "schema_name": "inbox_3", "greenlet_id": 51397328, "event": "Not creating engine for disabled shard"}
sync-engine_1  | 
sync-engine_1  |       _   _       _
sync-engine_1  |      | \ | |     | |
sync-engine_1  |      |  \| |_   _| | __ _ ___
sync-engine_1  |      | . ` | | | | |/ _` / __|
sync-engine_1  |      | |\  | |_| | | (_| \__ \
sync-engine_1  |      \_| \_/\__, |_|\__,_|___/
sync-engine_1  |              __/ |
sync-engine_1  |             |___/
sync-engine_1  | 
sync-engine_1  |       S Y N C   E N G I N E 
sync-engine_1  | 
sync-engine_1  |      Use CTRL-C to stop.
sync-engine_1  |      
sync-engine_1  | {"process_num": 0, "host": "sync-engine", "recursion_limit": 1000, "components": ["mail sync", "contact sync", "calendar sync"], "total_processes": 1, "timestamp": "2016-11-10T22:41:02.154505Z", "greenlet_id": 139950345859312, "event": "start", "module": "__main__:75", "level": "info"}
sync-engine_1  | {"level": "info", "timestamp": "2016-11-10T22:41:02.159789Z", "module": "inbox.mailsync.service:68", "greenlet_id": 139950345859312, "supported_providers": ["icloud", "yandex", "mail.ru", "139", "yeah.net", "gmail", "qq_enterprise", "123_reg", "custom", "bluehost", "gmx", "163_qiye", "hover", "fastmail", "aol", "yahoo", "godaddy", "126", "gandi", "namecheap", "163", "qq", "zimbra", "tiliq", "aliyun", "soverin", "163_ym", "_outlook", "foxmail"], "event": "starting mail sync process", "process_number": 0}
sync-engine_1  | {"zone": null, "level": "info", "timestamp": "2016-11-10T22:41:02.199287Z", "shards": [0, 1, 2], "module": "inbox.scheduling.queue:143", "greenlet_id": 66718608, "event": "Queueing accounts"}
sync-engine_1  | {"level": "info", "timestamp": "2016-11-10T22:41:02.228200Z", "component": "syncback", "module": "__main__:75", "port": 5555, "greenlet_id": 51397328, "event": "Starting API server"}
sync-engine_1  | {"level": "info", "keys": [0, 1, 2], "timestamp": "2016-11-10T22:41:02.240379Z", "total_processes": 1, "module": "inbox.transactions.actions:273", "process_num": 0, "greenlet_id": 87039344, "event": "Starting syncback service"}
sync-engine_1  | {"level": "warning", "timestamp": "2016-11-10T22:41:02.298472Z", "module": "contextlib:35", "greenlet_id": 66718608, "original_exception": "<class 'sqlalchemy.exc.OperationalError'>", "event": "Encountered OperationalError on rollback"}
sync-engine_1  | {"level": "warning", "timestamp": "2016-11-10T22:41:02.324389Z", "module": "contextlib:35", "greenlet_id": 87039344, "original_exception": "<class 'sqlalchemy.exc.OperationalError'>", "event": "Encountered OperationalError on rollback"}
sync-engine_1  | {"error_message": "(_mysql_exceptions.OperationalError) (2003, \"Can't connect to MySQL server on 'mysql' (111)\")", "account_id": null, "timestamp": "2016-11-10T22:41:02.342668Z", "provider": null, "module": "inbox.util.concurrency:106", "occurrences": 1, "greenlet_id": 66718608, "event": "Uncaught error", "level": "error", "error_tb": "Traceback (most recent call last):\n\t  File \"/opt/sync-engine/inbox/util/concurrency.py\", line 56, in wrapped\n    return func(*args, **kwargs)\n\t  File \"/opt/sync-engine/inbox/scheduling/queue.py\", line 148, in _run_impl\n    self.enqueue_new_accounts()\n\t  File \"/opt/sync-engine/inbox/scheduling/queue.py\", line 163, in enqueue_new_accounts\n    new_accounts = self.runnable_accounts() - self.queue_client.all()\n\t  File \"/opt/sync-engine/inbox/scheduling/queue.py\", line 184, in runnable_accounts\n    Account.sync_should_run))\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py\", line 2761, in __iter__\n    return self._execute_and_instances(context)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py\", line 2774, in _execute_and_instances\n    close_with_result=True)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py\", line 2765, in _connection_from_session\n    **kw)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py\", line 893, in connection\n    execution_options=execution_options)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py\", line 898, in _connection_for_bind\n    engine, execution_options)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py\", line 334, in _connection_for_bind\n    conn = bind.contextual_connect()\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py\", line 2039, in contextual_connect\n    self._wrap_pool_connect(self.pool.connect, None),\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py\", line 2078, in _wrap_pool_connect\n    e, dialect, self)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py\", line 1405, in _handle_dbapi_exception_noconnection\n    exc_info\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py\", line 202, in raise_from_cause\n    reraise(type(exception), exception, tb=exc_tb, cause=cause)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py\", line 2074, in _wrap_pool_connect\n    return fn()\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 376, in connect\n    return _ConnectionFairy._checkout(self)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 713, in _checkout\n    fairy = _ConnectionRecord.checkout(pool)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 480, in checkout\n    rec = pool._do_get()\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 1060, in _do_get\n    self._dec_overflow()\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py\", line 60, in __exit__\n    compat.reraise(exc_type, exc_value, exc_tb)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 1057, in _do_get\n    return self._create_connection()\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 323, in _create_connection\n    return _ConnectionRecord(self)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 449, in __init__\n    self.connection = self.__connect()\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 607, in __connect\n    connection = self.__pool._invoke_creator(self)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py\", line 97, in connect\n    return dialect.connect(*cargs, **cparams)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py\", line 385, in connect\n    return self.dbapi.connect(*cargs, **cparams)\n\t  File \"/usr/local/lib/python2.7/dist-packages/MySQLdb/__init__.py\", line 81, in Connect\n    return Connection(*args, **kwargs)\n\t  File \"/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py\", line 204, in __init__\n    super(Connection, self).__init__(*args, **kwargs2)\n\tOperationalError: (_mysql_exceptions.OperationalError) (2003, \"Can't connect to MySQL server on 'mysql' (111)\")\n", "error": "OperationalError"}
sync-engine_1  | {"error_message": "(_mysql_exceptions.OperationalError) (2003, \"Can't connect to MySQL server on 'mysql' (111)\")", "account_id": null, "timestamp": "2016-11-10T22:41:02.374812Z", "provider": null, "module": "inbox.util.concurrency:106", "occurrences": 1, "greenlet_id": 87039344, "event": "Uncaught error", "level": "error", "error_tb": "Traceback (most recent call last):\n\t  File \"/opt/sync-engine/inbox/util/concurrency.py\", line 56, in wrapped\n    return func(*args, **kwargs)\n\t  File \"/opt/sync-engine/inbox/transactions/actions.py\", line 256, in _run_impl\n    self._process_log()\n\t  File \"/opt/sync-engine/inbox/transactions/actions.py\", line 213, in _process_log\n    ActionLog.status == 'pending').distinct()]\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py\", line 2761, in __iter__\n    return self._execute_and_instances(context)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py\", line 2774, in _execute_and_instances\n    close_with_result=True)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py\", line 2765, in _connection_from_session\n    **kw)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py\", line 893, in connection\n    execution_options=execution_options)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py\", line 898, in _connection_for_bind\n    engine, execution_options)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py\", line 334, in _connection_for_bind\n    conn = bind.contextual_connect()\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py\", line 2039, in contextual_connect\n    self._wrap_pool_connect(self.pool.connect, None),\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py\", line 2078, in _wrap_pool_connect\n    e, dialect, self)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py\", line 1405, in _handle_dbapi_exception_noconnection\n    exc_info\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py\", line 202, in raise_from_cause\n    reraise(type(exception), exception, tb=exc_tb, cause=cause)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py\", line 2074, in _wrap_pool_connect\n    return fn()\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 376, in connect\n    return _ConnectionFairy._checkout(self)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 713, in _checkout\n    fairy = _ConnectionRecord.checkout(pool)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 480, in checkout\n    rec = pool._do_get()\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 1060, in _do_get\n    self._dec_overflow()\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py\", line 60, in __exit__\n    compat.reraise(exc_type, exc_value, exc_tb)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 1057, in _do_get\n    return self._create_connection()\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 323, in _create_connection\n    return _ConnectionRecord(self)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 449, in __init__\n    self.connection = self.__connect()\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py\", line 607, in __connect\n    connection = self.__pool._invoke_creator(self)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py\", line 97, in connect\n    return dialect.connect(*cargs, **cparams)\n\t  File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py\", line 385, in connect\n    return self.dbapi.connect(*cargs, **cparams)\n\t  File \"/usr/local/lib/python2.7/dist-packages/MySQLdb/__init__.py\", line 81, in Connect\n    return Connection(*args, **kwargs)\n\t  File \"/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py\", line 204, in __init__\n    super(Connection, self).__init__(*args, **kwargs2)\n\tOperationalError: (_mysql_exceptions.OperationalError) (2003, \"Can't connect to MySQL server on 'mysql' (111)\")\n", "error": "OperationalError"}
sync-engine_1  |  * Running on http://0.0.0.0:16384/ (Press CTRL+C to quit)
mysql_1        | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
mysql_1        | 2016-11-10T22:41:03.025359Z 4 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1        | 2016-11-10T22:41:03.025718Z 4 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1        | 2016-11-10T22:41:03.025878Z 4 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1        | 
mysql_1        | 2016-11-10T22:41:03.057516Z 0 [Note] Giving 0 client threads a chance to die gracefully
mysql_1        | 2016-11-10T22:41:03.057730Z 0 [Note] Shutting down slave threads
mysql_1        | 2016-11-10T22:41:03.058543Z 0 [Note] Forcefully disconnecting 0 remaining clients
mysql_1        | 2016-11-10T22:41:03.059147Z 0 [Note] Event Scheduler: Purging the queue. 0 events
mysql_1        | 2016-11-10T22:41:03.059704Z 0 [Note] Binlog end
mysql_1        | 2016-11-10T22:41:03.065938Z 0 [Note] Shutting down plugin 'ngram'
mysql_1        | 2016-11-10T22:41:03.066515Z 0 [Note] Shutting down plugin 'BLACKHOLE'
mysql_1        | 2016-11-10T22:41:03.066603Z 0 [Note] Shutting down plugin 'partition'
mysql_1        | 2016-11-10T22:41:03.066878Z 0 [Note] Shutting down plugin 'ARCHIVE'
mysql_1        | 2016-11-10T22:41:03.066954Z 0 [Note] Shutting down plugin 'MEMORY'
mysql_1        | 2016-11-10T22:41:03.067361Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
mysql_1        | 2016-11-10T22:41:03.067886Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
mysql_1        | 2016-11-10T22:41:03.067962Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
mysql_1        | 2016-11-10T22:41:03.068232Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
mysql_1        | 2016-11-10T22:41:03.068307Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
mysql_1        | 2016-11-10T22:41:03.068519Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
mysql_1        | 2016-11-10T22:41:03.068568Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
mysql_1        | 2016-11-10T22:41:03.068819Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
mysql_1        | 2016-11-10T22:41:03.068893Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
mysql_1        | 2016-11-10T22:41:03.069189Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
mysql_1        | 2016-11-10T22:41:03.069299Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
mysql_1        | 2016-11-10T22:41:03.069512Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
mysql_1        | 2016-11-10T22:41:03.069594Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
mysql_1        | 2016-11-10T22:41:03.069828Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
mysql_1        | 2016-11-10T22:41:03.069878Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
mysql_1        | 2016-11-10T22:41:03.071560Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
mysql_1        | 2016-11-10T22:41:03.071642Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
mysql_1        | 2016-11-10T22:41:03.071951Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
mysql_1        | 2016-11-10T22:41:03.072022Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
mysql_1        | 2016-11-10T22:41:03.072347Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
mysql_1        | 2016-11-10T22:41:03.072413Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
mysql_1        | 2016-11-10T22:41:03.072532Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
mysql_1        | 2016-11-10T22:41:03.072609Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
mysql_1        | 2016-11-10T22:41:03.072763Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
mysql_1        | 2016-11-10T22:41:03.072849Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
mysql_1        | 2016-11-10T22:41:03.072950Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
mysql_1        | 2016-11-10T22:41:03.073170Z 0 [Note] Shutting down plugin 'INNODB_CMP'
mysql_1        | 2016-11-10T22:41:03.073241Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
mysql_1        | 2016-11-10T22:41:03.073312Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
mysql_1        | 2016-11-10T22:41:03.073397Z 0 [Note] Shutting down plugin 'INNODB_TRX'
mysql_1        | 2016-11-10T22:41:03.073445Z 0 [Note] Shutting down plugin 'InnoDB'
mysql_1        | 2016-11-10T22:41:03.076129Z 0 [Note] InnoDB: FTS optimize thread exiting.
mysql_1        | 2016-11-10T22:41:03.079602Z 0 [Note] InnoDB: Starting shutdown...
mysql_1        | 2016-11-10T22:41:03.181637Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
mysql_1        | 2016-11-10T22:41:03.183873Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 161110 22:41:03
mysql_1        | 2016-11-10T22:41:04.826233Z 0 [Note] InnoDB: Shutdown completed; log sequence number 12105390
mysql_1        | 2016-11-10T22:41:04.830274Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
mysql_1        | 2016-11-10T22:41:04.830912Z 0 [Note] Shutting down plugin 'MyISAM'
mysql_1        | 2016-11-10T22:41:04.831811Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
mysql_1        | 2016-11-10T22:41:04.832087Z 0 [Note] Shutting down plugin 'CSV'
mysql_1        | 2016-11-10T22:41:04.832332Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
mysql_1        | 2016-11-10T22:41:04.833225Z 0 [Note] Shutting down plugin 'sha256_password'
mysql_1        | 2016-11-10T22:41:04.833244Z 0 [Note] Shutting down plugin 'mysql_native_password'
mysql_1        | 2016-11-10T22:41:04.834732Z 0 [Note] Shutting down plugin 'binlog'
mysql_1        | 2016-11-10T22:41:04.837891Z 0 [Note] mysqld: Shutdown complete
mysql_1        | 
mysql_1        | 
mysql_1        | MySQL init process done. Ready for start up.
mysql_1        | 
mysql_1        | 2016-11-10T22:41:05.258929Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql_1        | 2016-11-10T22:41:05.266662Z 0 [Note] mysqld (mysqld 5.7.16) starting as process 1 ...
mysql_1        | 2016-11-10T22:41:05.278449Z 0 [Note] InnoDB: PUNCH HOLE support available
mysql_1        | 2016-11-10T22:41:05.278623Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1        | 2016-11-10T22:41:05.278950Z 0 [Note] InnoDB: Uses event mutexes
mysql_1        | 2016-11-10T22:41:05.279044Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysql_1        | 2016-11-10T22:41:05.279488Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
mysql_1        | 2016-11-10T22:41:05.279570Z 0 [Note] InnoDB: Using Linux native AIO
mysql_1        | 2016-11-10T22:41:05.280499Z 0 [Note] InnoDB: Number of pools: 1
mysql_1        | 2016-11-10T22:41:05.281065Z 0 [Note] InnoDB: Using CPU crc32 instructions
mysql_1        | 2016-11-10T22:41:05.285542Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
mysql_1        | 2016-11-10T22:41:05.285801Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
mysql_1        | 2016-11-10T22:41:05.286195Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
mysql_1        | 2016-11-10T22:41:05.286296Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
mysql_1        | 2016-11-10T22:41:05.286577Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
mysql_1        | 2016-11-10T22:41:05.286655Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
mysql_1        | 2016-11-10T22:41:05.286883Z 0 [ERROR] Failed to initialize plugins.
mysql_1        | 2016-11-10T22:41:05.287681Z 0 [ERROR] Aborting
mysql_1        | 
mysql_1        | 2016-11-10T22:41:05.287826Z 0 [Note] Binlog end
mysql_1        | 2016-11-10T22:41:05.288897Z 0 [Note] Shutting down plugin 'MyISAM'
mysql_1        | 2016-11-10T22:41:05.288987Z 0 [Note] Shutting down plugin 'CSV'
mysql_1        | 2016-11-10T22:41:05.289765Z 0 [Note] mysqld: Shutdown complete
mysql_1        | 
kadza_mysql_1 exited with code 1

Thats whole run process i have no clue what is the cause im trying to run it via fresh digitalocean droplet on ubuntu 16.04

nhurel commented 8 years ago

Hello, you might encounter the same issue than https://github.com/nhurel/nylas-sync-engine/issues/12 Can you try the fix described in the last comment : https://github.com/nhurel/nylas-sync-engine/issues/12#issuecomment-255170246 and let me know if it fixes your issue ?

FYI, I've just updated the README to help starting the containers for the first run.

HTH

djedlajn commented 8 years ago

Yeah thanks, its all up and running now but how do i point it towards the ip of the droplet ? edit: I managed to to auth my mail account but since im fresh to docker i have no clue how can i pass ip of ther server to sync-engine.

nhurel commented 8 years ago

If you used the same docker-compose file as given in example, the sync-engine is exposed on port 5555. You can access to http://:5555/acccounts in your browser to check eveything is OK.

djedlajn commented 8 years ago

I can go to the ip of dropplet :5555/accounts but when i try to sync it with client i get this error. deepinscreenshot20161111142434 It has to do with etc/hosts or some flag that i need when running sync engine... edit: i have found those settigns when i inspected sync-engine i guess this needs to be changed ?

"NetworkSettings": {
            "Bridge": "",
            "SandboxID": "133a0673d22131eb2b78cf36e75f3a07c84b5d74c6010f63c5b9692d07370833",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "5555/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "5555"
                    }
                ]
            },
nhurel commented 8 years ago

Looks more like an issue in N1 client. I assume you're running the latest release ? Did you specify correctly your sync engine URL and port at N1 first start ? Try to restart N1. If it doesn't fix, check the N1 config.json file in the .nylas directory (in your home directory) : You should see the env key set to custom and should also have syncEngine.APIRoot key pointing to your sync-engine URL

djedlajn commented 8 years ago

Thanks strangely restarting N1 client fixed it :+1: I will be closing the thread. Note: You could add to the readme that more than 512mb of ram is needed to run containers properly. I have done some testing it may run on coreOS but is prone to crash. Thanks again.