Tag Archives: Bug resolution record

[Solved] Python requests ConnectionError Error: connection aborted BadStatusLine

Error Messages:

raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (‘Connection aborted.’, BadStatusLine(“””, ))
Codes

data = {"host":host,"key":key,"value":value,"dns":ip} 

res = requests.post(url=url,json = data)

Method 1: add retry

requests.adapters.DEFAULT_RETRIES = 5

Method 2: add header

headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.0; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0'} 

res = requests.post(url=url,json = data,headers=headers)

Method 3: curl
If method 1,2 does not work, use curl command to find the following error messages:
Empty reply from server

Solution: https://stackoverflow.com/questions/48814200/connection-aborted-badstatusline-on-server

[Solved] Zabbix Error: Cannot parse list of active checks

Question:

There is no data reported by the virtual machine, and an error is reported:

Cannot parse list of active checks

Solution:

1. Search the forum. The comment shows that there is a problem with the 10051 interface to the server. Check the firewall and no problem is found

2. The architecture adopts the mode of agent channel machine IP1 serverip2,

On the agent machine:

 tcping IP1 10051端口

The display is turned on. Continue troubleshooting

3. On the server machine, check the port status

tcping IP2 10051端口

It is found that the 10051 port is not open. Locate the problem, that is, the server problem. Restart the httpd service and solve it

systemctl restart httpd