ptarmiganlabs/butler-sos

Error while Configuring Butler SoS Yaml file

vizith opened this issue · 14 comments

What version of Butler SOS are you using?

v9.2.2

What version of Node.js are you using? Not applicable if you use the standalone version of Butler SOS.

16

What command did you use to start Butler SOS?

NA

What operating system are you using?

NA

What CPU architecture are you using?

NA

What Qlik Sense versions are you using?

NA

Describe the Bug

Dear Team,

We are facing Butler-sos configuration issues while setting it up with influxdb and graffana, Can you please advise if you have noticed this issue before.

i have pinged hostname/ip and instance is up with out any issue. Thanks a lot for your help in advance :)

]
node:events:505
throw er; // Unhandled 'error' event
^

Error: getaddrinfo ENOTFOUND
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26)
Emitted 'error' event on Socket instance at:
at GetAddrInfoReqWrap.callback (node:dgram:320:12)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:17) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: ''
}

Expected Behavior

No response

To Reproduce

No response

Hi @vizith

"getaddrinfo ENOTFOUND" indicate that some IP address can't be found.
This is probably one of the most common problems people run into when setting up Butler and Butler SOS - at least when running those tools as Docker containers. Docker networking isn't hard, but you do have to be careful to get the correct config settings.

I need some more info to make a guess what's going on:

  • How are you running Butler SOS? As EXE file, in Docker or something else?
  • That error message looks a bit short/truncated. If that is indeed the case, any chance you could post the full error message?
  • The YAML config file is really needed too. If it contains sensitive info you can mask that out, but it's virtually impossible to reproduce/debug your setup without having the same config file.

Dear Goran,

Thanks a lot for writing back on this issue, We have fixed above "getaddrinfo ENOTFOUND" by updating heartbeat details in the yaml file,

However now we are facing another error i.e.

2022-12-27T12:40:51.096Z debug: PROXY SESSIONS: Monitor user sessions for these servers/virtual proxies: [
{
"host": "10.62.33.106:4747",
"serverName": "servername.com",
"serverDescription": "servername",
"logDbHost": "dbhost",
"userSessions": {
"enable": true,
"host": "10.1.1.1:4243",
"virtualProxies": [
{
"virtualProxy": "/"
}
]
},
"serverTags": {
"server_group": "SBX",
"serverLocation": "US",
"server_type": "virtual",
"serverBrand": "AWS"
}
}
]
node:events:505
throw er; // Unhandled 'error' event
^

Error: bind EADDRNOTAVAIL 10.1.1.1:9997
at GetAddrInfoReqWrap.callback (node:dgram:351:20)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:73:8)
Emitted 'error' event on Socket instance at:
at GetAddrInfoReqWrap.callback (node:dgram:353:14)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:73:8) {
errno: -4090,
code: 'EADDRNOTAVAIL',
syscall: 'bind',
address: '10.1.1.1',
port: 9997
}

D:\Install\OtherTools\butler-sos-win>

Hi @mountaindude , Can you please have a look at above details and advise us, Thanks in advance.

It's impossible for me to help you in a good way without knowing what the config file looks like.
The issues you are facing are 99% likely to be caused by incorrect configuration.

Best I can do given the information I have is to guess..

The error message indicate that Butler SOS could not begin listening on 10.1.1.1:9997
Looking in the template config file that's available on Github, I suspect your issue is related to how udpServerConfig is set up.

Butler-SOS.userEvents.udpServerConfig.serverHost should usually be set to the IP address or host name where Butler SOS is running (advanced scenarios may need different setups).

It's worth noting that if you set serverHost to a specific IP address or host name, Butler SOS will listen to that very address/host (on the specified port, see below).
If you on the other hand set this setting to 0.0.0.0 Butler SOS will listen to ALL available network interfaces, on the specified port. The "0.0.0.0" syntax is a standard way of specifying "all available network interfaces".
Worth trying if you're not sure what IP is used.

Butler-SOS.userEvents.udpServerConfig.portUserActivityEvents is the network port where Butler SOS will listen for UDP messages coming from Qlik Sense when users log in/out, open/close apps.

More info about setting up user event monitoring is available here.

Hi @mountaindude thanks a lot for your response, I understand. PFA yaml file and I have replaced hostname details with some dummy and port is open
Production_Working.txt

Allright, let's see if we can get this working.
I suspect this is caused by network connectivity, firewalls or similar - but that's just a hunch at this point.

First, I would start by disabling as many features as possible, then enable them one by one to make sure each of them work as expected.
I don't expect the uptime monitoring to cause any troubles, but you could set Butler-SOS.uptimeMonitor.enable to false just to rule out that it's involved in the issues you are seeing. Same thing for other features that can be disabled.
Looks like you've already done this to some degree, forwarding metrics to New Relic is for example disabled - good.

What version of Sense are you using?
Are you still using the logdb? In more recent versions of Sense log db has been deprecated and the Butler-SOS.logdb.enable should be set to false in that case.

The error message you get indicate it's the UDP server to which user session events are sent, that isn't starting as it should.
Try setting Butler-SOS.userEvents.enable to false. Does the error go away?

Let's say you have that UDP server enabled though, i.e. Butler-SOS.userEvents.enable is true.
What will happen (slightly technical here, sorry..) is that Sense will send (via log appender XML files) UDP messages to Butler SOS. Such messages contain info about which user logged in, opened an app etc.
The IP or host name and port number used in the Sense XML appender must match the IP/host and port used in Butler SOS!
That's a later thing to configure though, the problem seems to be that Butler SOS can't even set up the UDP server that listens for incoming messages...

So... Let's say you are running Butler SOS on a server with IP 10.11.12.13.
Let's also assume Sense is running on a server with IP 1.2.3.4.

Butler SOS should then be configured to start a UDP server that listens for UDP messages on 10.11.12.13:9997 (i.e. port 9997)

That is achieved by setting
Butler-SOS.userEvents.udpServerConfig.serverHost: 10.11.12.13
Butler-SOS.userEvents.udpServerConfig.portUserActivityEvents: 9997

A few things to keep in mind here:

  • The firewall on 10.11.12.13 must allow incoming UDP traffic to port 9997 from 1.2.3.4. If this is not allowed Sense will not be able to send messages to Butler SOS. I would also allow traffic from Butler SOS server itself, i.e. with 10.11.12.13 as source.
  • The error you are getting, EADDRNOTAVAIL, indicate that the IP or host name you used in Butler-SOS.userEvents.udpServerConfig.serverHost is not valid for the server where Butler SOS is running. You MUST use a IP or host name or fully qualified domain name (FQDN) that is associated with the server where Butler SOS is running!!
    • For example, let's say you put 20.21.22.23 in Butler-SOS.userEvents.udpServerConfig.serverHost, but the server where Butler SOS is running does not have that IP. In this case I would expect the error you are seeing.
  • Network connectivity in general can cause strange errors. Once you get past the issue you are seeing now and get into configuration of the XML appender files in Sense, you should check and double check that the Sense server can access the server where Butler SOS is running.
    • If Butler SOS is running on the Sense server itself things are somewhat easier, as there are fewer firewalls involved.

Thanks a lot for these inputs @mountaindude , We were able to ovrcome above error, However we are facing another issue now connecting to influx DB. Can you please find attached error details

Error looked like this "2023-01-12T07:14:55.724Z error: PROXY SESSIONS: Error saving user session data to InfluxDB! Error: No host available"

Edit by @mountaindude: Removed log file to avoid release of sensitive info.

Are you sure the InfluxDB host is reachable from the computer where Butler SOS is running?
That error indicate that Butler SOS could not resolve the InfluxDB host name, or that the InfluxDB port is not open on that server.

Btw, I removed the log file you attached in the previous comment as it contained info that could be considered sensitive.

Thank you @mountaindude .

I will verify your inputs

Hi Goran, we are facing socket hang up error while connecting to influx db now, can you please advise

Hi Goran, we are facing socket hang up error while connecting to influx db now, can you please advise

Well, that could be anything causing that... Without proper info on what happened, error messages, network configuration etc etc it's impossible to even guess what's causing that problem.

If I were you I would first make sure that InfluxDB works. Install it, connect using the command line influxdb tool, create a database, delete that database etc.
Then configure Butler SOS to send data to InfluxDB. If that doesn't work it could be something network related that causes it. Firewalls etc.

Good luck!

Thanks goran, this is a in house influx db environment and we have Grafna as well. But i will try to install local influx db to test configuration if it's not working I will try some other option.

Regarding Butler SOS' config file:
Latest version of Butler SOS (9.6.2) includes a new verification feature, where the config file is verified.
If some setting is missing an error will be logged.