Skip to content

add some feedback for non-connection errors #37

Description

@devoid1

installed precompiled binary for linux. i have a browser window open to https://192.168.1.7/admin/ and can see full functioning (its been running for weeks). i can also go to plain http://192.168.1.7/admin/ and see dashboard.

dave@huge ~> ./picli-linux setup

Please enter the IP address of your Pi-Hole: 192.168.1.7
Please enter the port that exposes the web interface (default 80):
Validating http://192.168.1.7:80/admin/api.php
Pi-Hole doesn't seem to be alive, check your details and try again!

Please enter the IP address of your Pi-Hole: 192.168.1.7
Please enter the port that exposes the web interface (default 80):
Validating http://192.168.1.7:80/admin/api.php
Pi-Hole doesn't seem to be alive, check your details and try again!

Please enter the port that exposes the web interface (default 80): 443
Validating http://192.168.1.7:443/admin/api.php
Address not reachable!

no idea why it cant connect. ufw inactive. no messages in Pi-Hole.
if i curl 192.168.1.7 i get:

curl http://192.168.1.7/api.php
{"error":{"key":"not_found","message":"Not found","hint":"/api.php"},"took":0.00029635429382324219}⏎                                                                                          

curl http://192.168.1.7/admin/api.php
{"error":{"key":"bad_request","message":"Bad request","hint":"The API is hosted at pi.hole/api, not pi.hole/admin/api"},"took":0.00028491020202636719}⏎

so its acting like the URL is incorrect anyway. i changed the call and recompiled but it deadends in

color.Yellow("Validating " + address)
req, err := http.NewRequest("GET", address, nil)

i would like to be more helpful but im not sure what to check next. maybe ill try a debug statement with the actual http return code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions