Error starting a Pyro Name server

753 Views Asked by At

I have an Amazon ec-2 instance, with public ip 52.62.132.33.

Trying to start a name server pops the below error message.

(venv)[ec2-user@ip-172-31-6-10 ~]$ pyro4-ns -n 52.62.132.33
Traceback (most recent call last):
  File "/home/ec2-user/venv/bin/pyro4-ns", line 11, in <module>
    sys.exit(main())
  File "/home/ec2-user/venv/local/lib/python2.7/site-packages/Pyro4/naming.py", line 561, in main
    hmac=options.key)
  File "/home/ec2-user/venv/local/lib/python2.7/site-packages/Pyro4/naming.py", line 369, in startNSloop
    daemon = NameServerDaemon(host, port, unixsocket, nathost=nathost, natport=natport, storage=storage)
  File "/home/ec2-user/venv/local/lib/python2.7/site-packages/Pyro4/naming.py", line 251, in __init__
    super(NameServerDaemon, self).__init__(host, port, unixsocket, nathost=nathost, natport=natport)
  File "/home/ec2-user/venv/local/lib/python2.7/site-packages/Pyro4/core.py", line 901, in __init__
    self.transportServer.init(self, host, port, unixsocket)
  File "/home/ec2-user/venv/local/lib/python2.7/site-packages/Pyro4/socketserver/threadpoolserver.py", line 103, in init
    self.sock = socketutil.createSocket(bind=bind_location, reuseaddr=Pyro4.config.SOCK_REUSE, timeout=Pyro4.config.COMMTIMEOUT, noinherit=True, nodelay=Pyro4.config.SOCK_NODELAY)
  File "/home/ec2-user/venv/local/lib/python2.7/site-packages/Pyro4/socketutil.py", line 285, in createSocket
    sock.bind(bind)
  File "/usr/lib64/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 99] Cannot assign requested address

Starting the Name server with a private IP address was fine, but then I can't access the server from outside the network.

How to make it so Pyro is accessible from outside network?

0

There are 0 best solutions below