Knowledgebase:
Resolving 'SVC-SOCBIND' error
28 April 2015 02:12 PM

Summary

A Socket bind error will occur when there are more than two MarkLogic Server instances running simultaneously in the same host. Two simultaneous instances of MarkLogic Server might occur if a MarkLogic Server process did not gracefully shutdown while a new one was spawned.

Example error messages seen in the MarkLogic Server ErrorLog.txt file:

Critical: Server::updateConfigServers: SVC-SOCBIND: Socket bind error: bind 0.0.0.0:8000: Address already in use
Critical: Server::updateConfigServers: SVC-SOCBIND: Socket bind error: bind 0.0.0.0:8001: Address already in use
Critical: Server::updateConfigServers: SVC-SOCBIND: Socket bind error: bind 0.0.0.0:8002: Address already in use

It is dangerous for two instances of the server to be running simultaneously on the same host. Both instances will attempt to operate from the same server configuration files and on the same forest data files. The behavior is unpredictable and, in the worst case, it might lead to inconsistent data.

Mitigation

If you suspect that there are multiple MarkLogic Server instances running at the same time on the same host, you should follow these steps:

1. To get a list of MarkLogic processes running, execute

ps -ef | grep -i mark

Under normal circumstances, it will return 2 process - a watchdog process running at root and the main MarkLogic Server process.  For example, the ps command  should return something like. 

root 1766 1 0 Apr03 ? 00:00:00 /opt/MarkLogic/bin/MarkLogic
daemon 1767 1766 0 Apr03 ? 04:00:24 /opt/MarkLogic/bin/MarkLogic

2. Run the above command on all hosts in your MarkLogic cluster. If you discover more than the expected 2 processes on any single host, then 
    -  Shutdown MarkLogic on the node and verify that no MarkLogic processes are running.
    -  If there are still MarkLogic processes running, kill the processes by executing

     kill -9 <pid>

where <pid> is the process id discovered while executing the ps command.

    -  If that still does not clear the errant MarkLogic process, reboot the host machine.

3. Once there are no more MarkLogic Server processes running, restart MarkLogic Server.

 

(3 vote(s))
Helpful
Not helpful

Comments (0)