snmehl_connect and nmectla_agentctl
We got a page today from Grid Control saying that the agent on one of our database servers is unreachable but the host is up. Checking the agent, I found out that it wasn’t running at all. Restarted it but Oracle said it wasn’t ready. Looking at the trace file (ORA_AGENT_HOME/sysman/log/emdctl.trc), there was an entry with the following error:
2008-12-20 11:11:26 Thread-1 WARN http: snmehl_connect: connect failed to (database_server_name:3872): Connection refused (error = 146)
2008-12-20 11:11:26 Thread-1 ERROR main: nmectla_agentctl: Error connecting to https://:3872/emd/main/. Returning status code 1
So, with that, this is what I did:
1)/stop the db
2) stop the oms
3) start the db
4)start the the oms and
5)stop the agent delete all the files in the following directories
stop the agent AOH/bin/emctl stop agent
a) rm -rf /sysman/emd/agntstmp.txt
b) rm -rf /sysman/emd/upload/*
c) rm -rf /sysman/emd/recv/*
d) rm -rf /sysman/emd/state/*
e) rm -rf /sysman/emd/collection/*
f) rm -rf /sysman/emd/lastupld.xml
6) start the agent
If this doesn’t help you check in ORA_AGENT_HOME/sysman/config/emd.properties:
EMD_URL=https://:3872/emd/main/
- if port is free
- if in /etc/hosts is your server ( you can try IP address)
REPOSITORY_URL=https:///em/upload
agentTZRegion=UTC
- timezone must be the same as on server ( ckeck command date)
Regards,
Tom


