vulogov / zas_agent

Zabbix Agent Simulator
GNU General Public License v2.0
43 stars 16 forks source link

ERROR: Problem handling request. #2

Closed alexanderzobnin closed 8 years ago

alexanderzobnin commented 8 years ago

I started daemon by this commnad: zas_agent.py --start --daemonize --listen 127.0.0.1 --port 10060 --redis_host 127.0.0.1 --redis_port 6379 --log '/var/log/zabbix/zas_agent.log' and then trying to get value from agent: zabbix_get -s 127.0.0.1 -p 10060 -k agent.ping but can't get anymore. There is error in log:

INFO:root:Listening 127.0.0.1:10060
DEBUG:zas_server:listening
DEBUG:zas_server:Got connection
DEBUG:zas_server:Started process <Process(Process-1, started daemon)>
DEBUG:process-('127.0.0.1', 41173):Connected <socket._socketobject object at 0x27bf130> at ('127.0.0.1', 41173)
ERROR:process-('127.0.0.1', 41173):Problem handling request
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/zas_agent-0.1.1-py2.7.egg/EGG-INFO/scripts/zas_agent.py", line 268, in handle
  File "/usr/lib/python2.7/site-packages/zas_agent-0.1.1-py2.7.egg/EGG-INFO/scripts/zas_agent.py", line 190, in protocol_v1
TypeError: 'NoneType' object is not iterable
DEBUG:process-('127.0.0.1', 41173):Closing socket

When I'm started zas_agent without `--daemonize' it's returns values but I'm get this error in console:

DEBUG:zas_server:Started process <Process(Process-3, started daemon)>
DEBUG:process-('127.0.0.1', 40620):Connected <socket._socketobject object at 0x20eb1a0> at ('127.0.0.1', 40620)
ERROR:process-('127.0.0.1', 40620):Problem handling request
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/zas_agent-0.1.1-py2.7.egg/EGG-INFO/scripts/zas_agent.py", line 271, in handle
  File "/usr/lib/python2.7/site-packages/zas_agent-0.1.1-py2.7.egg/EGG-INFO/scripts/zas_agent.py", line 190, in protocol_v1
TypeError: 'NoneType' object is not iterable
DEBUG:process-('127.0.0.1', 40620):Closing socket
vulogov commented 8 years ago

Fixed improper return of values from function locate_key for the case, where none of the keys are found. Please attach your zas_scenario.cfg, so I can do the further tests.

alexanderzobnin commented 8 years ago

@vulogov Thanks! I used default scenario from /etc/zas_scenario.cfg

vulogov commented 8 years ago

Is it working now for you ?

alexanderzobnin commented 8 years ago

Yes, now I nave no errors, thanks!