openNMS fetch nodes from DNS server - opennms

I am trying to get openNMS (v1.12) to fetch the list of nodes from DNS server.
First, I tried to add requisition-def in my provisiond-configuration.xml with dns://mydnsServerIP/myZone and following, I executed:
/opt/opennms/bin/send-event.pl uei.opennms.org/internal/reloadDaemonConfig --parm 'daemonName Provisiond'
to avoid restarting. Nothing happened.
Following, I tried to add the dns URL in configure discovery URL in the admin page. After saving, discovery.log started having entries like this:
2014-02-24 20:54:53,919 WARN [OpenNMS.Discovery-Thread] DiscoveryConfigFactory:
Unknown host '<node building="MYZONE_HERE" foreign-id="520105224"
node-label="CORRECTNODELABEL_HERE">' inside discovery include file:
address ignored
2014-02-24 20:54:53,920 WARN [OpenNMS.Discovery-Thread] DiscoveryConfigFactory:
Unknown host '<interface descr="DNS-AAAA" ip-addr="IPV6_HERE" managed="true" status="1"
snmp-primary="P">' inside discovery include file: address ignored
2014-02-24 20:54:53,922 WARN [OpenNMS.Discovery-Thread] DiscoveryConfigFactory:
Unknown host '<monitored-service service-name="SNMP"/>' inside discovery include
file: address ignored
2014-02-24 20:54:53,925 WARN [OpenNMS.Discovery-Thread] DiscoveryConfigFactory:
Unknown host '<monitored-service service-name="ICMP"/>' inside discovery include
file: address ignored
2014-02-24 20:54:53,927 WARN [OpenNMS.Discovery-Thread] DiscoveryConfigFactory:
Unknown host '</interface>' inside discovery include file: address ignored
2014-02-24 20:54:53,929 WARN [OpenNMS.Discovery-Thread] DiscoveryConfigFactory:
Unknown host '</node>' inside discovery include file: address ignored
It there anything else I have to do to get it to auto discover nodes from DNS server?
Thanks in advance!

Your OpenNMS server that is initiating the provisioning via a DNS import must be allowed to perform a zone transfer. You can test it with the following from your OpenNMS server console.
dig -t AXFR #<dnsServer> <zone>
If that fails the provisioning will fail.
Also you need to create a provisioning group first.
See more here: http://www.opennms.org/wiki/DNS_Importing

Related

Connect Conduktor to Kafka Docker container

I have a requirement for a small kafka setup for testing.
I'm new to kafka and I can't find a way to connect to a kafka that I setup in docker container:
I tried to use https://hub.docker.com/r/spotify/kafka/ which is a container that contains zookeeper and kafka, but I don't know what is the ip of the kafka:
docker run -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=`docker-machine ip \`docker-machine active\`` --env ADVERTISED_PORT=9092 spotify/kafka
logs:
Digest: sha256:cf8f8f760b48a07fb99df24fab8201ec8b647634751e842b67103a25a388981b
Status: Downloaded newer image for spotify/kafka:latest
/usr/lib/python2.7/dist-packages/supervisor/options.py:296: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
'Supervisord is running as root and it is searching '
2020-07-12 19:45:07,018 CRIT Supervisor running as root (no user in config file)
2020-07-12 19:45:07,019 WARN Included extra file "/etc/supervisor/conf.d/kafka.conf" during parsing
2020-07-12 19:45:07,019 WARN Included extra file "/etc/supervisor/conf.d/zookeeper.conf" during parsing
2020-07-12 19:45:07,027 INFO RPC interface 'supervisor' initialized
2020-07-12 19:45:07,027 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-07-12 19:45:07,027 INFO supervisord started with pid 1
2020-07-12 19:45:08,031 INFO spawned: 'zookeeper' with pid 8
2020-07-12 19:45:08,034 INFO spawned: 'kafka' with pid 9
2020-07-12 19:45:09,081 INFO success: zookeeper entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-12 19:45:09,082 INFO success: kafka entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
I'm using a kafka-ui to connect to it. I'm trying to use:
zookeeper: localhost:2181 <--- working
kafka: localhost:9092 <--- ERROR: "The broker [localhost:9092] is reachable
but Kafka can't connect. ensure you have access to the *advertised listeners*
of the cluster and the proper authorizations."
The Spotify container is no longer maintained.
I suggest you follow the Confluent Docker quickstart guides or at least use Docker Compose rather than any all-in-one Kafka+ZooKeeper image
I will also point you at the blue help content that says "or Docker?"
but I don't know what is the ip of the kafka:
Its the same IP as Zookeeper, because you're only using a single host here
It appears you're using Linux, so it's not clear why you need Docker Machine

Cannot access Nifi Web UI after set nifi.web.http.host

I have a problem about Nifi Web UI. When I set nifi.web.http.host=luan-ht01, I could not access Nifi Web UI on browsers by public IP, example: http://localhost:8080/nifi/, http://107.113.193.160:8080/nifi. I only could access Nifi Web by host name.
Do you have any solutions?
Thank you very much.
Your experience is the expected behavior -- when you set the hostname explicitly, that is the address on which NiFi will respond. You can leave that property value blank to have NiFi respond on all available hosts, (i.e. localhost, 127.0.0.1, etc.). During startup, the $NIFI_HOME/logs/nifi-app.log file will show a listing like below, enumerating all listening hosts.
2378 │ 2019-06-18 14:25:20,738 INFO [main] org.apache.nifi.web.server.JettyServer NiFi has started. The UI is available at the following URLs:
2379 │ 2019-06-18 14:25:20,738 INFO [main] org.apache.nifi.web.server.JettyServer https://node1.nifi:9441/nifi
2381 │ 2019-06-18 14:25:20,740 INFO [main] org.apache.nifi.BootstrapListener Successfully initiated communication with Bootstrap
2382 │ 2019-06-18 14:25:20,740 INFO [main] org.apache.nifi.NiFi Controller initialization took 93674324706 nanoseconds (93 seconds).
One quick work-around for you could be to create an "alias" for your localhost IP address to be named as your domain (just for testing purposes on your local environment, of course):
On GNU/Linux based systems, just edit (with sudo privileges) your /etc/hosts file, and add another line like that one for localhost:
/etc/hosts
127.0.0.1 localhost
127.0.0.1 luan-ht01
In Windows systems, the hosts file would (usually) be found at:
c:\Windows\System32\Drivers\etc\hosts
By doing so, you'll now be able to direct your browser to http://luan-ht01:8080/nifi and hopefully will be getting your web UI back.
Enjoy ;)

HC can not connect to DC for EAP7.1

I installed eap7.1 by unzip the zip file on RHEL73, but failed to start host control to connect with domain controller, here is detail:
domain controller runs on node1:
/opt/jboss-eap-7.1/bin/domain.sh --host-config=host-master.xml -Djboss.bind.address.management=192.168.56.11
Log:
[Host Controller] 10:53:53,258 INFO [org.jboss.as.remoting] (MSC service thread 1-4) WFLYRMT0001: Listening on 192.168.56.81:9999
Start host controller on node2:
/opt/jboss-eap-7.1/bin/domain.sh --host-config=host-slave.xml -Djboss.bind.address.management=192.168.56.127 -Djboss.domain.master.address=192.168.56.11
I added remotehost1 by using add-user.sh on node1.
I added the authentication info in host-slave.xml on node2:
<server-identities>
<secret value="cmVkaGF0MUA="/>
</server-identities>
...
<domain-controller>
<remote security-realm="ManagementRealm" username="remotehost1">
host-controller failed startup with the following error:
10:57:17,068 WARN [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0001: Could not connect to remote domain controller remote://192.168.56.81:9999: java.net.ConnectException: WFLYPRT0023: Could not connect to remote://192.168.56.81:9999. The connection timed out
...
ERROR [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0002: Could not connect to master. Error was: java.lang.IllegalStateException: WFLYHC0120: Tried all domain controller discovery option(s) but unable to connect.
netstat -an|grep 9999 show it's listening on 192.168.56.11(node1 public interface)
I stopped iptables, firewalled and selinux, I used nc -v 192.168.56.11 9999 and verified the address is accessable from node2, what could be the reason for this?
Best regards
Lan
The issue has been fixed.
The test is based on 2 guest VMs runing on window10 as host, windows 10 was restarted and I didn't notice that the firewall on windows was opened after restart, the VM uses host-only adapter to communication with each other, after disable firewall on windows, the communication works.

Jmeter perfMon plugin ERROR: java.net.ConnectException: Connection timed out: connect

I am using PerfMon listener to get graphs for memory, cpu etc. For this I have obeyed the following steps:
At server:
The agent i have run on the server and cmd says
INFO 2016-03-30 15:12:04.206 [kg.apc.p] (): Binding UDP to 4444
INFO 2016-03-30 15:12:04.269 [kg.apc.p] (): Binding TCP to 4444
INFO 2016-03-30 15:12:04.269 [kg.apc.p] (): JP#GC Agent v2.2.0 started..
I have set java path till bin in the environment variable.
I also tried saving startAgent.bat with complete path of the java.exe file
At client/jmeter plan:
I have unpacked the JmeterPlugins standard jar and now I do see the listener jp#gc perfmon collection metric
In jmeter.properties I have also updated the server ip with port in remote host section
Under jp#gc - PerfMon Metrics Collector, I have added row with host ip its port 4444
Action:
Now if I run a small test and expected graph for CPU/memory etc, I just see
"ERROR: java.net.ConnectException: Connection timed out: connect"
I doubted firewall could be the issue so I set it off but that also did not help.
Any help will be much appreciated!
Your setup at client and server side is correct.
But you have not mentioned opening of port # 4444. So it is most probably the cause of issue.
In order to make it work, Your port#4444 should be visible to JMeter client machine.
To verify if it is visible or not. you can use..
http://www.canyouseeme.org/
http://portchecker.co/
If it is not visible from Client machine, then you will need to open it. Visit these links to learn how to open port.
http://www.wikihow.com/Open-Ports
or you may use following from command line
netsh advfirewall firewall add rule name="Open Port" dir=in action=allow protocol=TCP localport=4444
netsh advfirewall firewall add rule name="Open Port" dir=out action=allow protocol=TCP localport=4444
Try checking if you can connect to port 4444 on the machine where Server Agent is running using telnet command like:
telnet YOUR_HOST 4444
and sending test command like
You should receive Yep response. If it is not the case - server side performance monitoring won't work and you will need to establish connectivity between Metrics Collector and Server agent (usually it is enough to open TCP and/or UDP ports 4444 in firewall)
See How to Monitor Your Server Health & Performance During a JMeter Load Test article for more information

How to navigate to an external url provided by a yo generator's server

I'm using a yo generator (generator-moda), running on an ec2 instance, and want to navigate from my browser to the external url provided but my browser just hangs on connecting...
Are there special config adjustments that need to be done in ec2 security groups or otherwise allow the ip or host below?
[BS] Access URLs:
-------------------------------------
Local: http://localhost:3000
External: http://172.31.60.85:3000
-------------------------------------
UI: http://localhost:3001
UI External: http://172.31.60.85:3001
-------------------------------------
[BS] Serving files from: ./app
[17:52:19] gulp-inject 12 files into main.scss.
[17:52:19] gulp-inject 12 files into main.scss.
[17:52:19] Starting 'html'...
[17:52:19] Finished 'html' after 3.89 ms
[BS] 1 file changed (index.html)
INFO [karma]: Karma v0.12.31 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
WARN [watcher]: Pattern "/home/ubuntu/dev/clients/alugha/main/app/scripts/**/*.html" does not match any file.
INFO [PhantomJS 1.9.8 (Linux)]: Connected on socket f08K4dCRmBorILmZgofR with id 91726259
The problem is that 172.31.0.0/16 is an Amazon's private range of IPs, so you cannot access to them outside the VPC (Amazon Virtual Private Cloud) source.
If you want to connect to your EC2 instance where your code is running you need to do two things:
Connect to the public DNS hostname / IP that you can get from your EC2 console. You have the instructions here: Determining Your Public, Private, and Elastic IP Addresses - AWS docs
Open the port in the security group to allow you to connect to your instance. In this answer is explained how to open a port for your security group, but instead of port 80, open 3000 and 3001.
Then in your browser copy the public DNS hostname you got on the first step with the correct port and you should be able to load your page.

Resources