Closed Doooooo0o closed 2 years ago
I tried to use sqlite, to see if it was an issue w/ postgres: the issue also exists with sqlite.
I ran your steps with standard caddy install and rest api is available.
oot@server:~()# docker exec -it netmaker netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.11:38067 0.0.0.0: LISTEN -
tcp 0 0 :::8081 ::: LISTEN 1/netmaker
it would be interesting to see what happens in your setup up if you kill the netmaker-ui container whether the dashboard is available after restart.
@mattkasun dashboard (container netmaker-ui) is up and running, BUT since netmaker-ui is hitting netmaker's api on netmaker container, since I have no socket binding on 8081 inside the container, the dashboard is not usable. What test do you think I should run?
docker exec -it netmaker-ui netstat -ntlp
$ docker exec -it netmaker-ui netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 10/nginx: master pr
tcp 0 0 127.0.0.11:46111 0.0.0.0:* LISTEN -
I ran your steps with standard caddy install and rest api is available. oot@server:~()# docker exec -it netmaker netstat -ntlp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.11:38067 0.0.0.0: LISTEN - tcp 0 0 :::8081 ::: LISTEN 1/netmaker
Have you tried to add a network and peers before deleting netmaker container?
I re-tried from scratch:
$ netclient list|jq '.networks[].peers'|rg -v public
[
{
"addresses": [
{
"cidr": "192.168.15.1/32",
"ip": "192.168.15.1"
}
]
},
{
"addresses": [
{
"cidr": "192.168.15.254/32",
"ip": "192.168.15.254"
}
]
}
]
my peers are properly registered. The issue occurs after deleting netmaker after creating some peers. nb the netclient here is 192.168.15.2
and is reachable from both .1
and .254
before deleting netmaker's API container
I don't understand the need for multiple binds of port 8081 for the netmaker container:
the first two were for production purpose, I don't like having open ports for no reason as they are able to get properly behind haproxy.
I think I got something about this issue:
It appears that netmaker API server has a need to reach mq at bootstrap time. There is no log about this on starting process. I replaced my public IP address on MQ_HOST:
to "mq"
and it fixed the issue.
So, 2 things here:
regarding your questions
Useful note
Quick way to reproduce this bug
$ docker-compose up -d
$ docker exec -ti netmaker ss -lntpuae|grep -i listen
$ docker rm -f netmaker
$ docker-compose up -d netmaker
$ docker exec -ti netmaker ss -lntpuae|grep -i listen
What happened?
Using docker-compose:
I run:
Netmaker's daemons are behind an HAProxy instance which runs those configs:
On the https frontend:
Everything goes OK. I register my clients, they are able to see and ping eachothers:
Then, I want to run a recovery test. So:
follwed after by:
This is where my issue starts:
Netmaker properly starts its wireguard client BUT it doesn't start the REST server, needed to access netmaker's ui. I have no relevant logline about this, eventhough
VERBOSITY: "3"
is set on my dockerVersion
v0.13.1
What OS are you using?
Linux
Relevant log output