Hello,
python zmq_client.py -j 357 --hostname 127.0.0.1 -t 1200" should work.


Cheers


Le ven. 18 janv. 2019 à 10:13, cnspring2002 <cnspring2002@aliyun.com> a écrit :
Just use the sample command "python zmq_client.py -j 357 --hostname tcp://127.0.0.1:5500 -t 1200"

Get the error:

Traceback (most recent call last):
  File "zmq_client_1.py", line 155, in <module>
    main()
  File "zmq_client_1.py", line 139, in main
    publisher = lookup_publisher(options.hostname, options.https)
  File "zmq_client_1.py", line 109, in lookup_publisher
    socket = server.scheduler.get_publisher_event_socket()
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1092, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1432, in __request
    verbose=self.__verbose
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1134, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1146, in single_request
    http_conn = self.send_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1259, in send_request
    self.send_content(connection, request_body)
  File "/usr/lib/python3.5/xmlrpc/client.py", line 1289, in send_content
    connection.endheaders(request_body)
  File "/usr/lib/python3.5/http/client.py", line 1103, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
    self.send(msg)
  File "/usr/lib/python3.5/http/client.py", line 877, in send
    self.connect()
  File "/usr/lib/python3.5/http/client.py", line 849, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib/python3.5/socket.py", line 694, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib/python3.5/socket.py", line 733, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

I wonder for following code, why http://tcp://127.0.0.1:5500/RPC2 will finally be passed to ServerProxy?
If I remove http, just tcp://127.0.0.1:5500/RPC2, it will say "OSError: unsupported XML-RPC protocol"
If I remove tcp, just http://127.0.0.1:5500/RPC2, it will hang in get_publisher_event_socket

I use 2018.11 version, please suggest!!!

    xmlrpc_url = "http://%s/RPC2" % (hostname)
    if https:
        xmlrpc_url = "https://%s/RPC2" % (hostname)
    server = xmlrpc.client.ServerProxy(xmlrpc_url)
    try:
        socket = server.scheduler.get_publisher_event_socket()

_______________________________________________
Lava-users mailing list
Lava-users@lists.lavasoftware.org
https://lists.lavasoftware.org/mailman/listinfo/lava-users


--
Rémi Duraffort
LAVA Team