cancel
Showing results for 
Search instead for 
Did you mean: 

DP Agent: failed to connect to SAP HANA server via JDBC (WebSocket)

MioYasutake
Active Contributor
0 Kudos
3,988

I'm trying to connect my DP Agent to SAP HANA Service on BTP.

I have installed the latest DP Agent (SP06), and configured SAP HANA Connection as follows:

  • Enter Use encrypted JDBC connection: ture
  • Enter Use WebSocket to connect: true
  • Enter WebSocket URL: /service/<service instance id>
  • Enter WebSocket Host: wsproxy.hana.prod.eu-central-1.whitney.dbaas.ondemand.com
  • Enter WebSocket Port: 80
  • Enter Agent Admin HANA User: JDBCUSER
  • Enter HANA User Name for Agent Messaging: AGENTMSG
  • Do you want to create a new SAP HANA user with the specified Agent XS HANA User credentials?: true

After pressing enter, I received below error.

Failed to connect to SAP HANA server via JDBC.2022-01-12 14:42:16,989 [ERROR]  SocketConnector.read  - Failed to connect to server SAP DBTech JDBC: Cannot connect to jdbc:sap://wsproxy.hana.prod.eu-central-1.whitney.dbaas.ondemand.com:80 [Data receive failed [Connection closed].].
2022-01-12 14:42:16,989 [ERROR]  AgentConnection.submitRequest  - Request Failed for ADMIN_SET_CONFIG_PROPERTIES Context: Failed to connect to server SAP DBTech JDBC: Cannot connect to jdbc:sap://wsproxy.hana.prod.eu-central-1.whitney.dbaas.ondemand.com:80 [Data receive failed [Connection closed].].

2022-01-12 14:42:16,990 [ERROR]  AgentConfigTool.connectToHanaServer  - Failed to connect to SAP HANA server.
                                Context: Failed to connect to server SAP DBTech JDBC: Cannot connect to jdbc:sap://wsproxy.hana.prod.eu-central-1.whitney.dbaas.ondemand.com:80 [Data receive failed [Connection closed].].
                                        at com.sap.hana.dp.agentconfig.framework.AgentConnection.submitRequest(AgentConnection.java:160)
                                        at com.sap.hana.dp.agentconfig.framework.AgentConnection.setServerInfo(AgentConnection.java:173)
                                        at com.sap.hana.dp.agentutils.operations.AgentConfigTool.connectToHanaServer(AgentConfigTool.java:2369)
                                        at com.sap.hana.dp.agentutils.operations.AgentConfigTool.connectHanaViaJdbc(AgentConfigTool.java:2030)
                                        at com.sap.hana.dp.agentutils.operations.AgentConfigTool.callOperation(AgentConfigTool.java:391)
                                        at com.sap.hana.dp.agentutils.operations.AgentConfigTool.executeOption(AgentConfigTool.java:715)
                                        at com.sap.hana.dp.agentutils.main.OperationHandler.processCommand(OperationHandler.java:146)
                                        at com.sap.hana.dp.agentutils.main.AgentCmdLine.main(AgentCmdLine.java:66)
Context: Failed to connect to server SAP DBTech JDBC: Cannot connect to jdbc:sap://wsproxy.hana.prod.eu-central-1.whitney.dbaas.ondemand.com:80 [Data receive failed [Connection closed].].

Ensure that the specified hostname and port are valid.<br>

I have created Agent Admin HANA User (JDBCUSER) using below sql script.

CREATE USER JDBCUSER PASSWORD "password";
ALTER USER JDBCUSER DISABLE PASSWORD LIFETIME;

GRANT AGENT ADMIN TO JDBCUSER;
GRANT ADAPTER ADMIN TO JDBCUSER;
GRANT USER ADMIN TO JDBCUSER;

Web Socket URL and host are retrieved from SAP HANA Service Dashboard and should be correct.

Can anybody tell what could be the cause of this error, or what I should check to further investigate this issue?

View Entire Topic
detakeo
Participant

Hi Mio,

From where you have downloaded DP Agent & what's the version.

Also, make sure the IP address from which you are connecting the agent is whitelisted.

Try to telnet and test it from the server where you have installed the DP agent.

Regards

Akash Dev