网友分享给我的,分享给大家
我的agent无法向server注册,确切的说,是有的时候能注册,有的时候注册不成功。错误信息如下:
- MainThread agent ERROR Failed to connect to previous supervisor.
- Traceback (most recent call last):
- File "/home/opt/cm-5.2.0/lib64/cmf/agent/src/cmf/agent.py", line 1296, in find_or_start_supervisor
- self.get_supervisor_process_info()
- File "/home/opt/cm-5.2.0/lib64/cmf/agent/src/cmf/agent.py", line 1497, in get_supervisor_process_info
- self.identifier = self.supervisor_client.supervisor.getIdentification()
- File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
- return self.__send(self.__name, args)
- File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
- verbose=self.__verbose
- File "/home/opt/cm-5.2.0/lib64/cmf/agent/build/env/lib/python2.6/site-packages/supervisor-3.0-py2.6.egg/supervisor/xmlrpc.py", line 460, in request
- self.connection.request('POST', handler, request_body, self.headers)
- File "/usr/lib64/python2.6/httplib.py", line 914, in request
- self._send_request(method, url, body, headers)
- File "/usr/lib64/python2.6/httplib.py", line 951, in _send_request
- self.endheaders()
- File "/usr/lib64/python2.6/httplib.py", line 908, in endheaders
- self._send_output()
- File "/usr/lib64/python2.6/httplib.py", line 780, in _send_output
- self.send(msg)
- File "/usr/lib64/python2.6/httplib.py", line 739, in send
- self.connect()
- File "/usr/lib64/python2.6/httplib.py", line 720, in connect
- self.timeout)
- File "/usr/lib64/python2.6/socket.py", line 567, in create_connection
- raise error, msg
复制代码
问题已经解决了
就是agent启动的时候会在本地生成两个文件标识这个agent
- -rw-r--r-- 1 root root 48834 Nov 20 20:45 response.avro
- -rw-r--r-- 1 root root 36 Nov 19 15:13 uuid
复制代码
如果我从一个agent考到另一个agent,而没有删除这两个文件,就会报心跳问题
|