My Oracle Support Banner

12c Agent Secure Failed with "java.net.ConnectException: Connection refused: connect" (Doc ID 2060464.1)

Last updated on APRIL 19, 2023

Applies to:

Enterprise Manager Base Platform - Version 12.1.0.1.0 and later
Information in this document applies to any platform.

Symptoms

Agent secure step at the end of a new silent installation of the agent, failed with the below error in the <AGENT_HOME>/cfgtoollogs/cfgfw/CfmLogger_<timestamp>.log: 

INFO: oracle.sysman.top.agent:The command: cmd /c set NEED_EXIT_CODE=1&&<AGENT_INSTANCE_HOME>\bin\emctl.bat secure agent completed with status=1
SEVERE: oracle.sysman.top.agent:emctl secure agent command has failed with status=1 on attempt 1
INFO: oracle.sysman.top.agent:Follow the below steps to manually secure and add the host and agent targets:
1. Execute the command: cmd /c set NEED_EXIT_CODE=1&&<AGENT_INSTANCE_HOME>\bin\emctl.bat secure agent
2. Start the agent by executing the command: <AGENT_INSTANCE_HOME>\bin\emctl start agent
3. Add the targets by executing the command: <AGENT_INSTANCE_HOME>\bin\emctl config agent addinternaltargets
INFO: oracle.sysman.top.agent:Executing the command: cmd /c set NEED_EXIT_CODE=1&&<AGENT_INSTANCE_HOME>\bin\emctl.bat secure agent
INFO: oracle.sysman.top.agent:Oracle Enterprise Manager Cloud Control 12c Release 5
INFO: oracle.sysman.top.agent:Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
INFO: oracle.sysman.top.agent:Agent is already stopped... Done.
INFO: oracle.sysman.top.agent:Securing agent... Started.
INFO: oracle.sysman.top.agent:
Securing agent... Failed.
INFO: oracle.sysman.top.agent:The command: cmd /c set NEED_EXIT_CODE=1&&<AGENT_INSTANCE_HOME>\bin\emctl.bat secure agent completed with status=1
SEVERE: oracle.sysman.top.agent:emctl secure agent command has failed with status=1 on attempt 2
INFO: oracle.sysman.top.agent:Follow the below steps to manually secure and add the host and agent targets:
1. Execute the command: cmd /c set NEED_EXIT_CODE=1&&<AGENT_INSTANCE_HOME>\bin\emctl.bat secure agent
2. Start the agent by executing the command: <AGENT_INSTANCE_HOME>\bin\emctl start agent
3. Add the targets by executing the command: <AGENT_INSTANCE_HOME>\bin\emctl config agent addinternaltargets
SEVERE: oracle.sysman.top.agent:Agent configuration has failed
INFO: oracle.sysman.top.agent:AgentConfiguration:agent configuration finished with status = false
INFO: oracle.sysman.top.agent:AgentConfiguration:agent configuration finished with status = false
INFO: oracle.sysman.top.agent:The plug-in Agent Configuration Assistant has failed its perform method
INFO: Cfm.save() was called
INFO: Cfm.save(): 2 aggregate instances saved
INFO: done waiting for Action from 10:01:28.945

 

Attempting to secure the Agent manually also failed:

The <AGENT_INST>/sysman/log/secure.log reported the below errors: 

2015-09-18 10:16:39,465 [main] INFO agent.SecureAgentCmd downloadFile.1046 - Download destination: <AGENT_INSTANCE_HOME>/sysman/config/b64LocalCertificate.txt
2015-09-18 10:16:39,465 [main] INFO agent.SecureAgentCmd downloadFile.1074 - download pathAndQuery /empbs/wallets/<AGENT_HOSTNAME>/b64LocalCertificate.txt
2015-09-18 10:16:39,496 [main] INFO agent.SecureAgentCmd downloadFile.1077 - Response Status Code: 200
2015-09-18 10:16:39,496 [main] INFO agent.SecureAgentCmd secureAgentWithOMS.476 - Downloading from http://<OMS_HOSTNAME>:<PORT>/empbs/wallets/<AGENT_HOSTNAME>/b64InternetCertificate.txt to <AGENT_INSTANCE_HOME>/sysman/config/b64InternetCertificate.txt
2015-09-18 10:16:39,496 [main] INFO agent.SecureAgentCmd downloadFile.1045 - Download URL source: http://<OMS_HOSTNAME>:<PORT>/empbs/wallets/<AGENT_HOSTNAME>/b64InternetCertificate.txt
2015-09-18 10:16:39,496 [main] INFO agent.SecureAgentCmd downloadFile.1046 - Download destination: <AGENT_INSTANCE_HOME>/sysman/config/b64InternetCertificate.txt
2015-09-18 10:16:39,496 [main] INFO agent.SecureAgentCmd downloadFile.1074 - download pathAndQuery /empbs/wallets/<AGENT_HOSTNAME>/b64InternetCertificate.txt
2015-09-18 10:16:39,558 [main] INFO agent.SecureAgentCmd downloadFile.1077 - Response Status Code: 200
2015-09-18 10:16:39,558 [main] INFO agent.SecureAgentCmd secureAgent.329 - Finding CN in OMS cert to form UploadURL
2015-09-18 10:17:00,587 [main] ERROR agent.SecureAgentCmd main.260 - Failed to secure the Agent:
2015-09-18 11:11:54,786 [main] ERROR agent.SecureAgentCmd main.260 - Failed to secure the Agent:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:218)
at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:212)
at HTTPClient.HTTPConnection$EstablishConnection$2.run(HTTPConnection.java:4427)
at HTTPClient.HttpClientConfiguration.doAction(HttpClientConfiguration.java:771)
at HTTPClient.HTTPConnection.doAction(HTTPConnection.java:5538)
at HTTPClient.HTTPConnection$EstablishConnection.run(HTTPConnection.java:4413) 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.