Grid Control Agent "Failed to start HTTP listener"

.

Error:
bash-3.00$ ./emctl start agent
Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
Starting agent ....... failed.
Failed to start HTTP listener.
Consult the log files in: ...../OracleHomes/agent10g/sysman/log

Solution:
To prevent the agent from binding to all IP's in the machine:

- Go to AGENT_HOME/sysman/config/emd.properties
Modify this parameter :

AgentListenOnAllNICs=TRUE

To

AgentListenOnAllNICs=FALSE

- Startup the agents now.


If it doesn't work for you, you should also try to change the port in emd.properties file, EMD_URL parameter.

Also look at the trace file at $AGENT_HOME/sysman/log/emagent.trc , if you have an error like "ERROR http: snmehl_connect: failed to create socket: Too many open files (error = 24)" you should check running agent processes (ps -ef |grep agent), kill them and restart agent... If the agent starts but after a while stops itself again, this may be caused by operating system running out of open file handles limit. Check out the kernel which limits the max open file number for a process for your OS.

Description for these parameters:
AgentListenOnAllNIC: Whether the EMD should listen on all NICs on the current host (the default) or just the NIC associated with the hostname in EMD_URL
EMD_URL: EMD main servlet URL

13 comments:

Mukarram Khan said...

Grid Control Agent "Failed to start HTTP listener"

I have faced the same error and this was helpful.

Thanks
Mukarram Khan

Anonymous said...

Very good article. I could able to solve the issue.

Thanks
Srinivas

Emre Baransel said...

You're welcome;
i'm glad your problems were resolved.

Anonymous said...

Very helpful. By setting AgentListenOnAllNICs=TRUE
I resolved my problem. Can you explain why it work and what could happened?

Thanks!

Emre Baransel said...

Description for AgentListenOnAllNIC:
Whether the EMD should listen on all NICs on the current host (the default) or just the NIC associated with the hostname in EMD_URL

So it seems in your case, the IP for the hostname in EMD_URL didn't work properly to connect the server but another NIC's IP has succeed.. If so, setting the hostname in the EMD_URL parameter in emd.properties file properly may be better.

M said...

Thank you this was very helpful. I would only suggest to reverse the two options, start with finding and killing any remnant agent processes prior to editing the files. That worked for me and I did not need to edit the indicated files.

Nathan said...

Thanks, it is very helpful.
I am having issue with the agent starts and stop it self again after several days.
Could you please suggest me what is the max number of open files we should set in the kernel?

Thanks

Anonymous said...

Thank you, it did help me to solve the problem I encountered.

Cheers

YAMAHA MOTOR VIET NAM said...

Thank,

This guide me solve this error.

Louis Nguyen.

Anonymous said...

Thank you buddy!!!

Anonymous said...

Works for me too!!! perfect!

David Lozano said...

Thank you :)

Anonymous said...

Great Post
Solved the issue in minutes which i have been working for hours