cancel
Showing results for 
Search instead for 
Did you mean: 

'Configure Diagnostics' tries to reach P4-Port of wrong hostname (phys.)...

Former Member
0 Kudos

Hi,

when i execute 'Configure Diagnostics' in the managed systems setup,

i get the following error:

Failed to connect, P4 port=50904 User=j2ee_admin SID=PEP Instance Number=09
Connection error to SAP System sid [PEP/null], more details about the error in agent 'jipep09' log file (SMDAgentApplication.X.log).; nested exception is: 
com.sap.engine.interfaces.cross.DestinationException: Cannot establish connection with any of the available instances: 
affha116:50904 Reason: com.sap.engine.services.rmi_p4.P4IOException: Cannot open connection on host: 126.12.38.116 and port: 50904(cause=com.sap.engine.interfaces.cross.DestinationException Cannot establish connection with any of the available instances: 
affha116:50904 Reason: com.sap.engine.services.rmi_p4.P4IOException: Cannot open connection on host: 126.12.38.116 and port: 50904)

The SM tries to reach the physical host, but there is the p4-port locked...

From where does the SM gets this hostname ? It must connect to the virtual host...

In SMSY the virtual host is configured, and the manual added values in the 'Configure Diagnostics' are from the virtual host.

kind regards

Christoph

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hello.

Just to share my experience with this error message. In my case, the problem was not in the P4 port but in the Java Connect Parameters in the setup wizard. I had to enter the SCS instance server name and its message server port to make the setup working. I had the SCS instance running on different physical host then the Java AS.

Hopefully this helps to anyone.

jon_friesen2
Active Participant
0 Kudos

Hi Christoph,

If you want to make the connection using the message server HTTP port, I don't think there is a solution to the problem.  The SolMan's J2EE message server will reply to the agent with the P4 connection information for a specific app server (e.g. load balancing across several J2EE instances on your SolMan if you have them), and then the agent will attempt to connect to the instance using the P4 protocol.  

If it's just a name resolution issue, and you really want the agent to connect to an instance using a virtual hostname, then Purnachand's suggested workaround to connect directly to the P4 port (rather than to the message server) should have worked.  You should run smdsetup and provide the virtual hostname and the P4 port.  The connection will not be load-balanced -- the agent will always connect to the instance corresponding to the virtual hostname. This technique requires avoiding the automated connection wizard and using the smdsetup script exclusively (since the automated connection wizard does not yet support direct P4 connections last time I checked).

You also say "there is the p4-port locked" --- if you mean, firewalls prevent P4 connections regardless of the hostname (physical or virtual), you will need to take a different approach.  Your best bet would be to tunnel your diagnostics agents through a saprouter.  In this case the agents would connect to the saprouter on port 3299, and the saprouter would complete the p4 connection to the physical instance.  As far as I know this is the only supported way for diagnostics agents to traverse a firewall.

I hope this helps and good luck!

Former Member
0 Kudos

Still the same problem...

I have found the following entry in the SMDSystem.0.log:

Apr 26, 2012 2:22:16 PM [Thread[main,5,main]] Info       InetAddress Resolving for 'jipep09' - FQN: jipep09 SQN: jipep09 IP: xxx.xxx.240.158

Apr 26, 2012 2:22:16 PM [Thread[main,5,main]] Info       InetAddress Resolving for localhost - FQN: affha116 SQN: affha116 IP: xxx.xxx.38.116

Looks like the Agent knows the physical adress...

The problem is, that the diagnostics-wizard don't try the virtual adress...

It tries the physical adress directly...

Does the SM remember a failed connection and avert the adress ?

kind regards

Christoph

Former Member
0 Kudos

No more suggestions ?

kind regards

Christoph

satishra
Product and Topic Expert
Product and Topic Expert
0 Kudos

check if this note helps you

1711920 - P4 connection to ICM fails


Former Member
0 Kudos

Hello,

Same problem here, does anybody has some kind of clue?

Kind regards,

Glenn

Former Member
0 Kudos

Unfortunately i have no answer from SAP since 22.02. in my opened ticket

Very annoying...

Maybe someone can help me here....!?

The Wizard still tries to reach the physical host, and i still don't know from where the wizard gets this value...

Vivek_Hegde
Active Contributor
0 Kudos

Hi,

Are the hostname in Agent Administration page are correct for your system?

Server Name and Hostname? Are they showing virtual here?

Rgds

Vivek

Former Member
0 Kudos

hi,

where did you installed SMD agent in Managed system in virtual host?? what is the host name you have given while installing smd agent? it is taking the hostname while installation

as said above you can edit the script by command prompt. try again the same,

if that not helps, what about SLD, do you registered host name in sld, check that.

do check this diagnositics setup -> managed systems ->setup wizard ->parameters

Thanks

Jansi

Former Member
0 Kudos

Yes...both are shown with the virtual value...

kind regards

Christoph

Former Member
0 Kudos

In the sapinst i give the virtual hostname...

Which script do you mean to edit ?

In the SLD the agent is stored with virtual hostname too...

Parameters in the setup wizard are virtual:

In the profile of the agent, the virtual hostname is given too...

It's confusing....I can't find the reason why i get the physical hostname here...

We have installed and configured more than 100 agents without problem...

This agent is the only one that makes this problem.....

nicholas_chang
Active Contributor
0 Kudos

That's weird... how about give it a try by install the agent specifing the virtual hostname via below command:

sapinst SAPINST_USE_HOSTNAME =

Let us know how it goes,

Cheers,

Nicholas Chang

Former Member
0 Kudos

and addition, please check your scs instance profile in the path

number: /usr/sap/<DASID>/SCS<xx> what is the hostname and p4 port is defined there

you can change this by Connection by P4 port:

smdsetup.sh managingconf hostname:"solman.full.qual.host.name” port:"5004" user:"SMD_ADMIN" pwd:"XXXXXXXX"

read the steps below before proceed http://wiki.sdn.sap.com/wiki/display/SMSETUP/Diagnostics+Agents

Thanks

Jansi

Former Member
0 Kudos

I've made a new installation of the agent now. (all virtualized)

Still same problem.

Former Member
0 Kudos

Hi Jansi,

there is no SCS in the Agent-Path...

I've made the smdsetup severall times since the problem occours....No change...

I will check the hostname resolution of the system now...Maybe there is a missconfiguration...(wrong response !?)

I've no further idea....

Former Member
0 Kudos

From where does the SM gets this hostname ? It must connect to the virtual host...

/usr/sap/<SID>/<System number>/SMDAgent/configuration/runtime.properties

Regards

Purna

Former Member
0 Kudos

The values in the runtime.properties are correct (all virtual)...

I see the Agent in the Agent-Administration and i can choose it to be used with the managed system...

The error appears after that (in the automatic steps)...

Former Member
0 Kudos

Is smdsetup.sh sucessful?

Regards

Purna

Former Member
0 Kudos

yes

Former Member
0 Kudos

No suggestions anymore....?

Edited by: Christoph Bastian on Feb 22, 2012 10:55 AM

Former Member
0 Kudos

Hi,

Please use below command to update the correct solution manager details

as <smdagent sid> adm

go to folder

/usr/sap/<SID>/<Instnace number>/script

run command

smdsetup.sh managingconf hostname:"<fqn>" port:"<p4 port>" [optional user:"<value>" pwd:"<value>"

Regards

Purna