-
Type:
Problem report
-
Status:
Closed -
Priority:
Minor
-
Resolution:
Fixed
-
Affects Version/s:
3.4.10
-
Fix Version/s:
None
-
Environment:
Hide
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial$ dpkg -l |grep zabb
ii percona-zabbix-templates 1.1.8-1.trusty all Percona Monitoring Plugins for Zabbix
ii zabbix-agent 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — agent
ii zabbix-frontend-php 1:3.4.10-1+trusty all Zabbix network monitoring solution — PHP front-end
ii zabbix-get 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — get
ii zabbix-java-gateway 1:3.4.10-1+trusty all Zabbix network monitoring solution — java-gateway
ii zabbix-release 3.4-1+trusty all Zabbix official repository configuration
ii zabbix-sender 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — sender
ii zabbix-server-mysql 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — server (MySQL)Show
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
$ dpkg -l |grep zabb
ii percona-zabbix-templates 1.1.8-1.trusty all Percona Monitoring Plugins for Zabbix
ii zabbix-agent 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — agent
ii zabbix-frontend-php 1:3.4.10-1+trusty all Zabbix network monitoring solution — PHP front-end
ii zabbix-get 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — get
ii zabbix-java-gateway 1:3.4.10-1+trusty all Zabbix network monitoring solution — java-gateway
ii zabbix-release 3.4-1+trusty all Zabbix official repository configuration
ii zabbix-sender 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — sender
ii zabbix-server-mysql 1:3.4.10-1+trusty amd64 Zabbix network monitoring solution — server (MySQL)
Steps to reproduce:
- Execute the following curl commands:
curl -i -X POST -H 'Content-type:application/json' -d '{"jsonrpc":"2.0","method":"user.login","params":{ "user":"myuser","password":"mypassword"},"auth":null,"id":0}' http:
- Navigate to screen title…
- Click on screen element…
- …
Result:
See screenshot…
See log file…
See memory dump…
Expected:
See screenshot….
See attached patch file…
Describe the bug
When try to get metrics from group of hosts (more than 50) —> Error ‘request failed, status: 500 Internal Server Error’
Can it be from plugin error, because with old (3version) plugin it worked normal?
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Publication successful" logger=live user=16 channel=grafana/dashboard/uid/dtx8-Ednk
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Querying for data source via SQL store" logger=datasources id=5 orgId=1
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Initializing new data source instance" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Zabbix request" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=apiinfo.version
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Got Zabbix version" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource version=54.000
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Zabbix request" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=apiinfo.version
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Zabbix request" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=hostgroup.get
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Successfully authenticated" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource url=http://ZABBBIX_XXX/api_jsonrpc.php user=XXX
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Zabbix request" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=hostgroup.get
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Writing result to cache" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=hostgroup.get
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Zabbix request" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=host.get
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Writing result to cache" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=host.get
t=2021-12-04T16:09:53+0300 lvl=dbug msg="Zabbix request" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource method=item.get
t=2021-12-04T16:09:59+0300 lvl=eror msg="Zabbix API request error" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource error="request failed, status: 500 Internal Server Error"
t=2021-12-04T16:09:59+0300 lvl=eror msg="Request Completed" logger=context userId=16 orgId=1 uname=XXXXX method=POST path=/api/datasources/5/resources/zabbix-api status=500 remote_addr=XXX.XXX.XXX.XXX time_ms=5375 size=95 referer="https://grafana.XXX.ru/d/dtx8-Ednk/network-interfaces-utilization?orgId=1&editPanel=4"
request failed, status: 500 Internal Server Error Object status:500 statusText:"Internal Server Error" data:Object error:"Internal Server Error" message:"request failed, status: 500 Internal Server Error" config:Object url:"api/datasources/5/resources/zabbix-api" method:"POST" headers:Object hideFromInspector:false data:Object retry:0 message:"request failed, status: 500 Internal Server Error"
После чистой установки системы мониторинга zabbix можно столкнуться с проблемой, что система мониторинга корректно устанавливается и запускается. Однако при попытке обратиться к веб браузеру, по адресу веб страницы системы мониторинга, например, http://servername/zabbix отображается чистая страница или в некоторых случаях отображается ошибка 500: Internal Server Error.
При этом в логах zabbix сервера никаких ошибок не фиксируется, а вот в логах веб сервера можно увидеть:
PHP Fatal error: require_once(): Failed opening required ‘/etc/zabbix/web/maintenance.inc.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /usr/share/zabbix/include/classes/core/ZBase.php on line 271
Причин подобного поведения может быть несколько, но основная из них — это отсутствие прав у учетной записи из под которой запущен веб сервер к файлу /etc/zabbix/web/maintenance.inc.php.
В этой ситуации можно сделать следующее:
1. Предоставить права учетной записи из под которой запущен веб сервера (например, www-data, либо apache) на каталог /etc/zabbix/web/
chown -R www-dаta:www-data /etc/zabbix/web/
2. Добавить в файл конфигурации zabbix (в настройках виртуальных хостов веб сервера), для параметра php_admin_value open_basedir путь до файла maintenance.inc.php. Например, в файле /etc/httpd/conf.d/zabbix.conf в строке php_admin_value open_basedir кроме существующих путей, должны быть добавлены пути: /etc/zabbix/:/etc/zabbix/web:
php_admin_value open_basedir "/etc/zabbix/:/etc/zabbix/web:....
I have a multi-step web scenario, but one of the steps is producing a 500 error. It’s JSON POST step, using variables from a previous step, so plenty of opportunity for things to go wrong. I don’t see any way to diagnose what exactly is happening however.
Is there any way for Zabbix to either record the cURL requests it is making, or log the result if it is a 500 Error? I’m running the latest 3.2 code.
asked Sep 14, 2016 at 18:34
You cannot log requests with Zabbix. If it is an HTTP request, a simple tcpdump
might help with that, though.
As for responses, you can make Zabbix log web scenario responses by increasing loglevel to 5
. This can also be done for a running server and only for the web scenario processes like this:
zabbix_server -R log_level_increase http poller
See this blog entry for more detail.
answered Sep 14, 2016 at 19:29
RichlvRichlv
2,3441 gold badge13 silver badges17 bronze badges
Go to zabbix
HTTP 500 on Latest Data page
Had a couple users this week come to me saying the Latest Data page in our Zabbix instance has been giving a 500 on them.
It looks like the easy fix for that was to delete their accounts and re-create them, since something that Latest Data was trying to load wasn’t playing nice for whatever reason.
It’s now happened to my account, and I’m tied up in enough action rules on our instance that it would be extremely annoying to go through and un-link myself from the action rules and then re-link them when I get my account re-created.
Has anyone run into this issue and have a better fix than an account delete/re-create? I’ve tried clearing my browser cache/cookies to see if it would reset it and it did not, and I’ve also tried blasting away all the read/write permissions from the account to see if that reset the Latest data screen.