backend “consul” {
address = “127.0.0.1:8500"
path = “vault”
}
listener “tcp” {
address = “127.0.0.1:8200”
tls_disable = 1
}Active Internet connections (only servers)Proto Recv-Q Send-Q Local Address Foreign Address Statetcp 0 0 0.0.0.0:80 0.0.0.0:* LISTENtcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTENtcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTENtcp 0 0 127.0.0.1:25 0.0.0.0:* LISTENtcp 0 0 0.0.0.0:443 0.0.0.0:* LISTENtcp 0 0 0.0.0.0:1603 0.0.0.0:* LISTENtcp 0 0 0.0.0.0:8260 0.0.0.0:* LISTENtcp 0 0 0.0.0.0:25672 0.0.0.0:* LISTENtcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTENtcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTENtcp6 0 0 :::80 :::* LISTENtcp6 0 0 ::1:25 :::* LISTENtcp6 0 0 :::1603 :::* LISTENtcp6 0 0 :::5672 :::* LISTENError checking seal status: Get https://127.0.0.1:8200/v1/sys/seal-status: dial tcp 127.0.0.1:8200: getsockopt: connection refused
service consul status
● consul.service - LSB: Consul service discovery framework
Loaded: loaded (/etc/init.d/consul)
Active: active (running) since Mon 2017-10-09 12:24:26 UTC; 1min 33s ago
Process: 496 ExecStart=/etc/init.d/consul start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/consul.service
└─529 /usr/local/bin/consul agent -config-dir /etc/consulvault server -config=/etc/vault/config.json
Error detecting redirect address: Get http://127.0.0.1:8500/v1/agent/self: dial tcp 127.0.0.1:8500: getsockopt: connection refused
Error initializing core: missing redirect addressActive Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 10.8.0.1:8300 0.0.0.0:* LISTEN 529/consul
tcp 0 0 10.8.0.1:8301 0.0.0.0:* LISTEN 529/consul
tcp 0 0 10.8.0.1:8302 0.0.0.0:* LISTEN 529/consul
tcp 0 0 127.0.0.1:8400 0.0.0.0:* LISTEN 529/consul
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 566/nginx -g daemon
tcp 0 0 127.0.0.1:8500 0.0.0.0:* LISTEN 529/consul
tcp 0 0 127.0.0.1:8600 0.0.0.0:* LISTEN 529/consul
tcp 0 0 0.0.0.0:1603 0.0.0.0:* LISTEN 683/sshd
tcp 0 0 0.0.0.0:1604 0.0.0.0:* LISTEN 542/openvpn
tcp6 0 0 :::1603 :::* LISTEN 683/sshd
udp 0 0 127.0.0.1:8600 0.0.0.0:* 529/consul
udp 0 0 0.0.0.0:68 0.0.0.0:* 421/dhclient
udp 0 0 10.8.0.1:8301 0.0.0.0:* 529/consul
udp 0 0 10.8.0.1:8302 0.0.0.0:* 529/consul
udp 0 0 0.0.0.0:48302 0.0.0.0:* 421/dhclient
udp6 0 0 :::9817 :::* 421/dhclientbackend "consul" {
redirect_addr = "https://1.vault.xxx.net:8260"
address = "consul.xxx.net.:8500"
path = "vault"
}
listener "tcp" {
address = "1.vault.xxx.net:8260"
tls_disable = 1
}netstat -pltn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Programname
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 32440/nginx -g daem
tcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTEN 910/epmd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 751/postgres
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1611/exim4
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 32440/nginx -g daem
tcp 0 0 0.0.0.0:1603 0.0.0.0:* LISTEN 1708/sshd
tcp 0 0 0.0.0.0:8260 0.0.0.0:* LISTEN 32440/nginx -g daem
tcp 0 0 0.0.0.0:25672 0.0.0.0:* LISTEN 1258/beam
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 548/mongod
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 507/redis-server 12
tcp6 0 0 :::80 :::* LISTEN 32440/nginx -g daem
tcp6 0 0 ::1:25 :::* LISTEN 1611/exim4
tcp6 0 0 :::1603 :::* LISTEN 1708/sshd
tcp6 0 0 :::5672 :::* LISTEN 1258/beam903460 [WARN ] physical/consul: reconcile unable to talk with Consul backend: error=service registration failed: Puthttp://consul.xxx.net.:8500/v1/agent/service/register: dial tcp 167.114.238.95:8500: getsockopt: connection refusedss -antp | grep -i consul
LISTEN 0 128 10.8.0.1:8300 *:* users:(("consul",pid=513,fd=3))
LISTEN 0 128 10.8.0.1:8301 *:* users:(("consul",pid=513,fd=6))
LISTEN 0 128 10.8.0.1:8302 *:* users:(("consul",pid=513,fd=13))
LISTEN 0 128 127.0.0.1:8400 *:* users:(("consul",pid=513,fd=15))
LISTEN 0 128 127.0.0.1:8500 *:* users:(("consul",pid=513,fd=16))
LISTEN 0 128 127.0.0.1:8600 *:* users:(("consul",pid=513,fd=20))
netstat -paunt
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Programname
tcp 0 0 10.8.0.1:8300 0.0.0.0:* LISTEN 513/consul
tcp 0 0 10.8.0.1:8301 0.0.0.0:* LISTEN 513/consul
tcp 0 0 10.8.0.1:8302 0.0.0.0:* LISTEN 513/consul
tcp 0 0 127.0.0.1:8400 0.0.0.0:* LISTEN 513/consul
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 564/nginx -g daemon
tcp 0 0 127.0.0.1:8500 0.0.0.0:* LISTEN 513/consul
tcp 0 0 127.0.0.1:8600 0.0.0.0:* LISTEN 513/consul
tcp 0 0 0.0.0.0:1603 0.0.0.0:* LISTEN 678/sshd
tcp 0 0 0.0.0.0:1604 0.0.0.0:* LISTEN 538/openvpn
tcp 0 332 167.114.238.95:1603 90.66.211.60:50434 ESTABLISHED 696/sshd: mathieu [
tcp 0 0 167.114.238.95:1604 167.114.229.240:41954 ESTABLISHED 538/openvpn
tcp 0 0 167.114.238.95:1604 167.114.227.88:34869 ESTABLISHED 538/openvpn
tcp6 0 0 :::1603 :::* LISTEN 678/sshd
udp 0 0 127.0.0.1:8600 0.0.0.0:* 513/consul
udp 0 0 0.0.0.0:17195 0.0.0.0:* 408/dhclient
udp 0 0 0.0.0.0:68 0.0.0.0:* 408/dhclient
udp 0 0 10.8.0.1:8301 0.0.0.0:* 513/consul
udp 0 0 10.8.0.1:8302 0.0.0.0:* 513/consul
udp6 0 0 :::65402 :::* 408/dhclient