SAP Knowledge Base Article - Preview

2616195 - Diagnostics Agent doesn't connect to the SAP Solution Manager - MalformedURLException

Symptom

The Diagnostics Agent fails to connect to the SAP Solution Manager with the following errors:

  • <System Time> [Thread[Connector,5,main] ] Error Connecting to SMD server p4://”sapms://<FQDN>”:”<port>” failed - error counter: 19

[EXCEPTION]javax.naming.NamingException: Exception while trying to get InitialContext. [Root exception is java.net.MalformedURLException: Invalid authority field: [”sapms:]at com.sap.engine.services.jndi.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:386)at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)at javax.naming.InitialContext.init(InitialContext.java:223)at javax.naming.InitialContext.init(InitialContext.java:197)at com.sap.smd.agent.connection.SMDConnectionTask.getNewSMDInitialContext(SMDConnectionTask.java:367)at com.sap.smd.agent.connection.SMDConnectionTask.getTransientInitialContext(SMDConnectionTask.java:908)at com.sap.smd.agent.connection.SMDConnectionTask.internalAttemptConnection(SMDConnectionTask.java:520)

  • <System Time> [Thread[Connector,5,main] ] Error Connecting to SMD server p4://sapms//<FQDN>:<PORT> failed - error counter: 129

[EXCEPTION]
javax.naming.NamingException: Exception while trying to get InitialContext. [Root exception is java.net.MalformedURLException: p4://sapms//<FQDN>:<PORT> : no port is specified in the URL and the service does not have a default port]
at com.sap.engine.services.jndi.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:386)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:694)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
at javax.naming.InitialContext.init(InitialContext.java:244)
at javax.naming.InitialContext.<init>(InitialContext.java:216)
at com.sap.smd.agent.connection.SMDConnectionTask.getNewSMDInitialContext(SMDConnectionTask.java:174)
at com.sap.smd.agent.connection.SMDConnectionTask.getTransientInitialContext(SMDConnectionTask.java:607)
at com.sap.smd.agent.connection.SMDConnectionTask.internalAttemptConnection(SMDConnectionTask.java:274)
at com.sap.smd.agent.connection.SMDConnectionTask.access$000(SMDConnectionTask.java:50)
at com.sap.smd.agent.connection.SMDConnectionTask$1.run(SMDConnectionTask.java:90)
at com.sap.smd.agent.connection.P4JNDIContextHelper.executeInSecurityContext(P4JNDIContextHelper.java:141)
at com.sap.smd.agent.connection.SMDConnectionTask.attemptConnection(SMDConnectionTask.java:85)
at com.sap.smd.agent.connection.SMDConnectionTask.run(SMDConnectionTask.java:889)
at java.lang.Thread.run(Thread.java:838)
Caused by: java.net.MalformedURLException: p4://sapms//<FQDN>:<PORT> : no port is specified in the URL and the service does not have a default port
at com.sap.engine.interfaces.cross.CrossObjectBroker.getDestination(CrossObjectBroker.java:212)
at com.sap.engine.services.jndi.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:293)
... 13 more

In the runtime.properties file, property smd.agent.connection.url will be interpreted and set incorrectly, like below:

  • smd.agent.connection.url=p4\://sapms\:\\\\<host.domain.com>\:<port>

  • smd.agent.connection.url=p4\://sapms//<host.domain>\:<port>


Read more...

Environment

  • SAP Solution Manager 7.1
  • SAP Solution Manager 7.2

Product

SAP Solution Manager 7.1 ; SAP Solution Manager 7.2

Keywords

Typo, correct, smd connection command, diagnostics Agent , KBA , SV-SMG-DIA-SRV-AGT , Agent Framework , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.