goksan / statusnook

Effortlessly deploy a status page and start monitoring endpoints in minutes

Home Page:https://statusnook.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Passing custom as argument is not working

mhbahmani opened this issue · comments

I wanted to deploy on port 8090 but it seems that it just want 443 :)

root@vm:/home/statusnook# ./statusnook -port 8090 
1.714079665418717e+09	info	maintenance	started background certificate maintenance	{"cache": "0xc00013a300"}
2024/04/25 21:14:25 main.ListenHTTPS: listen tcp :443: bind: address already in use

Also surprisingly docker version is listening on 8000!

root@vm:~$ docker exec -it 12e5ae986a14 sh
/app # netstat -lntp
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:8000            0.0.0.0:*               LISTEN      1/statusnook
netstat: /proc/net/tcp6: No such file or directory
/app # ps fax
PID   USER     TIME  COMMAND
    1 root      0:00 ./statusnook -port 8000 -docker
   32 root      0:00 sh
   39 root      0:00 ps fax

Hey @mhbahmani

I wanted to deploy on port 8090 but it seems that it just want 443 :)

Did you start Statusnook without specifying a port at some point? I'm assuming you don't have any data to lose yet, if this is the case you should be able to delete statusnook-data. It should listen on port 8090 having done this.

There's some improvements I need to make here.

oh! Does your code save the port on its data? I see.
Nah I was just testing your project. Now I know where the problem is.

Besides this issue, putting all the codes in one file is not a good practice. It makes your repository way more professional and good-looking and easy to contribute if you split down your main file.

BTW, good luck!