Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INTERNAL SERVER ERRO #17

Open
matheusandrades opened this issue May 25, 2020 · 3 comments
Open

INTERNAL SERVER ERRO #17

matheusandrades opened this issue May 25, 2020 · 3 comments

Comments

@matheusandrades
Copy link

Bom dia, queria tirar uma duvida, quando eu seleciono as opçoes 2 e 3 eu recebo um erro, segue abaixo:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/zabbix_api.py", line 261, in do_request
response = opener.open(request, timeout=self.timeout)
File "/usr/lib64/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 500: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./ZabbixTuner.py", line 428, in
main()
File "./ZabbixTuner.py", line 425, in main
menu()
File "./ZabbixTuner.py", line 58, in menu
menu_opcao()
File "./ZabbixTuner.py", line 65, in menu_opcao
listagemItensNaoSuportados()
File "./ZabbixTuner.py", line 184, in listagemItensNaoSuportados
"monitored": True, "selectHosts": ["hostid", "host"]})
File "/usr/local/lib/python3.6/site-packages/zabbix_api.py", line 341, in method
return self.universal("%s.%s" % (self.data["prefix"], name), opts[0])
File "/usr/local/lib/python3.6/site-packages/zabbix_api.py", line 79, in wrapper
return self.do_request(self.json_obj(method, opts))['result']
File "/usr/local/lib/python3.6/site-packages/zabbix_api.py", line 348, in do_request
return self.parent.do_request(req)
File "/usr/local/lib/python3.6/site-packages/zabbix_api.py", line 273, in do_request
raise ZabbixAPIException("urllib2.URLError - %s" % e)
zabbix_api.ZabbixAPIException: urllib2.URLError - Internal Server Error

@janssenlima
Copy link
Owner

Você pode utilizar as opções de timeout no arquivo de configuração e também limitar o número de itens retornardos quando solicitado.
Vou tratar a saída desse erro a título de informação.

@matheusandrades
Copy link
Author

Ajustei o timeout para 5 e para 30 (quais são as opções aqui, 5 seriam 5 segundos, certo?). Tem algum limite? Além disso não encontrei onde limitar o número de itens retornados.

@petersonbasso
Copy link
Contributor

É interessante verificar no log do servidor web qual erro ocorre no momento da consulta, já tive problemas com memória alocada para o PHP, onde para consultas muito grandes ocorria um Internal Server Error, nesse caso bastou ajustar o parâmetro memory_limit do servidor web para uma quantidade suficiente de memória.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants