Nomad client mode ask for consul. Can I ignore this? - consul

Nomad client mode ask for consul.
Can I ignore this or I might deploy consul ?
Is it necessary?
nomad-client_1 |
2017/02/12 08:26:01.008267 [ERR]
client.consul: error reaping services in consul: Get http://127.0.0.1:8500/v1/agent/services: dial tcp 127.0.0.1:8500: getsockopt: connection refused

Consul is not required. From the docs (https://www.nomadproject.io/docs/agent/configuration/consul.html):
"To put it another way: if you have a Consul agent running on the same host as the Nomad agent with the default configuration, Nomad will automatically connect and configure with Consul."

Related

Trying to setup Master Slave setup of Jmeter in Cloud, Receiving "java.net.ConnectException: Connection timed out: connect"

I'm Trying to setup Master Slave setup of Jmeter in Cloud.
Things I have done the setup in CLOUD for Master and Slave
I have created rmi.keystore.jks file in Master and copied the same to Slave machine.
I have installed the same versions of Java and Jmeter in both the Machines
I have added IP address of Slave machine in jmeter.properties file of Master
Please help me why I'm facing connection timed out error when trying to execute jmeter script in Cloud machine. Receiving:
Connection refused to host: 10.XXX.XX.XXX; nested exception is: java.net.ConnectException: Connection timed out: connect
If this is really in CLOUD then:
My expectation is that you need to use external IP addresses as I can only see Class B network-type address which most probably cannot be connected from the outer world
You need to ensure that the following ports are open in the CLOUD (whatever you mean by this term) and in operating system firewalls/security groups:
1099 (or whatever port you define as the server_port)
the port you define as the server.rmi.localport
the port(s) you define as the client.rmi.localport
More information:
Remote hosts and RMI configuration
How to Perform Distributed Testing in JMeter

Access Docker Containers Host by DNS name

From my Spring Boot application deployed as a Docker container I need to be able to access the parent node (within a Swarm) by some kind of docker-exposed DNS name so that I can add it to a configuration file and was wondering if there was a DNS name exposed automatically by Docker for this purpose?
Another container that is scheduled on the same host running in "network_mode: host" is running Consul and advertising on port 8500 (real IP is 192.168.1.233).
If I run netstat on the Swarm node (ip 192.168.1.233) I can see it's listening on port 8500:
# netstat -anp | grep 8500
tcp6 0 0 :::8500 :::* LISTEN 25010/docker-proxy
I want to be able to define a connection string as configuration in the Spring Boot app on the swarm node to the local instance of Consul sheduled on the same physical host as the Spring Boot app.
If I refer to "localhost" within the Spring Boot container then there's nothing listening on the 8500 port, proven by running this after shelling into the Spring Boot container (using a sample Consul API call)
# wget http://localhost:8500/v1/status/leader
Connecting to localhost:8500 (127.0.0.1:8500)
wget: can't connect to remote host (127.0.0.1): Connection refused
I've also tried using "host.docker.internal" but that doesn't work:
# ping host.docker.internal
ping: bad address 'host.docker.internal'
The hosts are all Centos 7 hosts, and Docker version 18.09.1, build 4c52b90.
The firewalld service is disabled on all hosts.

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.

Cannot connect to an EC2 instance through web sockets

I am running an Akka HTTP service on port 8080 in my EC2 instance. It expects web socket connections, but normal HTTP should return 400 bad request.
I use this code to start Akka service:
Http().bindAndHandle(route, "localhost", 8080)
From the remote terminal I have this expected behavior, but not from outside.
$ wget ec2-XX-XXX-XX-XXX.compute-1.amazonaws.com:8080
--2017-10-01 15:27:31-- http://ec2-XX-XXX-XX-XXX.compute-1.amazonaws.com:8080/
Resolving ec2-XX-XXX-XX-XXX.compute-1.amazonaws.com... XX.XXX.XX.XXX
Connecting to ec2-XX-XXX-XX-XXX.compute-1.amazonaws.com|XX.XXX.XX.XXX|:8080... failed: Connection refused.
Here is my inbound rules configuration:
If I do netstat --listen -p the port 8080 does not appear.
Thanks!
I found out the problem. I should be binding the service to the private IP address of the EC2 instance.

Kubernetes proxy connection

I am trying to play around with kubernetes and specifically the REST API. The steps to connect with the cluster API are listed here. However Im stuck in the first step i.e. running kubectl proxy
I try running this:
kubectl --context='vagrant' proxy --port=8080 &
which returns error: couldn't read version from server: Get https://172.17.4.99:443/api: dial tcp 172.17.4.99:443: i/o timeout
What does this mean? How do overcome it connect to the API?
Check that your docker, proxy, kube-apiserver, kube-control-manager services are running without error. Check their status using systemclt status your-service-name. If the service is loaded but not running then restart the service by using systemctl restart your-service-name.

Resources