Unable to access API - connection refused

Docker install - [librenms/librenms:latest]

Validate output below.

I am running curl from bash from the librenms docker itself using the following commands.

sudo docker exec -it librenms /bin/bash

curl -H ‘X-Auth-Token: b8b55ba4ee90081688c95ab7057533aa’ http://librenms/api/v0

Error - curl: (7) Failed to connect to librenms port 80 after 0 ms: Connection refused

everything else is working fine. Trying to get Librenms to feed oxidized but after several attempts, I decided to try to get an output from the API locally and was unable to do so.

Please let me know if I can provide anything else.

ConfigurationOk

DatabaseOk

DependenciesOk

DiskOk

DistributedpollerOk

MailOk

PhpOk

ProgramsWarning

Warning: IPv6 is disabled on your server, you will not be able to add IPv6 devices.

PythonOk

RrdOk

RrdcheckOk

SystemOk

UpdatesWarning

Warning: Non-git install, updates are manual or from package

UserO

is that your correct address?

When I try to browse to that location in a web browser I get >{“message”:“Unauthenticated.”}<

When I try to curl to it I get >Connection refused<

How do I test that the API is enabled and working?

First generate a NEW Token Hash (Settings - API - API Settings), then use cURL:
curl -H 'X-Auth-Token: your_new_hash' "http://librenms_host/api/v0/devices"'

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.