Comments (21)
closed
from cortx-hare.
We are not going to generate consul configuration file from cfgen anymore (see commit 96ea059). So the bootstrap script will specify explicitly the IP addresses for the agents on each node via the --bind
parameter.
from cortx-hare.
assigned to @andriy.tkachuk
from cortx-hare.
Yes, cfgen
shall be able to put the IP address into consul-conf.dhall
(which will then be converted into consul-conf.json
).
cc @andriy.tkachuk
from cortx-hare.
Can we provide preferred address @ /opt/seagate/consul/consul-srv-conf.json ?
@rajanikant.chirmade Define “preferred address”.
from cortx-hare.
Can we provide preferred address @ /opt/seagate/consul/consul-srv-conf.json ?
Yes it is working if bind address added to confirm.
[vagrant@cmu hare]$ sudo systemctl start consul-agent
[vagrant@cmu hare]$ sudo systemctl status consul-agent
● consul-agent.service - Consul agent for Hare
Loaded: loaded (/data/hare/systemd/consul-agent.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2019-08-28 10:28:00 UTC; 4s ago
Main PID: 6392 (consul)
CGroup: /system.slice/consul-agent.service
├─6392 /usr/local/bin/consul agent -config-dir=/opt/seagate/consul -data-dir=/tmp/consul -bootstrap-expect=1 -ui
├─6403 bash /opt/seagate/consul/check-confd
├─6405 bash /opt/seagate/consul/check-confd
├─6406 consul kv get processes/0x7200000000000001:0x1
└─6407 jq .state -r
Aug 28 10:28:00 cmu consul[6392]: 2019/08/28 10:28:00 [INFO] consul: Adding LAN server cmu (Addr: tcp/172.28.128.3:8300) (DC: dc1)
Aug 28 10:28:00 cmu consul[6392]: 2019/08/28 10:28:00 [INFO] consul: Handled member-join event for server "cmu.dc1" in area "wan"
Aug 28 10:28:00 cmu consul[6392]: 2019/08/28 10:28:00 [WARN] agent/proxy: running as root, will not start managed proxies
Aug 28 10:28:00 cmu consul[6392]: 2019/08/28 10:28:00 [INFO] agent: Started DNS server 127.0.0.1:8600 (tcp)
Aug 28 10:28:00 cmu consul[6392]: 2019/08/28 10:28:00 [INFO] agent: Started DNS server 10.0.2.15:8600 (tcp)
Aug 28 10:28:00 cmu consul[6392]: 2019/08/28 10:28:00 [INFO] agent: Started DNS server 127.0.0.1:8600 (udp)
Aug 28 10:28:00 cmu consul[6392]: 2019/08/28 10:28:00 [INFO] agent: Started HTTP server on 127.0.0.1:8500 (tcp)
Aug 28 10:28:00 cmu consul[6392]: 2019/08/28 10:28:00 [INFO] agent: Started HTTP server on 10.0.2.15:8500 (tcp)
Aug 28 10:28:00 cmu consul[6392]: 2019/08/28 10:28:00 [INFO] agent: started state syncer
Aug 28 10:28:03 cmu consul[6392]: ==> Newer Consul version available: 1.6.0 (currently running: 1.5.1)
[vagrant@cmu hare]$ git diff /opt/seagate/consul/consul-srv-conf.json
diff --git a/consul-srv-conf.json b/consul-srv-conf.json
index 30a5ee7..62484d8 100644
--- a/consul-srv-conf.json
+++ b/consul-srv-conf.json
@@ -1,4 +1,5 @@
{
+ "bind_addr": "172.28.128.3",
"server" : true,
"addresses" : {
"grpc" : "{{GetPrivateIP}}",
[vagrant@cmu hare]$
from cortx-hare.
diff --git a/systemd/consul-agent.service b/systemd/consul-agent.service
index 887723e..d430fa0 100644
--- a/systemd/consul-agent.service
+++ b/systemd/consul-agent.service
@@ -5,7 +5,7 @@ After=network-online.target
ConditionFileNotEmpty=/opt/seagate/consul/consul-srv-conf.json
[Service]
-ExecStart=/usr/local/bin/consul agent -config-dir=/opt/seagate/consul -data-dir=/tmp/consul -bootstrap-expect=1 -ui
+ExecStart=/usr/local/bin/consul agent -bind=172.28.128.3 -config-dir=/opt/seagate/consul -data-dir=/tmp/consul -bootstrap-expect=1 -ui
ExecReload=/usr/local/bin/consul reload
KillMode=process
Restart=on-failure
from cortx-hare.
Right, it's because there are several network interfaces in your vm configured and only one of them should be selected for the consul agent to work on. We should think about how to handle such configurations. Maybe specify the IP address explicitly in the consul configuration file via cfgen...
from cortx-hare.
cc @andriy.tkachuk
from cortx-hare.
@rajanikant.chirmade Can you show the diff please?
git diff -- systemd/consul-agent.service
from cortx-hare.
changed the description
from cortx-hare.
changed title from Problem: {-consul agent-} fails to start to Problem: {+consul-agent
service+} fails to start
from cortx-hare.
changed the description
from cortx-hare.
changed the description
from cortx-hare.
changed the description
from cortx-hare.
changed title from Problem: consul{--agent failed-} to start to Problem: consul{+ agent fails+} to start
from cortx-hare.
changed the description
from cortx-hare.
changed the description
from cortx-hare.
changed the description
from cortx-hare.
changed the description
from cortx-hare.
changed the description
from cortx-hare.
Related Issues (20)
- Error when running /opt/seagate/cortx/hare/bin/../bin/cfgen --help-schema HOT 10
- Compile jq: error: Invalid numeric literal at EOF at line 1, column 12 (while parsing '192.168.60.4') at <top-level>, line 5: HOT 7
- Broken link on cortx-hare rfc 10 document HOT 4
- hare sudo make install fail HOT 10
- hctl bootstrap fails HOT 13
- FDMI filter fid to be shown in hctl status HOT 9
- status of m0_client remains offline after rgw restart HOT 8
- s3bench I/O start failing for 16Mb-200Sessions-12KObjects on 1node-MGW HOT 8
- FDMI filter "client index" should use the first m0_client endpoint HOT 9
- "filesystem-stats:" returning empty in case of single node RGW-MOTR deployment HOT 11
- Setting drive-state to FAILED with hctl is not working HOT 6
- hax broadcasts FAILED instead of REPAIRING for device HOT 6
- hax broadcasts FAILED instead of REPAIRING for device HOT 6
- Compiling cortx-hare shows an error HOT 7
- Compiling error of cortx-hare still persists HOT 8
- High CPU consumption in idle mode HOT 13
- Sometimes disks are offline just after fresh bootstrap HOT 9
- Can't see cluster size HOT 7
- [DUPLICATED] I/O test failed HOT 5
- Hare Architecture document is private HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cortx-hare.