0

I am on my second attempt to set up a LAMP webserver (https://projects.raspberrypi.org/en/projects/lamp-web-server-with-wordpress/3) on my LAN. The first attempt was successful until I suddenly noticed that the server refused connection to my laptop (Windows 10) - it had previously connected successfully. Eventually in desperation wiped Pi and started again, testing carefully step by step. So, having connected Pi to WiFi (ping from laptop OK), the first step is install Apache2. All well, and Apache2 Debian Default page appears on Pi's browser in response to http://192.168.1.22 (Pi's IP address). As expected.

At this stage my laptop (call it laptop1) is refused connection at that IP address. But checking on a second PC (laptop2 running XP), we connect to the Apache2 Debian Default page as expected. Laptop1, laptop2 and Pi are of course all on the same WiFi.

I have made NO other changes to Pi or to either laptop.

I conclude: The Apache installation is fine. The difficulty lies with laptop1.

Can somebody please suggest how I can track this down on laptop1? Where should I start looking? Is it a setting I have inadvertently changed? Could a dll have got corrupted?

Added later: Apache's access log shows two error codes associated with laptop1. these are 404 (not found) and 408 (Time out- sorry, previously misread 407 Proxy identification required). So why laptop1 not found?

Thanks, John

5
  • Can you ping the server? If you try to connect, does tcpdump show any packets arriving? Do you use a name or an IP address as a destination? What exactly is the meaning of "refused connection"?
    – RalfFriedl
    Commented Aug 30, 2018 at 17:15
  • Thanks Ralf. Yes, I can ping the server. I don't know about tcpdump so will look this up and see what I can do about it. And if I knew what "refused connection" meant I would be well on the way to solving this! The phrase is taken from the message that I get on laptop1's browser. Now I've had the sense to check the Apache access log (see edited question) it looks like I'm getting a timeout or client URL not found - by server, I suppose. So why is the URL of laptop2 found, but not laptop1?
    – user30578
    Commented Aug 30, 2018 at 19:35
  • On the server (Rapsberry), you run tcpdump -n. You may need to add an interface name like tcpdump -n -i eth0 or tcpdump -n -i wlan0. If systemd uses the so called predictable names, use ip l to show the interface names. tcpdump will show the packets sent and received. The two main effects when not connecting are either a wait for some seconds followed by a timeout or an immediate answer the the connection is refused.
    – RalfFriedl
    Commented Aug 30, 2018 at 19:51
  • Oh, and I use IP address as destination.
    – user30578
    Commented Aug 30, 2018 at 20:00
  • Will get into tcpdump as soon as I can ... meanwhile I've established that I can ping laptop1 FROM the server (RPi) e.g. $ ping -c 3 192.168.1.7: 3 packets transmitted, 3 received so I know laptop1 is listening. Though in retrospect I could have deduced that from the ping FROM laptop1 to the server.
    – user30578
    Commented Aug 31, 2018 at 15:55

1 Answer 1

0

The problem disappeared when I cleared cookies from Chrome browser on Laptop1, but I don't understand why. Thank you RalfFriedel for suggesting tcpdump - I've learned a lot by playing with it but it didn't really help diagnosing the problem. The traces from laptop1 (connection refused) were very different from laptop2 (Apache default page displayed correctly). The trace from laptop1 has not changed very much now that it IS connecting OK, so I remain bemused! I'm guessing here (maybe somebody can sort me out) but it seems tcpdump is looking around the Transport/Network layers, while my problem was probably at the Application level?

Anyway, problem gone away. But not solved. John

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .