cancel
Showing results for 
Search instead for 
Did you mean: 

NoRouteToHostException

Former Member
0 Kudos

Hi,

I hope somebody of you can help me with my problem.

I want to connect to an external webservice from an ejb (via http).

But now I get a NoRouteToHostException. Can someone tell me whats might be wrong.

Are there any configurations at the j2ee which I must do?

Where can I do the proxy settings for the j2ee engine?

Thanks

Uli

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

check with your firewall guy if there are any restrictions on the ports, maybe they have blocked certain ports or port ranges for a part of the network, the sending or receiving machine.

Do you try to connect by IP address or host name ? Host name resolution could be a problem, too. We had some issues with host names within a domain, strange thing, finally we used IP addresses.

I would bet on firewall problems even if the firewall team says everything is fine

Regards, Astrid

Former Member
0 Kudos

My firewall boy says the is a whole for me in the firewall and it must work.

But I think another reason can be also the proxy settings.

My admin says on the j2ee engine the proxy settings are set, but it does not activate them, also when you restart it.

Can you help me with this issue?

Maybe this might be the solution.

Thanks

Uli

Former Member
0 Kudos

If you DO NEED to setup a proxy in your java application, you can use:

System.getProperties().put( "proxySet", "true" );

System.getProperties().put( "proxyHost", "myProxyMachineName" );

System.getProperties().put( "proxyPort", "85" );

and then when you connect with your ejb, if you need authetication see:

URLConnection connection = url.openConnection();

String password = "username:password";

String encodedPassword = base64Encode( password );

connection.setRequestProperty( "Proxy-Authorization", encodedPassword );

I think in the SAP WEBAS you can also define a proxy in the settings, I've seen it somewhere either in visual administrator or config tool .

roberto_tagliento
Active Contributor
0 Kudos

Probably is a problem of your LAN configuration.

NAT, firewall and something else.

http://help.sap.com/saphelp_nw04s/helpdata/en/43/2234ee0b413fe1e10000000a11466f/frameset.htm

/people/prakash.darji/blog/2006/10/10/external-web-service-proxy-configuration-for-visual-composer

Message was edited by:

Roberto Tagliento

Former Member
0 Kudos

The firewall is no problem, there I can go through.

Thanks for the links, but they are both for the portal, and I need something about the Application Server. Because i am using an ejb which is deployed on the apllication server.

Do you know anything about?

Thanks

Uli

roberto_tagliento
Active Contributor
0 Kudos

Setting from Visual Administrator must have effect on Application Server, the platform Netweaver is the same of portal.

Former Member
0 Kudos

No route to Host is quite clear.

Speak with your network administrators...

Currently your network does not know how to route your message so that it can reach the host.

This might be a DNS problem or just plain simple a missing/bad entry in the routing table.

Enjoy

Former Member
0 Kudos

I spoke with my network administrator,

he said the routs are okay, because the address is reachable within a browser.

Any more ideas?

Former Member
0 Kudos

Go to the box where the ejb is running (app server), and from there open a browser and try to access your external web service using the url you use in your ejb and see if you get a result.

If you don't have a browser on the box, start a shell and do a "ping externalserver 80" and see if it succeeds.

The ejb cannot connect to the externalservice obviously

Most likely is:

1) there is a firewall in between blocking the access

2) it is very possible, the app server dns cannot resolve the externalserver name to an IP, you can test that by using the ip in the browser/ping test. if it's the case you will have to ask your system admin to add an entry for the external webservice server.

Your network admin should definitely be able to help with this issue, but as a network admin he probably rather ignore you

Former Member
0 Kudos

When I try to access the WebService via browser it works fine. The ping doesn´t work, but when I use telnet it works again.

My network admin tries to help me by hard, but we both could´nt explain us the scenario and how we will get it working.

Are there any more ideas?

Thanks

roberto_tagliento
Active Contributor
0 Kudos

You are developing on your local machine, or you deploy it to a specific server?

If is the second tried to access to the WebService via browser from server (terminal service, VNC)??

Former Member
0 Kudos

I´m deploying to a specific server.

And to access the WebService from the browser of the server works fine.

Former Member
0 Kudos

> I spoke with my network administrator,

> he said the routs are okay, because the address is

> reachable within a browser.

>

> Any more ideas?

This means nothing. The address needs to be reachable not from within "A" browser but from the host that is making the call. You may have a firewall that lets the calls through from host A but not from host B. So if your browser is running on A success. If it is running on B -> failure....

You may have a proxy defined for the browser but not use it in direct calls from your server ... etc...