I tried to run JBOSS(v5.x)[ubuntu 18.04] and it was saying:
Deployment "WebServer" is in error due to the following reason(s): LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use /0.0.0.0:8443
Deployment "jboss.web:service=WebServer" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.web:service=WebServer' **
So, tried to kill that process.
To find the PID, used command lsof -i:8443 and found no process.
Then tried sudo lsof -i:8443 and got this:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
lxd 11526 root 22u IPv4 696227 0t0 TCP localhost:8443 (LISTEN)
lxd 11526 root 25u IPv4 699223 0t0 TCP localhost:41776->localhost:8443 (ESTABLISHED)
lxd 11526 root 26u IPv4 701114 0t0 TCP localhost:8443->localhost:41776 (ESTABLISHED)
Then ran sudo kill -9 11526 //as without sudo, it was saying operation not permitted.
But again, when I run sudo lsof -i:8443 I can see new PID(each time I kill it, it runs in another PID!)
I am not sure what is wrong here and what to do.