1

场景:我们正在尝试通过 AMQP 服务器使用 nameko 连接到 RabbitMQ。下面是回溯,

Traceback (most recent call last):
  File "d:\programfiles\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "d:\programfiles\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\ProgramFiles\Scripts\nameko.exe\__main__.py", line 9, in <module>
  File "d:\programfiles\lib\site-packages\nameko\cli\main.py", line 72, in main
    args.main(args)
  File "d:\programfiles\lib\site-packages\nameko\cli\commands.py", line 85, in main
    main(args)
  File "d:\programfiles\lib\site-packages\nameko\cli\run.py", line 182, in main
    run(services, config, backdoor_port=args.backdoor_port)
  File "d:\programfiles\lib\site-packages\nameko\cli\run.py", line 129, in run
    service_runner.start()
  File "d:\programfiles\lib\site-packages\nameko\runners.py", line 66, in start
    SpawningProxy(self.containers).start()
  File "d:\programfiles\lib\site-packages\nameko\utils\__init__.py", line 186, in spawning_method
    return list(pool.imap(call, self._items))
  File "d:\programfiles\lib\site-packages\eventlet\greenpool.py", line 244, in next
    val = self.waiters.get().wait()
  File "d:\programfiles\lib\site-packages\eventlet\greenthread.py", line 179, in wait
    return self._exit_event.wait()
  File "d:\programfiles\lib\site-packages\eventlet\event.py", line 121, in wait
    return hubs.get_hub().switch()
  File "d:\programfiles\lib\site-packages\eventlet\hubs\hub.py", line 295, in switch
    return self.greenlet.switch()
  File "d:\programfiles\lib\site-packages\eventlet\hubs\hub.py", line 347, in run
    self.wait(sleep_time)
  File "d:\programfiles\lib\site-packages\eventlet\hubs\selects.py", line 50, in wait
    writers.get(fileno, noop).cb(fileno)
  File "d:\programfiles\lib\site-packages\eventlet\greenthread.py", line 218, in main
    result = function(*args, **kwargs)
  File "d:\programfiles\lib\site-packages\nameko\utils\__init__.py", line 181, in call
    return getattr(item, name)(*args, **kwargs)
  File "d:\programfiles\lib\site-packages\nameko\messaging.py", line 225, in setup
    verify_amqp_uri(self.amqp_uri)
  File "d:\programfiles\lib\site-packages\nameko\amqp\utils.py", line 49, in verify_amqp_uri
    with transport.establish_connection():
  File "d:\programfiles\lib\site-packages\kombu\transport\pyamqp.py", line 116, in establish_connection
    conn = self.Connection(**opts)
  File "d:\programfiles\lib\site-packages\nameko\amqp\utils.py", line 26, in init
    super(ConnectionTester, self).__init__(*args, **kwargs)
  File "d:\programfiles\lib\site-packages\amqp\connection.py", line 165, in init
    self.transport = self.Transport(host, connect_timeout, ssl)
  File "d:\programfiles\lib\site-packages\amqp\connection.py", line 186, in Transport
    return create_transport(host, connect_timeout, ssl)
  File "d:\programfiles\lib\site-packages\amqp\transport.py", line 299, in create_transport
    return TCPTransport(host, connect_timeout)
  File "d:\programfiles\lib\site-packages\amqp\transport.py", line 95, in init
    raise socket.error(last_err)
OSError: [Errno 10061] WSAECONNREFUSED

我们用来运行的命令,

nameko run --config configuration/nameko.yml test 3000 &

nameko.yml文件包含以下配置,

AMQP_URI: amqp://guest:guest@10.10.10.10:5672    
WEB_SERVER_ADDRESS: 10.10.10.10:5672

操作系统: Windows 10(Python 代码)Linux(RabbitMQ 服务器)

请帮助我们解决这个问题。

4

1 回答 1

0

防火墙是否有可能阻止传入(在兔子服务器上)或传出(来自 Windows 服务器)连接?

您可以例如 telnet 或以其他方式验证您可以在配置中的 ipaddress 和端口上从 windows 服务器连接到 linux 服务器吗?

于 2017-10-27T18:10:16.203 回答