>From ACC, "Test of host agent connection" failed.

Details:
log record ID:
0003BA47690F063C00000000000006E5
trace record ID:
0003BA47690F063C00000002000006E5

error stack:
Test of host agent connection failed.
caused by Ping host agent failed! Used endpoint: 'http://t2000-2004-zone1:1128' [com.sap.nw.lm.aci.engine.base.exception.EngineExce ption]
caused by Connection IO Exception. Check nested exception for details. (Unable to connect to t2000-2004-zone1:1128 - Connection refused) [com.sap.engine.services.webservices.espbase.client .bindings.exceptions.TransportBindingException]
caused by Unable to connect to t2000-2004-zone1:1128 - Connection refused [java.io.IOException]

Can not access url: http://v240-2004-03:1128/SAPHostControl?wsdl

Solution:
Check host agent processes on the host
# ps -ef|grep sap
Only saphostexec is running. saposcol and sapstartsrv are not running

Check /var/adm/messages:
# grep sap /var/adm/messages
Jun 17 17:18:08 v240-2004-03 mount[501]: [ID 369233 user.error] backgrounding: /sapmnt
Jun 17 17:25:44 v240-2004-03 mount[501]: [ID 464425 user.error] giving up on: /sapmnt
Jun 17 18:11:17 v240-2004-03 sapuxuserchk[1074]: [ID 427199 user.error] pam_dial_auth: terminal-device not specifiedby login, returning Error in underlying service module.
Jun 17 19:42:15 v240-2004-03 SAPCS1_10[1806]: [ID 892271 user.error] Unable to open trace file sapstartsrv.log. (Error 11 Resource temporarily unavailable) [ntservsserver.cpp 2282]
Jun 17 19:47:15 v240-2004-03 SAPCS1_11[2688]: [ID 892271 user.error] Unable to open trace file sapstartsrv.log. (Error 11 Resource temporarily unavailable) [ntservsserver.cpp 2282]

Jun 19 16:12:11 v240-2004-03 su: [ID 810491 auth.crit] 'su emroot' failed for sapuser on /dev/pts/1
Jun 19 20:31:03 v240-2004-03 su: [ID 810491 auth.crit] 'su root' failed for sapuser on /dev/pts/1
Jun 22 16:57:11 v240-2004-03 SAPSAP_99[2153]: [ID 675441 user.error] Unable to open trace file sapstartsrv.log. (Error 13 Permission denied) [ntservsserver.cpp 2380]
Jun 22 17:06:35 v240-2004-03 SAPSAP_99[2223]: [ID 675441 user.error] Unable to open trace file sapstartsrv.log. (Error 13 Permission denied) [ntservsserver.cpp 2380]
Jun 22 17:08:49 v240-2004-03 SAPSAP_99[2287]: [ID 675441 user.error] Unable to open trace file sapstartsrv.log. (Error 13 Permission denied) [ntservsserver.cpp 2380]
Jun 22 17:13:02 v240-2004-03 SAPSAP_99[758]: [ID 675441 user.error] Unable to open trace file sapstartsrv.log. (Error 13 Permission denied) [ntservsserver.cpp 2380]
Jun 22 17:29:58 v240-2004-03 SAPSAP_99[1211]: [ID 675441 user.error] Unable to open trace file sapstartsrv.log. (Error 13 Permission denied) [ntservsserver.cpp 2380]
Jun 22 17:52:49 v240-2004-03 SAPSAP_99[1270]: [ID 675441 user.error] Unable to open trace file sapstartsrv.log. (Error 13 Permission denied) [ntservsserver.cpp 2380]
Jun 22 17:54:03 v240-2004-03 SAPSAP_99[1304]: [ID 675441 user.error] Unable to open trace file sapstartsrv.log. (Error 13 Permission denied) [ntservsserver.cpp 2380]
Jun 22 18:02:16 v240-2004-03 SAPSAP_99[752]: [ID 675441 user.error] Unable to open trace file sapstartsrv.log. (Error 13 Permission denied) [ntservsserver.cpp 2380]

Check permission of trace file sapstartsrv.log
# ls -l /usr/sap/hostctrl/work
...
-rw-r----- 1 root other 8 Jun 19 15:44 logsave.bin
-rw-r----- 1 root other 1749109313 Jun 19 16:00 sapstartsrv.log
-rw-r----- 1 root other 37512545983 Jun 19 15:59 sapstartsrv.old
# chown sapadm:sapsys sapstartsrv.log
# chown sapadm:sapsys logsave.bin
# chown sapadm:sapsys sapstartsrv.old

# cd /usr/sap/hostctrl/exe
# ./saphostexec -install

Problem solved





Read More about [SAP ACC: How to troubleshoot failed to test Host Agent...