OIC – Agent Log
I was trying with different ICS instances, as the free instance is valid only for 30days, my assumption was the same agent will work for all the OIC instances , but no.. just changing the URL and User Credentials will not work.
You will get the below issues, if you trying to use the OIC agent jar of one instance with the other 🙂 OI
Solution is download the OIC agent specific to your OIC instance and update the details , sample is as shown below :
# Required Parameters
# oic_URL format should be https://hostname:sslPort
oic_URL=https://ics-sreeramocloud3.integration.ocp.oraclecloud.com:443
agent_GROUP_IDENTIFIER=TEST
# Proxy Parameters
proxy_HOST=
proxy_PORT=
proxy_USER=
proxy_PASSWORD=
proxy_NON_PROXY_HOSTS=
[2019-11-07T03:20:13.166Z] [INFO] [ThreadID: 12] [Logger: oracle.cloud.cpi.agent.CpiBootstrapLoader] [SRC Class: oracle.cloud.cpi.agent.CpiBootstrapLoader; Method: startAgent] ClassLoader instance before switching to Thread-Context – sun.misc.Launcher$AppClassLoader@5c647e05
[2019-11-07T03:20:13.269Z] [INFO] [ThreadID: 12] [Logger: oracle.cloud.cpi.agent.CpiBootstrapLoader] [SRC Class: oracle.cloud.cpi.agent.CpiBootstrapLoader; Method: startAgent] Switched ClassLoader instance – oracle.cloud.cpi.agent.AgentClassLoader@7e2b7589
[2019-11-07T03:20:13.273Z] [INFO] [ThreadID: 12] [Logger: oracle.cloud.cpi.agent.CpiAgentLoader] [SRC Class: oracle.cloud.cpi.agent.CpiAgentLoader; Method: createAgentModuleLoader] ClassLoader instance – oracle.cloud.cpi.agent.AgentClassLoader@7e2b7589
[2019-11-07T03:20:13.273Z] [INFO] [ThreadID: 12] [Logger: oracle.cloud.cpi.agent.CpiAgentLoader] [SRC Class: oracle.cloud.cpi.agent.CpiAgentLoader; Method: createAgentModuleLoader] Setting parent as Thread-Context ClassLoader instance – oracle.cloud.cpi.agent.AgentClassLoader@7e2b7589
[2019-11-07T03:20:13.293Z] [INFO] [ThreadID: 12] [Logger: oracle.cloud.cpi.agent.CpiAgentLoader] [SRC Class: oracle.cloud.cpi.agent.CpiAgentLoader; Method: startAgent] Switched ClassLoader instance – oracle.cloud.cpi.agent.AgentURLClassLoader@75566b36
[2019-11-07T03:20:24.988Z] [INFO] [ThreadID: 12] [Logger: oracle.cloud.cpi.agent.ProxyCpiAgentLoader] [SRC Class: oracle.cloud.cpi.agent.ProxyCpiAgentLoader; Method: initialize] Checking for already running instances of this agent. This might take up to 15 seconds …
[2019-11-07T03:20:33.079Z] [SEVERE] [ThreadID: 12] [Logger: oracle.cloud.cpi.agent.ProxyCpiAgentLoader] [SRC Class: oracle.cloud.cpi.agent.ProxyCpiAgentLoader; Method: initialize] Agent Startup Failed javax.ws.rs.NotAuthorizedException: HTTP 401 Unauthorized
at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1080)
at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:883)
at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$1(JerseyInvocation.java:767)
at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
at org.glassfish.jersey.internal.Errors.process(Errors.java:229)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:414)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:765)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:428)
at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:324)
at oracle.cloud.cpi.agent.util.CpiUtils.checkIfAlreadyRunning(CpiUtils.java:977)
at oracle.cloud.cpi.agent.ProxyCpiAgentLoader.initialize(ProxyCpiAgentLoader.java:85)
at oracle.cloud.cpi.agent.ProxyCpiAgentLoader.runAgent(ProxyCpiAgentLoader.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at oracle.cloud.cpi.agent.CpiAgentLoader.startAgent(CpiAgentLoader.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at oracle.cloud.cpi.agent.CpiBootstrapLoader.startAgent(CpiBootstrapLoader.java:183)
at oracle.cloud.cpi.agent.AgentStartCommandTask.run(CpiBootstrapLoader.java:426)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[2019-11-07T03:20:33.082Z] [SEVERE] [ThreadID: 12] [Logger: oracle.cloud.cpi.agent.AgentStartCommandTask] [SRC Class: oracle.cloud.cpi.agent.AgentStartCommandTask; Method: run] Error during agent install/startup or while re-starting agent after upgrade due to null
[2019-11-07T03:20:33.083Z] [SEVERE] [ThreadID: 1] [Logger: oracle.cloud.cpi.agent.CpiBootstrapLoader] [SRC Class: oracle.cloud.cpi.agent.CpiBootstrapLoader; Method: main] Error encountered !!! java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at oracle.cloud.cpi.agent.AgentStartCommandTask.run(CpiBootstrapLoader.java:438)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at oracle.cloud.cpi.agent.CpiBootstrapLoader.startAgent(CpiBootstrapLoader.java:183)
at oracle.cloud.cpi.agent.AgentStartCommandTask.run(CpiBootstrapLoader.java:426)
… 7 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at oracle.cloud.cpi.agent.CpiAgentLoader.startAgent(CpiAgentLoader.java:27)
… 13 more
Caused by: java.lang.RuntimeException: Agent Startup Failed – HTTP 401 Unauthorized
at oracle.cloud.cpi.agent.ProxyCpiAgentLoader.initialize(ProxyCpiAgentLoader.java:111)
at oracle.cloud.cpi.agent.ProxyCpiAgentLoader.runAgent(ProxyCpiAgentLoader.java:39)
… 18 more