Can i change the default ports used by consul ?

1,431 views
Skip to first unread message

nss pradeep

unread,
Nov 14, 2016, 8:54:50 AM11/14/16
to Consul
 Hi,

I am aware that we can define different ports for dns and http in the ports section of the config file to override the default ports. What about the other ports such as 8300, 8301, 8302 and 8400 ? can i override these default ports ?

Thanks,
Pradeep NSS

Michael Fischer

unread,
Nov 14, 2016, 9:24:02 AM11/14/16
to consu...@googlegroups.com
Yes, you can override all of them per the documentation.  But all members of the cluster and API clients must agree on what those port numbers are, of course.

--
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
IRC: #consul on Freenode
---
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/86c7e4e7-2135-406f-8f32-f8b206e8c175%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

nss pradeep

unread,
Nov 14, 2016, 10:46:01 AM11/14/16
to consu...@googlegroups.com
Hi Michael,

Are you referring to use of advertise-addrs map in the config file to override ports 8301, 8302, 8400 ? Or is there any other way ?

Michael Fischer

unread,
Nov 14, 2016, 11:07:39 AM11/14/16
to consu...@googlegroups.com
Specifically (formatting omitted):

ports This is a nested object that allows setting the bind ports for the following keys:

dns - The DNS server, -1 to disable. Default 8600.
http - The HTTP API, -1 to disable. Default 8500.
https - The HTTPS API, -1 to disable. Default -1 (disabled).
rpc - The CLI RPC endpoint. Default 8400.
serf_lan - The Serf LAN port. Default 8301.
serf_wan - The Serf WAN port. Default 8302.
server - Server RPC address. Default 8300.


Best regards,

--Michael

nss pradeep

unread,
Nov 14, 2016, 11:35:59 AM11/14/16
to consu...@googlegroups.com
One final query, can we override these ports using command line flags ?

Thank you

nss pradeep

unread,
Nov 15, 2016, 5:21:12 PM11/15/16
to consu...@googlegroups.com
I see we have -http-port command line flag to set the port for http api. Is there any command line flag to set serf-wan port ?

Thanks,
Pradeep NSS
Reply all
Reply to author
Forward
0 new messages