GithubHelp home page GithubHelp logo

Comments (21)

andriytk avatar andriytk commented on August 25, 2024

closed

from cortx-hare.

andriytk avatar andriytk commented on August 25, 2024

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.

vvv avatar vvv commented on August 25, 2024

assigned to @andriy.tkachuk

from cortx-hare.

vvv avatar vvv commented on August 25, 2024

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.

vvv avatar vvv commented on August 25, 2024

Can we provide preferred address @ /opt/seagate/consul/consul-srv-conf.json ?

@rajanikant.chirmade Define “preferred address”.

from cortx-hare.

rajanikantchirmade avatar rajanikantchirmade commented on August 25, 2024

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.

rajanikantchirmade avatar rajanikantchirmade commented on August 25, 2024

@vvv

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.

andriytk avatar andriytk commented on August 25, 2024

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.

vvv avatar vvv commented on August 25, 2024

cc @andriy.tkachuk

from cortx-hare.

vvv avatar vvv commented on August 25, 2024

@rajanikant.chirmade Can you show the diff please?

git diff -- systemd/consul-agent.service

from cortx-hare.

vvv avatar vvv commented on August 25, 2024

changed the description

from cortx-hare.

vvv avatar vvv commented on August 25, 2024

changed title from Problem: {-consul agent-} fails to start to Problem: {+consul-agent service+} fails to start

from cortx-hare.

vvv avatar vvv commented on August 25, 2024

changed the description

from cortx-hare.

vvv avatar vvv commented on August 25, 2024

changed the description

from cortx-hare.

vvv avatar vvv commented on August 25, 2024

changed the description

from cortx-hare.

vvv avatar vvv commented on August 25, 2024

changed title from Problem: consul{--agent failed-} to start to Problem: consul{+ agent fails+} to start

from cortx-hare.

rajanikantchirmade avatar rajanikantchirmade commented on August 25, 2024

changed the description

from cortx-hare.

rajanikantchirmade avatar rajanikantchirmade commented on August 25, 2024

changed the description

from cortx-hare.

rajanikantchirmade avatar rajanikantchirmade commented on August 25, 2024

changed the description

from cortx-hare.

rajanikantchirmade avatar rajanikantchirmade commented on August 25, 2024

changed the description

from cortx-hare.

rajanikantchirmade avatar rajanikantchirmade commented on August 25, 2024

changed the description

from cortx-hare.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.