How to use consul domain?

218 views
Skip to first unread message

jqy199...@gmail.com

unread,
Jul 11, 2018, 10:44:48 PM7/11/18
to Consul
In ubuntu12.04 ,consul 0.6.3,I want to change ip to domain,but i don't know how to config it.

It’s is my config:

[program:consul]
command=/home/security_user/bin/consul agent -config-dir /home/security_user/secure_services/service/config/consul/10.107.50.165
autorstart=true
directory=/home/security_user
autorestart=true
startsecs=5
user=security_user
startretries=36
redirect_stderr=true
stdout_logfile=/home/security_user/secure_services/logs/supervisor/consul_log.txt
stderr_logfile=/home/security_user/secure_services/logs/supervisor/consul_err.txt
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=50
stdout_capture_maxbytes=1MB
stdout_events_enabled=false
loglevel=info

In /home/security_user/secure_services/service/config/consul/10.107.50.165, config is:
{
  "server": false,
  "datacenter": "ww",
  "data_dir": "/home/security_user/consul",
  "node_name": "consul_client01",
  "bind_addr": "10.107.50.165",
  "client_addr": "0.0.0.0",
  "retry_join": ["10.107.50.146","10.107.50.186","10.107.50.212"],
  "start_join": ["10.107.50.146","10.107.50.186","10.107.50.212"],
  "ui_dir": "/home/security_user/consul_0.6.3_web_ui",
  "log_level": "INFO",
  "retry_max": 10,
  "retry_interval": "20s",
  "enable_syslog": true
}

I use supervior to control consul service.

When I change  "bind_addr": "10.107.50.165" to  "bind_addr":"165.domain.com",consul service failed,and show "Error stating agent:Failed to start consul client :Failed to start lan serf:Failed to create memberlist:Failed to parse advertise address!"

I want to change bind_addr to domain 165.domain.com,but I don't know how to change。

Lowe Schmidt

unread,
Jul 12, 2018, 9:05:02 AM7/12/18
to consu...@googlegroups.com
First off, and you probably already know this, but Ubuntu 12.04 is end of life and unsupported by Canonical. 
Second, Consul 0.6.3 is over two years old.

As for your problem; why do you need to bind it to a hostname? not setting bind_addr should bind it to 0:0:0:0 and advertise the first private IP it finds (see https://www.consul.io/docs/agent/options.html#_bind)

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/consul/issues
Community chat: https://gitter.im/hashicorp-consul/Lobby
---
You received this message because you are subscribed to the Google Groups "Consul" group.
To unsubscribe from this group and stop receiving emails from it, send an email to consul-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/847a802c-d981-4f3f-ae9f-077d3a9380c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

贾秋月

unread,
Jul 13, 2018, 6:01:16 AM7/13/18
to Consul
I change to 0,0,0,0 ,but it does't work,I want to use dns to change bind_address from ip to domain actually.

在 2018年7月12日星期四 UTC+8下午9:05:02,Lowe Schmidt写道:
Reply all
Reply to author
Forward
0 new messages