Is there a way to restore a killed process? - linux

I'm trying to start httpd on my web server but when I try to start it, I was getting "httpd (pd 10989) already running", so I killed the process in hopes httpd might start up. No luck.
Now I am getting:
Starting HTTPD
(98)Address already in use: AH00072: make_sock: could not bind to
address [::]:9011
(98)Address already in use: AH00072: make_sock: could not bind to
address 0.0.0.0:9011
no listening sockets available, shutting down
AH00015: Unable to open logs
After I killed the process using:
kill -9 10989
Is there a way to restore this process?
Thanks for any help in advance!

Related

ChromeDriver will not run - Address already in use (98) - but nothing found to be using port 1915

ChromeDriver will not run, saying that the current address is already in use. Whenever I have used lsof I have found nothing using port 1915, which is what ChromeDriver is wanting to use.
I've looked everywhere to find a solution for this but they all just say to kill whatever is using the port but I can't find any.
I also found a similar question on here at 'Chromedriver cannot be started due to address already in use',
but that question shows their error is saying an IPv4 port is not available whilst mine says IPv6.
Starting ChromeDriver 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72) on port 9515
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1553613641.983][SEVERE]: bind() failed: Address already in use (98)
IPv6 port not available. Exiting...
Any help on this would be greatly appreciated. This issue is critical for one of my projects which worked fine on windows, but I just recently moved to linux due to my windows getting corrupted and not wanting to have to deal with installing windows again, plus wanting a change-up in my day to day workings on the computer. Because of this, any tips given would be great if explained like I'm 5.
Thanks in advance.
Alternatively, if this issue is because you have another chromedriver process in the background, you can just run killall chromedriver.
fuser -k 9515/tcp
This one worked fine thanks for #Svilen
To identify the process id for ChromeDriver use ps -fA | grep chromedriver, Then kill the column two id number.
You need to kill chromedriver to get this working
vikaspiprade#AUMEL-P7750-VP:~/openfield-cloud/nightwatch$ npx nightwatch --test ./tests/widgets/banner.test.js --testcase "Hide Row Label in Banner Widget"
Error: ChromeDriver process exited with code: 1
[1663729485.869][SEVERE]: bind() failed: Address already in use (98)
at ChildProcess.emit (node:events:513:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
[1663729485.869][SEVERE]: bind() failed: Address already in use (98)
vikaspiprade#AUMEL-P7750-VP:~/openfield-cloud/nightwatch$ ps
PID TTY TIME CMD
14354 pts/7 00:00:00 chromedriver
14416 pts/7 00:00:01 chrome <defunct>
14854 pts/7 00:00:00 npm exec serve
14878 pts/7 00:00:00 sh
14879 pts/7 00:00:00 node
15134 pts/7 00:00:00 ps
23260 pts/7 00:00:00 bash
vikaspiprade#AUMEL-P7750-VP:~/openfield-cloud/nightwatch$ kill -9 14354
vikaspiprade#AUMEL-P7750-VP:~/openfield-cloud/nightwatch$

Apache can't start "could not bind to address [::]:443" though no process is using it, and netcat can openit

my version of apache
Server version: Apache/2.4.6 (CentOS)
Server built: Apr 20 2018 18:10:38
when I run the command lsof -i :443 it returns nothing
but if I try to run apache (directly by running httpd I got the error, I verified with ps aux that there was no previous httpd/apache process already running)
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
However if i try to run a netcat process on 443 nc 0.0.0.0 -l 443 , it does open and I can send data
I'm a bit lost on what could be the problem ?
Found it
Listen 443 was present two times among the different configuration files of apache
it's a pity apache does not have a more explicit error/warning message (i.e "option defined two times" etc.)
It seems another process is using port 443 on your server.
netstat -anp | grep 443
output will be
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
disable port 443 and start
systemctl start httpd.service

Failed to start httpd server: Address already in use

Surely I know that same question is already posted here. However, when I searched it, the status is different from mine and I cannot understand the answers. Therefore I post my problem here. Sorry for duplicating issues.
My homepage suddenly doesn't work and I found out that it failed to start httpd service. Following image is the result when I command 'sudo service httpd start'
Starting httpd: (98)Address already in use: AH00072: make_sock: could
not bind to address [::]:80 (98)Address already in use: AH00072:
make_sock: could not bind to address 0.0.0.0:80 no listening sockets
available, shutting down AH00015: Unable to open logs
[FAILED]
restart doesn't work also.
$ sudo service httpd restart
Stopping httpd: [FAILED]
Starting httpd: (98)Address already in use: AH00072: make_sock: could not bind
to address [::]:80 (98)Address already in use: AH00072: make_sock:
could not bind to address 0.0.0.0:80 no listening sockets available,
shutting down AH00015: Unable to open logs
[FAILED]
What should I do to restart httpd service and revive my homepage?
Error 98 usually occurs when some webserver is using the port, here 80, or
The clean release port/address was not done.
If port is being used by other webserver, shutdown the server. You can find out which service is using port 80 by
netstat -pan |grep 80
and then shutdown the service.
If the port was not released upon unclean shutdown of server, then
sudo service networking restart
to release address/port combination from bind. This usually fixes error 98 for me.
I have the same problem. So i looked to netstat:
sudo netstat -tulpn | grep :80
and received:
tcp6 0 0 :::80 :::* LISTEN 7836/docker-proxy
after killing process:
sudo kill 7836
Files defined inside conf.d would have Listen port as 80 along with repetitive declaration of Listen port in httpd.conf which can cause this issue.
Seems port 80 is used by some other process, it can be checked by "netstat -anp|grep :80" Or assign a new available port to the Listen directive in httpd.conf and restart httpd.
Your httpd server is already started. Try restarting the service instead of starting it again:
sudo service httpd restart

node server is starting automatically and can't be killed

Environment
Windows 10 Pro
PATH setting:
C:\Program Files (x86)\nodejs\ (v0.10.13)
C:\Program Files\nodejs (v6.2.2)
node version global: v6.2.2
npm version : 3.9.5
Description
I installed node.js, and right after installation I got problem because nodejs starting background process taking port 8080 which must not be taken.
running command:
>netstat -ano | find "8080"
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 4428
running command:
>taskkill /IM "node.exe" /T /F
SUCCESS: The process with PID 6140 (child process of PID 4428) has been terminated.
SUCCESS: The process with PID 2916 (child process of PID 2776) has been terminated.
SUCCESS: The process with PID 10888 (child process of PID 2776) has been terminated.
SUCCESS: The process with PID 4428 (child process of PID 2556) has been terminated.
SUCCESS: The process with PID 2776 (child process of PID 2560) has been terminated.
>netstat -ano | find "8080"
But after some time server is started again:
>netstat -ano | find "8080"
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 11052
Looked up startup applications, services and scheduled tasks, found nothing containing node or npm.
Also found no info on this event in application logs of mmc console.
What part of windows system can cause startup of node server?
How can I change this default port for node server?
Also noticed that if i'll start some other process and bind it to 8080 right after killing node.exe processes, then node trying to: [start new process and connect to 8080]----{fail}---->[retry attempt].
Task manager displays 2 node.exe processes on port 8000 and 8080. Get request on those ports result in "Cannot get /". All processes of node pointing to C:\Program Files (x86)\nodejs\ (v0.10.13).
SOLVED
Don't know why exactly, but it seems that version v0.10.13 of node which (was installed along with aptana studio 3) has some sort of service, which wasn't easily visible in service list and which was causing the trouble. Removal of this old version of node removed server instances from processes.

Error initializing sockets: port=6000. Address already in use

I lunched a simulator program which developed on C++ in my Ubuntu 11 when i want kill this process from process list of Linux and want to run it again, i faced to this error:
Error initializing sockets: port=6000. Address already in use
I used lsof command to find PID of process:
saman#jack:~$ lsof -i:6000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
rcssserve 8764 saman 3u IPv4 81762 0t0 UDP *:x11
after that i tried to kill PID of 8764. but still it has error.
How can i fix it?
I think the problem you are having is that the socket if it is not shutdown correctly then it is still reserved and waiting for a timeout to be closed by the kernel.
Try doing a netstat -nutap and see if there's a line like this:
tcp 0 0 AAA.AAA.AAA.AAA:6000 XXX.XXX.XXX.XXX:YYYY TIME_WAIT -
if that's the case you just have to wait until the kernel drops it (30 secs approx) until you can open the socket at 6000 without conflict
It would seem that port 6000 is used by the X windowing system (the GUI part of linux) and is probably just restarted when you kill the process... either you'll need run the simulation without X-windows running, or you tweak the code to use a different port..

Resources