connect to scheduler rpc error: error(111, 'Connection refused') with docker

394 views
Skip to first unread message

HD

unread,
Jan 22, 2017, 2:57:37 PM1/22/17
to pyspider-users
Hi I am trying to run pyspider in docker, but i constantly get the following error:

connect to scheduler rpc error: error(111, 'Connection refused')



docker-compose.yml:
version: '2'
services:
  #NOTE: It's recommended to run mysql and rabbitmq outside compose as they may not been restarted with pyspider. You can find commands to start mysql and rabbitmq service above.
 rabbitmq: 
   image: rabbitmq:latest
 mysql:
   image: mysql:latest
   volumes: 
     - ./data/mysql:/var/lib/mysql
   environment: 
     - MYSQL_ALLOW_EMPTY_PASSWORD=yes
  ####
 phantomjs:
   image: binux/pyspider:latest
   command: phantomjs
 result:
    image: binux/pyspider:latest
    external_links:
    #depends_on: 
      - mysql
      - rabbitmq
    command: result_worker
 processor:
    image: binux/pyspider:latest
    external_links:
    #depends_on: 
      - mysql
      - rabbitmq
    command: processor
 fetcher:
    image: binux/pyspider:latest
    external_links:
    #depends_on: 
      - rabbitmq
    links:
      - phantomjs
    command : fetcher
 scheduler:
    image: binux/pyspider:latest
    external_links:
    #depends_on: 
      - mysql
      - rabbitmq
    command: scheduler
 webui:
    image: binux/pyspider:latest
    external_links:
    #depends_on: 
      - mysql
      - rabbitmq
    links:
      - scheduler
      - phantomjs
    command: webui
    ports:
      - "5000:5000" 




full logs:

$ docker-compose up

Starting composetestpyspider01_scheduler_1

Starting composetestpyspider01_phantomjs_1

Starting composetestpyspider01_mysql_1

Starting composetestpyspider01_result_1

Starting composetestpyspider01_processor_1

Starting composetestpyspider01_rabbitmq_1

Starting composetestpyspider01_fetcher_1

Starting composetestpyspider01_webui_1

Attaching to composetestpyspider01_phantomjs_1, composetestpyspider01_processor_1, composetestpyspider01_scheduler_1, composetestpyspider01_result_1, composetestpyspider01_mysql_1, composetestpyspider01_rabbitmq_1, composetestpyspider01_fetcher_1, composetestpyspider01_webui_1

result_1     | [I 170122 19:45:11 result_worker:49] result_worker starting...

processor_1  | [I 170122 19:45:11 processor:210] processor starting...

scheduler_1  | [I 170122 19:45:11 scheduler:647] scheduler starting...

scheduler_1  | [I 170122 19:45:11 scheduler:782] scheduler.xmlrpc listening on 0.0.0.0:23333

fetcher_1    | [I 170122 19:45:11 tornado_fetcher:638] fetcher starting...

scheduler_1  | [I 170122 19:45:11 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0

webui_1      | [I 170122 19:45:12 app:76] webui running on 0.0.0.0:5000

mysql_1      | 2017-01-22T19:45:12.227273Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

mysql_1      | 2017-01-22T19:45:12.235335Z 0 [Note] mysqld (mysqld 5.7.16) starting as process 1 ...

mysql_1      | 2017-01-22T19:45:12.240206Z 0 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive

mysql_1      | 2017-01-22T19:45:12.249670Z 0 [Note] InnoDB: PUNCH HOLE support available

mysql_1      | 2017-01-22T19:45:12.249726Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

mysql_1      | 2017-01-22T19:45:12.249737Z 0 [Note] InnoDB: Uses event mutexes

mysql_1      | 2017-01-22T19:45:12.249748Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier

mysql_1      | 2017-01-22T19:45:12.249788Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3

mysql_1      | 2017-01-22T19:45:12.249937Z 0 [Note] InnoDB: Using Linux native AIO

mysql_1      | 2017-01-22T19:45:12.254844Z 0 [Note] InnoDB: Number of pools: 1

mysql_1      | 2017-01-22T19:45:12.266705Z 0 [Note] InnoDB: Using CPU crc32 instructions

mysql_1      | 2017-01-22T19:45:12.280337Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M

mysql_1      | 2017-01-22T19:45:12.301256Z 0 [Note] InnoDB: Completed initialization of buffer pool

mysql_1      | 2017-01-22T19:45:12.310622Z 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      | 2017-01-22T19:45:12.348337Z 0 [Note] InnoDB: Highest supported file format is Barracuda.

phantomjs_1  | Web server running on port 25555

mysql_1      | 2017-01-22T19:45:12.431903Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables

mysql_1      | 2017-01-22T19:45:12.433176Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...

mysql_1      | 2017-01-22T19:45:12.512279Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.

mysql_1      | 2017-01-22T19:45:12.525706Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.

mysql_1      | 2017-01-22T19:45:12.525770Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.

mysql_1      | 2017-01-22T19:45:12.527455Z 0 [Note] InnoDB: 5.7.16 started; log sequence number 12138425

mysql_1      | 2017-01-22T19:45:12.527947Z 0 [Note] Plugin 'FEDERATED' is disabled.

mysql_1      | 2017-01-22T19:45:12.529239Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool

mysql_1      | 2017-01-22T19:45:12.570326Z 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      | 2017-01-22T19:45:12.571487Z 0 [Note] Server hostname (bind-address): '*'; port: 3306

mysql_1      | 2017-01-22T19:45:12.571625Z 0 [Note] IPv6 is available.

mysql_1      | 2017-01-22T19:45:12.571828Z 0 [Note]   - '::' resolves to '::';

mysql_1      | 2017-01-22T19:45:12.572059Z 0 [Note] Server socket created on IP: '::'.

mysql_1      | 2017-01-22T19:45:12.577571Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170122 19:45:12

mysql_1      | 2017-01-22T19:45:12.615334Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.

mysql_1      | 2017-01-22T19:45:12.616122Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.

mysql_1      | 2017-01-22T19:45:12.661617Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.

mysql_1      | 2017-01-22T19:45:12.847445Z 0 [Note] Event Scheduler: Loaded 0 events

mysql_1      | 2017-01-22T19:45:12.848031Z 0 [Note] mysqld: ready for connections.

mysql_1      | Version: '5.7.16'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)

rabbitmq_1   | 

rabbitmq_1   | =INFO REPORT==== 22-Jan-2017::19:45:13 ===

rabbitmq_1   | Starting RabbitMQ 3.6.6 on Erlang 19.2

rabbitmq_1   | Copyright (C) 2007-2016 Pivotal Software, Inc.

rabbitmq_1   | Licensed under the MPL.  See http://www.rabbitmq.com/

rabbitmq_1   | 

rabbitmq_1   |               RabbitMQ 3.6.6. Copyright (C) 2007-2016 Pivotal Software, Inc.

rabbitmq_1   |   ##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/

rabbitmq_1   |   ##  ##

rabbitmq_1   |   ##########  Logs: tty

rabbitmq_1   |   ######  ##        tty

rabbitmq_1   |   ##########

rabbitmq_1   |               Starting broker...

rabbitmq_1   | 

rabbitmq_1   | =INFO REPORT==== 22-Jan-2017::19:45:13 ===

rabbitmq_1   | node           : rabbit@6fb507e8d94e

rabbitmq_1   | home dir       : /var/lib/rabbitmq

rabbitmq_1   | config file(s) : /etc/rabbitmq/rabbitmq.config

rabbitmq_1   | cookie hash    : r2+5aaLrKS1/1UAI6debKw==

rabbitmq_1   | log            : tty

rabbitmq_1   | sasl log       : tty

rabbitmq_1   | database dir   : /var/lib/rabbitmq/mnesia/rabbit@6fb507e8d94e

rabbitmq_1   | 

rabbitmq_1   | =INFO REPORT==== 22-Jan-2017::19:45:14 ===

rabbitmq_1   | Memory limit set to 799MB of 1998MB total.

rabbitmq_1   | 

rabbitmq_1   | =INFO REPORT==== 22-Jan-2017::19:45:14 ===

rabbitmq_1   | Disk free limit set to 50MB

rabbitmq_1   | 

rabbitmq_1   | =INFO REPORT==== 22-Jan-2017::19:45:14 ===

rabbitmq_1   | Limiting to approx 1048476 file handles (943626 sockets)

rabbitmq_1   | 

rabbitmq_1   | =INFO REPORT==== 22-Jan-2017::19:45:14 ===

rabbitmq_1   | FHC read buffering:  OFF

rabbitmq_1   | FHC write buffering: ON

rabbitmq_1   | 

rabbitmq_1   | =INFO REPORT==== 22-Jan-2017::19:45:14 ===

rabbitmq_1   | Priority queues enabled, real BQ is rabbit_variable_queue

rabbitmq_1   | 

rabbitmq_1   | =INFO REPORT==== 22-Jan-2017::19:45:14 ===

rabbitmq_1   | Starting rabbit_node_monitor

rabbitmq_1   | 

rabbitmq_1   | =INFO REPORT==== 22-Jan-2017::19:45:14 ===

rabbitmq_1   | msg_store_transient: using rabbit_msg_store_ets_index to provide index

rabbitmq_1   | 

rabbitmq_1   | =INFO REPORT==== 22-Jan-2017::19:45:14 ===

rabbitmq_1   | msg_store_persistent: using rabbit_msg_store_ets_index to provide index

rabbitmq_1   | 

rabbitmq_1   | =WARNING REPORT==== 22-Jan-2017::19:45:14 ===

rabbitmq_1   | msg_store_persistent: rebuilding indices from scratch

rabbitmq_1   | 

rabbitmq_1   | =INFO REPORT==== 22-Jan-2017::19:45:14 ===

rabbitmq_1   | started TCP Listener on [::]:5672

rabbitmq_1   |  completed with 0 plugins.

rabbitmq_1   | 

rabbitmq_1   | =INFO REPORT==== 22-Jan-2017::19:45:14 ===

rabbitmq_1   | Server startup complete; 0 plugins started.

webui_1      | [W 170122 19:45:50 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:45:59 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

scheduler_1  | [I 170122 19:46:11 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0

webui_1      | [W 170122 19:46:14 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:46:29 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:46:45 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:47:04 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

scheduler_1  | [I 170122 19:47:12 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0

webui_1      | [W 170122 19:47:15 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:47:29 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:47:45 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:47:59 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

scheduler_1  | [I 170122 19:48:12 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0

webui_1      | [W 170122 19:48:15 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:48:29 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:48:45 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:49:05 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

scheduler_1  | [I 170122 19:49:12 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0

webui_1      | [W 170122 19:49:15 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:49:35 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:49:44 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:50:05 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

scheduler_1  | [I 170122 19:50:12 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0

webui_1      | [W 170122 19:50:14 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:50:30 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:50:45 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:51:00 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

scheduler_1  | [I 170122 19:51:12 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0

webui_1      | [W 170122 19:51:21 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:51:30 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:51:45 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:52:00 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

scheduler_1  | [I 170122 19:52:12 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0

webui_1      | [W 170122 19:52:15 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:52:30 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:52:51 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:53:02 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

scheduler_1  | [I 170122 19:53:12 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0

webui_1      | [W 170122 19:53:17 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:53:31 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:53:50 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:54:00 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

scheduler_1  | [I 170122 19:54:12 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0

webui_1      | [W 170122 19:54:21 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:54:30 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:54:45 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:55:00 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

scheduler_1  | [I 170122 19:55:12 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0

webui_1      | [W 170122 19:55:15 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:55:30 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:55:51 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:56:03 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

scheduler_1  | [I 170122 19:56:12 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0

webui_1      | [W 170122 19:56:19 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:56:33 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:56:45 index:108] connect to scheduler rpc error: error(111, 'Connection refused')

webui_1      | [W 170122 19:57:00 index:108] connect to scheduler rpc error: error(111, 'Connection refused')




Message has been deleted

HD

unread,
Apr 18, 2017, 10:49:36 AM4/18/17
to pyspider-users
Maybe u can help me: Somehow the webui is not able to connect to the scheduler. Can i add parameters or enable debugging to see further information?


Am Sonntag, 22. Januar 2017 20:57:37 UTC+1 schrieb HD:
Hi I am trying to run pyspider in docker, but i constantly get the following error:

connect to scheduler rpc error: error(111, 'Connection refused')



Updated docker-compose.yml:
version: "3"
services:
#NOTE: It's recommended to run mysql and rabbitmq outside compose as they may not been restarted with pyspider. You can find commands to start mysql and rabbitmq service above.
mysql:
image: mysql:latest
volumes:
- ./data/mysql:/var/lib/mysql
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
##### Temp Delete this only for debugging #####
ports:
- 3306:3306
rabbitmq:
image: rabbitmq:latest

phantomjs:
image: binux/pyspider:latest
command: phantomjs
result:
image: binux/pyspider:latest
depends_on:
- mysql
- rabbitmq
command: result_worker
processor:
image: binux/pyspider:latest
depends_on:
- mysql
- rabbitmq
command: processor
fetcher:
image: binux/pyspider:latest
depends_on:
- rabbitmq
links:
- phantomjs
command : fetcher
scheduler:
image: binux/pyspider:latest
depends_on:
- mysql
- rabbitmq
command: scheduler
webui:
image: binux/pyspider:latest
depends_on:
- mysql
- rabbitmq
links:
- scheduler
- phantomjs
- fetcher
command: webui --scheduler-rpc "http://scheduler:23333/
ports:
- "5000:5000"


Roy Binux

unread,
Apr 24, 2017, 4:21:43 PM4/24/17
to HD, pyspider-users
you could use `docker exec` go into the container and try connect to scheduler manually to find out.

--
You received this message because you are subscribed to the Google Groups "pyspider-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyspider-user...@googlegroups.com.
To post to this group, send email to pyspide...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyspider-users/abbfa3fd-0e31-4ec0-8208-df164942198f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

HD

unread,
Apr 26, 2017, 11:59:17 AM4/26/17
to pyspider-users, jensvon...@gmail.com, r...@binux.me


Maybe u can help me how:
- The scheduler seams to be running. But somehow the other parts cant connect to it.
- Which command would u use to start the scheduler manually or to make a test connection from another/the same image to the scheduler? (I will exec them in the docker image via docker exec)

Roy Binux

unread,
May 2, 2017, 3:19:32 AM5/2/17
to HD, pyspider-users
Message has been deleted

HD

unread,
May 3, 2017, 1:20:03 PM5/3/17
to pyspider-users, jensvon...@gmail.com, r...@binux.me

Can u help me what to try next? This is the output. It seams that the scheduler is running. see the following output:

Out# curl -v http://scheduler:23333/


* Hostname was NOT found in DNS cache

*   Trying 172.29.0.5...

* Connected to scheduler (172.29.0.5) port 23333 (#0)

> GET / HTTP/1.1

> User-Agent: curl/7.38.0

> Host: scheduler:23333

> Accept: */*

>

< HTTP/1.1 400 Bad request

< Content-Length: 0

< Content-Type: text/plain

* Server TornadoServer/4.4.2 is not blacklisted

< Server: TornadoServer/4.4.2

<

* Connection #0 to host scheduler left intact

Roy Binux

unread,
May 3, 2017, 4:28:47 PM5/3/17
to HD, pyspider-users
So, you executed `curl -v http://scheduler:23333/` in webui container? it looks working fine. Have no idea.

--
You received this message because you are subscribed to the Google Groups "pyspider-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyspider-user...@googlegroups.com.
To post to this group, send email to pyspide...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages