Ad Widget

Collapse

scheduledreport: test failed Cannot connect to web service couldn't connect to server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Israe
    Junior Member
    • Feb 2023
    • 3

    #1

    scheduledreport: test failed Cannot connect to web service couldn't connect to server

    hello, fairely new to zabbix, using it to monitor my workplace infra, everything works fine. now I want to start generating reports. although i followed everything as it is on the doc i still get this error
    Code:
    Report generating test failed.
    Cannot connect to web service: couldn't connect to server
    ​
    • zabbix server (6.0 LTS), the database (mysql) and the web gui are all installed on the same VM on centos 8 stream without gui
    • I access, manage and administrate from my computer through ssh to the server and access the web gui through https://server_ip/zabbix
    • all traffic needed is allowed on firewall
    • I installed google-chrome-stable and the zabbix-web-service and configured it as it says (http://server_ip:10053/report)
    • on zabbix gui I added the Frontend URL https://server_ip/zabbix
    I went through all the combinations of @ip, localhost, 127.0.0.1 between the server and the web-service and still get the same error, I also tried chromium and nothing
    Code:
    *   Trying ip@...
    * TCP_NODELAY set
    * Connected to ip@ (ip@) port 10053 (#0)
    GET /report HTTP/1.1
    Host: ip@:10053
    User-Agent: curl/7.61.1
     Accept: */*
    HTTP/1.1 405 Method Not Allowed
    Content-Type: application/problem+json
    X-Content-Type-Options: nosniff
    Date: Tue, 07 Feb 2023 14:35:16 GMT
    Content-Length: 38
    {"detail":"Method is not supported."}
    * Connection #0 to host ip@ left intact
    did anyone have this problem and is there a solution? normally it should work because everything is on the same VM!!
  • Israe
    Junior Member
    • Feb 2023
    • 3

    #2
    Solved but not sure how; but in case anyone is having the same problem and still struggling to find a solution, here's what i tried:
    • SSL: Certification issue
      • I kept checking if the Certification location files are correct at /etc/zabbix/zabbix_server.cong
    • Added the IP address used in frontend
      • /etc/zabbix/zabbix_web_service.conf: AllowedIP=x.x.x.x
    • URL: At the server configuration file level, tried different combinations of using IP@, localhost or 127.0.0.1 like in
      • WebServiceURL=http://Used_Address:10053/report instead of localhost
      • Same for the URL on the frontend
    • the problem persisted so i tried both google-chrome, and chromium. although when it worked i was using google-chrome headless installation.
    • after all these steps I still get Cannot connect so I did a simple '#yum update' and restarted everything
      • sudo systemctl status zabbix-server zabbix-agent zabbix-web-service httpd php-fpm
    • I then refreshed the frontend and finally the Cannot connect to server error was replaced by multiple google and web service permission errors, which meant that is connected at least
    • all I did after is configure the permissions depending on what I got and Finally I tested and it was successful.
    I never really got a solution from these forums but I hope this helps someone else.

    Comment

    Working...