Hi,
I am a new Nomad user. After reading the docs provided on
https://www.nomadproject.io/docs/index.html and going through the sample configurations, I am trying to initialize a two server (one local agent and one remote agent) setup. After setting up the agents (OS, firewalls, access, etc..) and installing Nomad:
This is the command I ran to set up the first node:
- nomad agent -server -bootstrap-expect 1 -data-dir /opt/nomad/data/
This is what the above command produces:
==> WARNING: Bootstrap mode enabled! Potentially unsafe operation.
No configuration files loaded
==> Starting Nomad agent...
==> Nomad agent configuration:
Atlas: <disabled>
Client: false
Log Level: INFO
Region: global (DC: dc1)
Server: true
==> Nomad agent started! Log data will stream in below:
2016/05/12 21:55:10 [INFO] serf: EventMemberJoin: ip-addr.global 127.0.0.1
2016/05/12 21:55:10 [INFO] nomad: starting 1 scheduling worker(s) for [service batch system _core]
2016/05/12 21:55:10 [INFO] raft: Node at
127.0.0.1:4647 [Follower] entering Follower state
2016/05/12 21:55:10 [WARN] serf: Failed to re-join any previously known node
2016/05/12 21:55:10 [INFO] nomad: adding server ip-addr.global (Addr:
127.0.0.1:4647) (DC: dc1)
2016/05/12 21:55:11 [WARN] raft: Heartbeat timeout reached, starting election
2016/05/12 21:55:11 [INFO] raft: Node at
127.0.0.1:4647 [Candidate] entering Candidate state
2016/05/12 21:55:11 [INFO] raft: Election won. Tally: 1
2016/05/12 21:55:11 [INFO] raft: Node at
127.0.0.1:4647 [Leader] entering Leader state
2016/05/12 21:55:11 [INFO] nomad: cluster leadership acquired
2016/05/12 21:55:11 [INFO] raft: Disabling EnableSingleNode (bootstrap)
To join a second node to the (previously initiated) cluster these are the commands I ran:
- nomad server-join ip-addr
- nomad server-join ip-addr:port
This is the error message the second server produces when trying to join a node to the cluster:
Based on the commands and responses above, I have a couple of questions:
1. What is causing the second server to fail from joining the cluster?
2. Must a config file (e.g. server.hcl) be used to initialize and join one/more nodes to the cluster?
3. Which ports should the initial server be listening on once its initialized? Assuming network connectivity is already established, should I be able to "telnet" to this port from a node over a LAN/WAN?
Please let me know if more details are required and I will be happy to post them.