cancel
Showing results for 
Search instead for 
Did you mean: 

Connection to 127.0.0.1 Failed

Former Member
0 Kudos

Hi,

I just started out with this cloud stuff. Looks nice.

However i get an error on the very first example i try and i cannot deploy the Hello World locally.

The requested URL could not be retrieved


While trying to retrieve the URL: http://localhost:8080/HelloWorld/HelloWorldServlet 

The following error was encountered: 

  • Connection to 127.0.0.1 Failed

The system returned:

    (111) Connection refused

What could be the solution?

Accepted Solutions (1)

Accepted Solutions (1)

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

"Connection refused" is the standard error, if the port is not open. Perhaps the local server started listening on a different port instead of 8080?!

Can you start the local server again, open Taskmanager to get the process ID of the corresponding javaw.exe process and then open a command prompt and type

netstat -oa -proto TCP

You should get a list like

Active Connections

  Proto  Local Address          Foreign Address        State          PID      Offload State

  TCP    0.0.0.0:135            WDFD00281616A:0        LISTENING      952      InHost
  TCP    0.0.0.0:443            WDFD00281616A:0        LISTENING      6664    InHost
  TCP    0.0.0.0:445            WDFD00281616A:0        LISTENING      4        InHost
  TCP    0.0.0.0:912            WDFD00281616A:0        LISTENING      2628    InHost
  TCP    0.0.0.0:1776          WDFD00281616A:0        LISTENING      2564    InHost
  TCP    0.0.0.0:2738          WDFD00281616A:0        LISTENING      2264    InHost
  TCP    0.0.0.0:2869          WDFD00281616A:0        LISTENING      4        InHost
  TCP    0.0.0.0:3389          WDFD00281616A:0        LISTENING      1180    InHost
  TCP    0.0.0.0:5555          WDFD00281616A:0        LISTENING      6664    InHost
  TCP    0.0.0.0:18102          WDFD00281616A:0        LISTENING      1772    InHost
  TCP    0.0.0.0:49152          WDFD00281616A:0        LISTENING      536      InHost
  TCP    0.0.0.0:49153          WDFD00281616A:0        LISTENING      348      InHost
  TCP    0.0.0.0:49154          WDFD00281616A:0        LISTENING      668      InHost
  TCP    0.0.0.0:62462          WDFD00281616A:0        LISTENING      612      InHost
  TCP    0.0.0.0:62471          WDFD00281616A:0        LISTENING      596      InHost
  TCP    0.0.0.0:62479          WDFD00281616A:0        LISTENING      3792    InHost
  TCP    10.18.79.190:139      WDFD00281616A:0        LISTENING      4        InHost
  TCP    10.18.79.190:49820    dewdfwdf03blue4v:sapmsXV2  CLOSE_WAIT      4088 InHost

etc.

In my case the process ID was 6664, so you can see that my server listens on ports 443 and 5555.

Former Member
0 Kudos

Hi

i've re-installed the Eclipse Juno.

at Ullrich: the local server is running. However if i go to taskmanager (ctrl-alt-del) it takes me to taskmanager for my laptop. How can i get the taskmanager for the local server, i.e. the local testserver for SAP Netweaver Cloud?

at Kaloyan: if you have any suggestions on the Tomcat issue, please share.

kr

Robert

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Robert,

the "local server" is not an operating system, so it doesn't have a taskmanager...

The taskmanager of your laptop is the correct one.

The local server is simply a javaw.exe process running on your laptop. (Usually you should see two javaw.exe processes in TM: one for the Eclipse window, and the other one for the "local server". The one with the -XX:+HeapDumpOnOutOfMemoryError in the command line should be the local server. See screenshot.)

Regards, Ulrich

Former Member
0 Kudos

Hi

My process seems to listen to 5 ports: 1717, 8009, 8080, 58502, 58503 all local ports (0.0.0.0)

And 8080 was the port that the local server seems to be having trouble with.

Is there a way i can open this port? Or other actions I can take?

kr

Robert

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

So the server side seems to be fine. Can you connect to the port with telnet?

"telnet localhost 8080"

If that "works" without getting an error like "Connect failed", the problem must be on browser-side (proxy, firewall, whatever). Usually you should see just a black screen, and if you type something like

GET / HTTP/1.0

(press Enter twice)

you should see some HTTP error message from the "local server". E.g. in my case:

C:\Windows\system32> telnet localhost 8080

GET / HTTP/1.0

HTTP/1.1 404 Not Found
Content-Length: 0
Date: Mon, 26 Nov 2012 14:13:08 GMT
Connection: close
Server: SAP

Connection to host lost.

C:\Windows\system32>

If you can't get a connection like this, something is wrong with the OS...

Regards, Ulrich

Former Member
0 Kudos

Hello Ulrich,

I do get a black screen after command telnet localhost 8080, but i cannot type anything.

If I wait like 30 seconds i just get my C:\exampledir\etcetcdir> prompt again.

Seems then something is wrong on OS level as you suggest?

What could it be? and what can i do about it?

Thx

Robert

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

Not necessarily. Some telnet clients don't display the typed characters, if the server does not "echo" them. So the screen remains black, while you type, but the server still receivese the typed characters... Looks really weird, but should not matter much for our test...

So if you type the above "request" blindly without letting you irritate by the strange display behaviour, and then finish it with two <Enter>, do you get something back from the server?

The fact that you don't get any error, is in any case quite promising. The 30s could just be the standard idle timeout.

Regards, Ulrich

Former Member
0 Kudos

Hi Ulrich,

I have once received the reply you suggest after typing GET/HTTP/1.0 <ENTER><ENTER>.

But after that one time i've tried a few more times and now all that happens is this:

I type telnet localhost 8080

Screen goes black

I type (in the blind) GET/HTTP/1.0 and then i <ENTER><ENTER>.

But immediately after my first <ENTER> the C:\> prompt appears again and after the second <ENTER> again.

Then nothing happens anymore.

So even if it looks i'm connected i don't think i really am.

Kr

Robert

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Robert,

but I'm quite sure now there isn't any low level problem with the OS network settings or the local Neo server. (Could be it's only the missing <space> before and after the requested resource ---  GET<space>/<space>HTTP/1.0 --- and the web server silently closes the connection because of invalid HTTP protocol...)

So most probably the browser has a problem here?!? Very strange.

One thing worth trying would be to use the hostname of your laptop instead of "localhost", e.g.

http://donald-duck:8080/HelloWorld/HelloWorldServlet

Or you could try a non-browser HTTP client like wfetch (see http://support.microsoft.com/default.aspx?scid=kb;en-us;284285 Here you can find a short description of wfetch and a download link. It's a simple executable, no installation necessary.) If telnet is able to open a connection to port 8080, I expect wfetch can do it as well, and then you can exchange real requests/responses with the local server and test whether it works in principle.

(However, that would not yet explain, why your browser can't open a connection... :-))

Regards, Ulrich

Edit: you can use the wfetch 1.2 version even on Windows 7. No need to install the complete IIS toolkit... 🙂

Former Member
0 Kudos

Hi

This morning i logged in and first thing i did was to open Netweaver IDE and started the local server, and ran the helloworld again.

To my surprise the local browser opened up and said: Hello World.

So now I'm happy off course that it works, and not happy because it didnt work for 3 days and now without doing anything it just works.

Thx to you, Ulrich, and to you, Kaloyan, for all your thoughts on this.

No doubt i'll be back with other questions regarding the cloud, but for now i'll be happy.

Kr

Robert

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

Perhaps the problem simply got afraid, when we started threatening it with big guns like netstat and wfetch...

Have fun now! Ulrich

harald_mueller
Participant
0 Kudos

Did you have connectivity to any network today?

Sometimes there are issues if there is no network at all or hibernate issues with laptops.

Harald

Answers (1)

Answers (1)

Former Member
0 Kudos

Is there any firewall running on your system? If yes, could you stop it and try again?

Former Member
0 Kudos

Hi,

Thx for answer.

I turned off Symantec Endpoint Protection (Antivirus // Threat // Network threat) completely, but i still get the same failure.

I have looked back at all the steps i did when configuring, but i cannot find any obvious mistakes.

Any more suggestions are welcome.

Thx,

Robert

Former Member
0 Kudos

How about the proxy settings in your web browser? Google found this forum topic: http://seleniumforum.forumotion.net/t410-the-requested-url-could-not-be-retrieved-connection-to-1270...

Could you check that "bypass proxy server for local addresses" setting?

Former Member
0 Kudos

Hi

Thx again.

My LAN settings were set to automatic detect.

So there is no proxy involved in my opinion.

Still no results.

Kr

Robert

Former Member
0 Kudos

Do you have the same issue with other app servers running on localhost, e.g. Apache Tomcat?

Former Member
0 Kudos

Hi Kaloyan,

I have no other app servers running.

Kr

Robert

Former Member
0 Kudos

Hi Robert,

My point was to try with another app server and check if you have the same issue. The easiest is to try with Apache Tomcat. If you have the same issue then you should look deeper in the network configuration of your system. If it is OK with Apache Tomcat then we should look in another direction.

Greetings,

Kaloyan

Former Member
0 Kudos

Hi Kaloyan,

Thx for your patience.

The thing is: i'm not familiar with Tomcat at all. I've looked it up at apache.org. I could probably download one version and install it. But can you give me an idea of what to do with it so i can verify if my problem with eclipse needs solving from one direction or the other?

Kr

Robert

Former Member
0 Kudos

Hi Robert,

You can just download the latest version of Apache Tomcat: http://tomcat.apache.org/download-70.cgi#7.0.33. Then install it and start it. Make sure you have stopped the Local Test Server for SAP NetWeaver Cloud to avoid port collision.

Then just open http://localhost:8080 in the same browser you are trying to access the Local Test Server for SAP NetWeaver Cloud. Usually, you should see some colorful default page of Apache Tomcat. I wonder if this will work for you, or you will get the same "Connection refused" error.

Greetings,

Kaloyan

Former Member
0 Kudos

Hi,

This is getting a bit complicated

1) i downloaded as suggested but i  wont start. If i double click tomcat7.exe it flashes up and is gone again. I tried to open with cmd but get errors:

*system cannot find the registry key for service 'tomcat'

* load configuration failed

* Commons Deamon procrun failed with exit value 2

2) I'm reinstalling the eclipse juno right now

the one thing i'm not sure about is regarding the network connections, which may well be the issue i have: in the installation manual it says to do a manual configuration for http and https connections. What exactly should i enter there?

Kr

Robert

Former Member
0 Kudos

the one thing i'm not sure about is regarding the network connections, which may well be the issue i have: in the installation manual it says to do a manual configuration for http and https connections. What exactly should i enter there?

This is only necessary if you access the Internet though a proxy. Then you should enter the host and port of your proxy server. If you access the Internet directly, then the "Active Provider" in this preferences page should be set to "Direct".