Internal documentation only
This page has been marked as draft.
NetFlow component on Collector is unable to connect to MessageQueue of Orchestrator
Problem Copied
You will see something like this in the logs on the Collector:
opsviewfd daemon: [opsviewfd] Starting opsviewfd, pid: 3827198
opsviewfd daemon: [opsviewfd] Building message queue object
opsviewfd daemon: [opsviewfd] Messagequeue failure: ConnectOnFailure()
Possible cause(s) Copied
- **Root Cause 1:**The configuration in
/opt/opsview/flowcollector/etc/flowcollector.yamlis not using the correct port or IP Address. - **Root Cause 2:**You are not using SSH tunnels between the Orchestrator and collector and will need to modify
/opt/opsview/flowcollector/etc/flowcollector.yamlon the Collector and/opt/opsview/loadbalancer/etc/messagequeue-balance.cfgon the Orchestrator
Possible solution(s) Copied
Root Cause 1
SSH Tunnels between Orchestrator and Collector Copied
You can run the following command on the collector to see if the loopback address is listening on 35672
## netstat -tulpn | grep 35672
tcp 0 0 127.0.0.1:35672 0.0.0.0:* LISTEN 469406/ssh
If this is the case, then you can use 127.0.0.1 for the host value in /opt/opsview/flowcollector/etc/flowcollector.yaml on collector.
## /opt/opsview/flowcollector/etc/flowcollector.yaml on Collector
flowcollector:
messagequeue:
encoder: aes
encoder_key: BFRxxxxUd0dG5CBw==
host: 127.0.0.1 # <--- use this address
management_port: 45672
params:
prefetch_count: 100
password: ZhcIb8xxxxxxZ4x2bc
port: 35672
user: cluster1_mq
Save and exit the file and then restart opsview-flowcollector
/opt/opsview/watchdog/bin/opsview-monit restart opsview-flowcollector
Root Cause 2
Not using SSH tunnels Copied
If you are not using SSH tunnels then you can modify the /opt/opsview/loadbalancer/etc/messagequeue-balance.cfg file on the Orchestrator to change the bind address. You can run the following command to confirm that port is used by HAProxy (load balancer).
## ss -lntp | grep 35672
LISTEN 0 4096 127.0.0.1:35672 0.0.0.0:* users:(("opsview-haproxy",pid=4025300,fd=14))
On the collector, edit the /opt/opsview/flowcollector/etc/flowcollector.yaml to include the IP address of your Orchestrator.
flowcollector:
messagequeue:
encoder: aes
encoder_key: BFlaxxxxxxxxxVZw==
host: <IP address of Orchestrator> # <--- use this address
management_port: 45672
params:
prefetch_count: 100
password: Zhlcxxxxxxxxkv4bc
port: 35672
user: cluster1_mq
Save and exit the file and then restart opsview-flowcollector
/opt/opsview/watchdog/bin/opsview-monit restart opsview-flowcollector
Edit /opt/opsview/loadbalancer/etc/messagequeue-balance.cfgon the Orchestratorand use the IP address of your Orchestrator for the bind address in the frontend messagequeue-balance section.
frontend messagequeue-balance
bind <IP address of Orchesrator>:35672 # Change bind address
option tcplog
option clitcpka
timeout client 3h
mode tcp
default_backend messagequeue-balance
Save and exit the file and restart opsview-loadbalancer.
/opt/opsview/watchdog/bin/opsview-monit restart opsview-loadbalancer
You should no longer see the “[opsviewfd] Messagequeue failure: ConnectOnFailure()” errorsin the logs.
Related article(s) Copied
Flow Collector - Configuration