There was an error contacting 'localhost'

After installing the express platform in my laptop, and when trying to 1-click publishing with an example from the tutorial (or some test), I try to use the password admin in the Select Server window but the window communication error above appears.

I had the same problem in my workstation at office but when I reinstalled the platform the problem gone away. In the laptop, I’ve tried to reinstall the platform and SQL Server twice, but the problem remains.

What’s wrong?
- Can you access service center at http://localhost/servicecenter/ ? Can you login using admin/admin?


- Can you check if OutSystems services are running?

Everything ok.
I've changed the old password to a new one, it accepted the change, but the same message apears when trying the process described in first post...
According to a collegue advice, I've clean up the cookies end set the internet security level to the lowest I could. Nothing.
What OS do you have on your laptop?

Can you do an 1-click publish if you use '' instead of 'localhost'?
OS: Windows XP SP2

No sucess with '', same error.
Hi Ricardo

Do you have any anti virus or firewall software suite installed in your computer?

We've seen anti virus blocking HTTP access from applications other then Web Browsers and some system services. Mcaffe was one of them.

Additionally, use the telnet command to confirm you have localhost connectivity, other than through a browser, by using the command: telnet localhost 80 from a command prompt window. If connection is established successfully, the command prompt should get all wipe clean. If not, an error should be dumped.

Another thing you can check is if you have a http proxy configured in the Internet Explorer Options. Access your Internet Explorer application, get to the Options dialog (Tools -> Internet Options) and in the Connections tab press the LAN Settings button. In the next dialog there should be some options. Which ones are checked and which ones are not? Try to uncheck every option and restart the Service Studio again.


I had a similar problem here. The solution was to clean the configurations of proxy.

Thank You Miguel João
I get this error every time I try to connect to meu local server:

There was an error contacting 'localhost':
Connection time out.

I'm using Windows Vista!
Need help!!

Ricardo, can you try changing from "localhost" to and tell us if that solves the problem?

Thank you.
It's the same thing but I got it resolved by changing the hosts file!

::1 localhost

and left only: localhost

It work, thanks
I have the same problem but I can´t find the hosts file. Can tell me where it is located?
Hi José,

It should be located in C:\WINDOWS\system32\drivers\etc\
Hi Guys

Since yesterday I am experiencing the same issue. I was having problems with connecting to the work's wifi network for smatphones with my notebook (seems like they disable it somehow) and was fiddling around with settings but the only thing that I can remember changing with configurations setting was the command netsh winsock reset. Now today I cannot connect to my localhost anymore with Outsystems. I have tried disbaling firewalls, using and removing the "::1 localhost" from the host file. Any idea of what I can do to help this. I do not want to reinstall the platform (on version 8 anyway) for fear of losing my work.

:/ Thats a pretty dangerous command, you shouldn't write thing like that on an open forum...other people may think of trying to use it...I had to use it once and was a pain to get everything to work again, lots of reinstalling.

You should have to lines in hosts file: localhost
::1 localhost

Open a command line and write "ping localhost" and "ping" they both need to respond with similar results.

Then restart your computer if you didn't in the meanwhile.

Open your services window (services.msc) and make sure SQL Server, World wide web publishing service and all 5 outsystems services are started. Start them if they are stopped.
(not sure about the www service name, not on my pc atm)

Try to access on your browser to http://localhost/ServiceCenter/
What result do you get? If an error can you post some screenshot?

João Rosado

Hi João
Still no luck :-(, see the screen prints:


You misstyped the url. It's http://localhost/ServiceCenter/

And since the localhost is resolving to ::1, try also
João Rosado

Hi João
Thats just how it gets resolved (see last screen print) but I typed http://localhost/ServiceCenter/ (second last screen print) you can also see it in the tab name. I've tried and and none of them work?


..seaching in google for the url that shows on the tab on your screeshot says that searchnu is a virus.
Maybe thats the start of your problems
Hi João

I have noticed that for a week or so  now and haven't bothered to remove it yet. Will try and do so tonight but don't think it will help (virus basically redirects your homepage & monitors activity - think it came from using utorrent - but perhaps it could open the computer up to other viruses / damage- so can't say for sure) as I have this can't find local host issue since trying to fix my wifi problem yesterday. Will let you know the results.

Hi João
Just some feedback ... I have got it working again. The virus was removed but that was not the issue, basically it was the first thing I looked at on the internet before starting this discussion which was the configuration of my
C:\WINDOWS\system32\drivers\etc\hosts files where the definition of
#       localhost
was commented out, including the feedback loop, and being the dumbass I was I didn't see it was commented out and even tried removing and adding the whole line to obvious no avail. Anyway its working now but why it suddenly stopped working I have no idea?? I presume it must be something to do the configuration of my DNS that was changed with me fiddling around with wifi settings or resetting winsock or something??