NetBeans 8.0.2 cannot connect to server error using LAMP VM VirtualBox

732 Views Asked by At

I'm using the LAMP Stack of Turnkey in a Oracle VM Virtual Box to develop a PHP project using NetBeans IDE.

When I set up the run configuration in NetBeans i select RunAs: Remote WebSite (FTP, SFTP) and then in remote connection I click Manage button.

When I put the IP of my VM in host name and click "test connection" i see the error:

Cannot connect to server Cause: java.net.ConnectionException: Connection refused: connect

It's pretty clear that I make some mistake when setting up the VM or something similar.

What I've done but didn't work:

  1. Change my VM Network configuration adapter to Bridged Adapter.
  2. Set up a static ip of my VM based on my wi-fi network connection details.

Also, I don't know why but when I write my IP in the browser (http://192.168.1.39) it should show me the turnkey control panel but it doesn't.

Any suggestions?

Thanks!

1

There are 1 best solutions below

0
Mario On

I made the mistake to assign my VM the same IP of my computer. When I realize that I select dhcp so my VM select an IP in the same range of my computer IP.

It failed at first, saying that it couldn't find an IP. But when I tried again it worked.

Now I see the turnkey panel in my browser and the "test connection" doesn't show me an error anymore.