Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hi all I'm trying to access a database that is hosted in a laptop "database_server" from my android device which is both connected to the same network.

The project is running at www.database_server:8000/

I've entered the ip: 192.168.1.1 (of my laptop connection) to my phone browser and I was able to see the root folder of my project. However when I attempted to run it at 192.168.1.1:8000/ , I was not able to access anything and the web browser returned "Webpage not available".

So the issue now is that I can access the root folder using my android device but I cannot access port 8000 of my laptop. Is there anyway I can solve it ? Thanks !

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Have you verified that you can actually connect to port 8000 from the localhost? On the machine it's hosted on, can you open the web page on http://:8000?

If that works, then you verified that the service is actually running and it's not an issue with the Android device or the connection between the two. You can use a port scanner or netstat to verify on that machine (localhost) that the port is being monitored by a process.

Once you have verified that, check from another device with a port scanner that the port is accessible remotely. That would tell you if the port is inaccessible due to a firewall or some kind of access control that is not allowing remote connections.

Once you've narrowed down where the connection issue is actually coming from you can troubleshoot how to fix it.

share|improve this answer
    
Hi Bart, on my mac (which the project is developed in) , i can access using localhost:8000. I've did a netstat -an and the results returned a | tcp4 , 0 , 0 , 127.0.0.1.8000 , . , LISTEN | . I was thinking I should be able to access the project in mac using another device just by using the ip of the mac (within the same network as the device) at 192.168.1.1:8000 but it does not return a result (even though 192.168.1.1 works - which has indicated i've connected to the mac right) ? –  jamen Jul 9 '11 at 13:39
    
If the IP of the notebook is 192.168.1.1, then yes. Double check you have that IP (I don't know what web page it's serving). Next use another device (computer, or your Android if it has that application) and do a port scan against that IP address to see if port 8000 is open. The other possibility is that you're only binding your application to localhost, which is 127.0.0.1 port 8000 in this case. –  Bart Silverstrim Jul 9 '11 at 13:42
    
You'll need to make sure your application/web server is bound to your network connection at address 192.168.1.1, not just localhost, which is a network term for the loopback 127.0.0.1 (itself, and only itself.) –  Bart Silverstrim Jul 9 '11 at 13:43
    
After that, if the app/server is bound to the correct IP address, you would need to see if there's something restricting access to only certain ports/addresses. –  Bart Silverstrim Jul 9 '11 at 13:44
    
Hi Bart thanks for your tips ! I did a portscan using my device and it doesn't show port 8000 as open , how may i open the port 8000 then ? Further more , how can i check and configure the application to bind to more than localhost and to more ip addresses ? –  jamen Jul 9 '11 at 13:55

You might check to ensure port 8000 is not being blocked by any firewall configurations at the server/laptop.

share|improve this answer
    
Hello ! Yea because I'm trying to access the localhost in a macbookpro which I've checked it doesnt have firewall activated. Any other way it may work or is missing ? –  jamen Jul 9 '11 at 13:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.