yandex / yandex-tank

Load and performance benchmark tool
Other
2.46k stars 279 forks source link

[ERROR] Telegraf agent send trash to output: Exception in thread Thread-1: #768

Open loordy opened 5 years ago

loordy commented 5 years ago

Использую docker-image Не могу настроить телеграф получаю 14:36:18 [INFO] Found agent config file in working directory with the same name as created for host @.@.@. Creating new one via tempfile. This will affect predictable filenames for agent artefacts 14:36:18 [INFO] Found agent startup config file in working directory with the same name as created for host @.@.@. Creating new one via tempfile. This will affect predictable filenames for agent artefacts 14:36:18 [INFO] Found agent custom execs config file in working directory with the same name as created for host @.@.@. Creating new one via tempfile. This will affect predictable filenames for agent artefacts 14:36:18 [INFO] Execute on @.@.@: /usr/bin/env python2 -c 'import os; print os.path.isfile("/tmp/telegraf")' 14:36:19 [INFO] Sending [/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Telegraf/agent/agent.py] to @.@.@:[/tmp/tmp46N8rB/agent.py] 14:36:20 [INFO] Transferring /usr/local/lib/python2.7/dist-packages/yandextank/plugins/Telegraf/agent/agent.py: 100% 14:36:20 [INFO] Sending [/tmp/agent_collector_AzUrUw.cfg] to @.@.@:[/tmp/tmp46N8rB/agent.cfg] 14:36:21 [INFO] Transferring /tmp/agent_collector_AzUrUw.cfg: 100% 14:36:21 [INFO] Sending [/tmp/agent_jALbDE.cfg] to @.@.@:[/tmp/tmp46N8rB/agent_startup.cfg] 14:36:22 [INFO] Transferring /tmp/agent_jALbDE.cfg: 100% 14:36:22 [INFO] Sending [/tmp/agent_customs_IdQPSI.sh] to @.@.@:[/tmp/tmp46N8rB/agent_customs.sh] 14:36:23 [INFO] Transferring /tmp/agent_customs_IdQPSI.sh: 100% 14:36:23 [INFO] Starting agent: @.@.@ 14:36:25 [ERROR] Telegraf agent send trash to output: Exception in thread Thread-1:

loordy commented 5 years ago

2019-07-05 15:58:11,595 [DEBUG] yandextank.plugins.Telegraf.collector collector.py:112 Polling/decoding agents data took: 0.06ms 2019-07-05 15:58:11,796 [ERROR] yandextank.plugins.Telegraf.reader reader.py:73 Telegraf agent send trash to output: Exception in thread Thread-1: 2019-07-05 15:58:11,798 [DEBUG] yandextank.plugins.Telegraf.reader reader.py:76 Telegraf agent data block w/ trash: %s Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Telegraf/reader.py", line 37, in _decode_agents_data jsn = json.loads(chunk) File "/usr/lib/python2.7/json/init.py", line 339, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

loordy commented 5 years ago

agent log 2019-07-06 15:07:10,380 [INFO] agent:402 Init 2019-07-06 15:07:10,381 [INFO] agent:410 Trying to make telegraf executable: /tmp/telegraf 2019-07-06 15:07:10,381 [INFO] agent:420 Trying to make customs script executable: /tmp/tmpzea72f/agent_customs.sh 2019-07-06 15:07:10,383 [INFO] agent:235 Successfully loaded startup config. Startups: [] Shutdowns: []

2019-07-06 15:07:10,384 [INFO] agent:432 Starting AgentWorker: <AgentWorker(Thread-1, initial daemon)> 2019-07-06 15:07:10,384 [INFO] agent:241 Running startup commands 2019-07-06 15:07:10,385 [INFO] agent:250 Starting metrics collector.. 2019-07-06 15:07:10,398 [DEBUG] agent:436 Check for any stdin command for shutdown 2019-07-06 15:07:25,922 [WARNING] agent:27 Got signal 17, ignoring 2019-07-06 15:07:25,922 [INFO] agent:439 Stdin cmd received: stop

mikhail-angelov commented 5 years ago

I had similar problem the root case was - incorrect python environment on my local host to check it you can install Telegraf on your host I used this instruction https://devconnected.com/how-to-setup-telegraf-influxdb-and-grafana-on-linux/ then try to run command on this host which is listed in logs in my case /usr/bin/env python2 /tmp/tmpI5294j/agent.py --telegraf /tmp/telegraf --host 11.11.11.11 it should run without errors if not errors will help you to setup host environment correctly