I keep getting the following error when trying to view my hooks
This is what is says when I run webhook
[webhook] 2018/05/03 12:47:05 version 2.5.0 starting
[webhook] 2018/05/03 12:47:05 setting up os signal watcher
[webhook] 2018/05/03 12:47:05 attempting to load hooks from hooks.json
[webhook] 2018/05/03 12:47:05 found 1 hook(s) in file
[webhook] 2018/05/03 12:47:05 loaded: redeploy-webhook
[webhook] 2018/05/03 12:47:05 serving hooks on http://0.0.0.0:9000/hooks/{id}
[webhook] 2018/05/03 12:47:05 listen tcp 0.0.0.0:9000: bind: address already in use
issue this to identify what PID is using port 9000
sudo netstat -peanut
no doubt your webhook is already running when you attempt to launch it a second time
@scottstensland You are correct, how do I close this connection. Apologies I am not familiar with Linux
issue this
sudo netstat -peanut
here is a typical output
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 127.0.0.1:3000 0.0.0.0:* LISTEN 0 8575532 18008/docker-proxy
tcp 0 0 127.0.0.1:3001 0.0.0.0:* LISTEN 0 8575138 17758/docker-proxy
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 0 19841 1950/docker-proxy
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 0 16586 1088/nginx -g daemo
tcp 0 0 127.0.0.1:4190 0.0.0.0:* LISTEN 0 19553 1776/docker-proxy
tcp 0 0 127.0.0.1:993 0.0.0.0:* LISTEN 0 19610 1816/docker-proxy
tcp 0 0 127.0.0.1:995 0.0.0.0:* LISTEN 0 19583 1805/docker-proxy
tcp 0 0 127.0.0.1:5000 0.0.0.0:* LISTEN 0 8506067 31882/docker-proxy
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 0 17347 1560/docker-proxy
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 0 18496 1746/docker-proxy
tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 0 19635 1842/docker-proxy
tcp 0 0 127.0.0.1:110 0.0.0.0:* LISTEN 0 19790 1924/docker-proxy
tcp 0 0 127.0.0.1:143 0.0.0.0:* LISTEN 0 18684 1912/docker-proxy
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 16585 1088/nginx -g daemo
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 16033 1000/sshd
tcp 0 1 144.217.80.162:80 73.94.87.55:52156 LAST_ACK 0 0 -
tcp 0 1 144.217.80.162:443 73.94.87.55:52157 LAST_ACK 0 0 -
tcp 0 212 144.217.80.162:22 69.207.210.112:51920 ESTABLISHED 0 9407973 2582/sshd: ulfberht
tcp6 0 0 :::22 :::* LISTEN 0 16035 1000/sshd
udp 0 0 0.0.0.0:68 0.0.0.0:* 0 12813 824/dhclient
examine your output ... identify offending pid listed on far right column PID/Program name
so lets say pid is 12345 ... before we kill that pid first see what process has it by issuing
ps -eafww | grep 12345
to execute the kill issue
sudo kill 12345
possibly it will fail to be killed with above gentle syntax ... a more forceful kill syntax is
sudo kill -9 12345
now issue again above netstat command to confirm port 9000 no longer appears
Thats great thank you so much
Most helpful comment
issue this
here is a typical output
examine your output ... identify offending pid listed on far right column PID/Program name
so lets say pid is 12345 ... before we kill that pid first see what process has it by issuing
to execute the kill issue
possibly it will fail to be killed with above gentle syntax ... a more forceful kill syntax is
now issue again above netstat command to confirm port 9000 no longer appears