CURL ERROR: couldn't connect to host

This forum was archived to /woltlab and is now in read-only mode.
  • I think I've covered all of the steps to get this running... almost there but getting this error when trying to run the kickstart error:


    Code
    1. CURL ERROR: couldn't connect to host



    On the page I'm entering the following:


    Endpoint Name: api
    Icinga Host: localhost
    Port: 5665
    API user: root (from api-users.conf)


    password: a89hfxxxxxxwdnf4 (from api-users.conf)


    I ran the icinga api setup and it created the ApiListener in api.conf...



    I thing it might have something to do with php5-curl. I'm running PHP 5.3.3. I tried to install with


    Code
    1. yum install php5-curl

    but it says it's not found and nothing to do. We're not on license for redhat and no connection to repos. Maybe I need to find an RPM for php5-curl.


    Thanks for any tips.

    Mostly using RHEL 6, some Ubuntu, some Raspbian
    Icinga2 - 2.5+, IcingaWeb2 - 2.3+
    Metrics to Graphite / Grafana, Alerts to Pagerduty
    multiple environments of about 20 instances each (physical+virtual)
    >> change is the constant... Looking for metrics MQ (RabbitMQ), signal routing (Node-Red), Icinga2 as agent, logging (ELK/Graylog)

  • Your question inspired me to restart Icinga again and I found an error: I had 2 copies of api.conf; one in /conf.d and one in /features-available. I took out the one in conf.d and restarted Icinga2 without error.


    Next error message is:

    Code
    1. I found no Endpoint object called "api" on localhost:5665


    I get api from api.conf:

    The explanation says:

    Quote

    This is the name of the Endpoint object (and certificate name) you created for your ApiListener object.


    I realize I don't understand to what Endpoint refers.


    Thanks,
    Chris.

    Mostly using RHEL 6, some Ubuntu, some Raspbian
    Icinga2 - 2.5+, IcingaWeb2 - 2.3+
    Metrics to Graphite / Grafana, Alerts to Pagerduty
    multiple environments of about 20 instances each (physical+virtual)
    >> change is the constant... Looking for metrics MQ (RabbitMQ), signal routing (Node-Red), Icinga2 as agent, logging (ELK/Graylog)

  • BTW, I have this set up in zones.conf:

    Code
    1. object Endpoint NodeName {
    2. host = NodeName
    3. }
    4. object Zone ZoneName {
    5. endpoints = [ NodeName ]
    6. }

    NodeName is defined in constants as the fqdn of the host.


    Should I be defining API as the equivalent of the host fqdn (or can I use NodeName in the web director kickstart wizard?)


    Thanks,
    Chris.

    Mostly using RHEL 6, some Ubuntu, some Raspbian
    Icinga2 - 2.5+, IcingaWeb2 - 2.3+
    Metrics to Graphite / Grafana, Alerts to Pagerduty
    multiple environments of about 20 instances each (physical+virtual)
    >> change is the constant... Looking for metrics MQ (RabbitMQ), signal routing (Node-Red), Icinga2 as agent, logging (ELK/Graylog)

  • OK. Got it. I used the value from NodeName as the api endpoint and it worked.


    I now have Director loaded. Now proceeding to the exploration.


    Thanks,
    Chris.

    Mostly using RHEL 6, some Ubuntu, some Raspbian
    Icinga2 - 2.5+, IcingaWeb2 - 2.3+
    Metrics to Graphite / Grafana, Alerts to Pagerduty
    multiple environments of about 20 instances each (physical+virtual)
    >> change is the constant... Looking for metrics MQ (RabbitMQ), signal routing (Node-Red), Icinga2 as agent, logging (ELK/Graylog)

  • who those, maybe couldnt found the endpoint, should try in linux hostname and that name that apear should be put put as your endpoint, in my case it was localhost.localdomain. as ip address and as host i put it and worked without problem.


    but i think everyone figure about it. T_T

    The post was edited 1 time, last by hitokiri240: I found the solution.. there ().

  • Hello,


    I am a bit confused and want to clarify something. The api-user.conf file should be placed where exactly?


    What is the full path of that file if everything works correctly?


    Thanks in advance

  • please do not highjack old threads.


    Start a new one with your question.

    Linux is dead, long live Linux


    Remember to NEVER EVER use git repositories in a productive environment if you CAN NOT control them

  • OK, I know I could do that.


    But I thought since the file was mentioned more than few times in this thread and the thread is partially about that certain file, it would be more convenient to have an answer here to be clear where is the file people are talking about.


    I think that it would be much simpler to give an straight answer than raising a new thread in this case.


    BR