Open Bug 1963463 Opened 23 days ago Updated 23 days ago

Firefox fails to connect on first attempt but then succeeds subsequently

Categories

(Core :: Networking, defect)

defect

Tracking

()

People

(Reporter: mossop, Unassigned, NeedInfo)

Details

Frequently I will try to load the webpage of a server on my local network. And Firefox will display the error message "Unable to connect. Firefox can’t establish a connection to the server at <server hostname>". Then I click "Try Again" and it will work. It most often fails the first time I try to use it after I haven't used it in a while, and also often after Firefox has restarted making me think something related to caching is going on. I can't really tell whether this is a Firefox bug or a bug with something in my network but I don't see it with Chrome.

I managed to capture this in the profiler with network logging enabled: https://share.firefox.dev/42HWjEt

The page in question I was trying to load was https://radarr.clantownsend.com/

I think this might be an issue with your network.

The log shows that radarr.clantownsend.com only resolves to one address: 10.10.12.200.
The first connection attempt failed with error code 804b000d.

2025-04-26 08:07:27.103899658 UTC - [Parent Process 31147: Socket Thread]: D/nsSocketTransport advancing to STATE_CONNECTING
2025-04-26 08:07:27.103905273 UTC - [Parent Process 31147: Socket Thread]: D/nsSocketTransport trying address: 10.10.12.200
2025-04-26 08:07:27.103943847 UTC - [Parent Process 31147: Socket Thread]: D/nsSocketTransport ErrorAccordingToNSPR [in=-5927 out=804b000d]
2025-04-26 08:07:27.103945312 UTC - [Parent Process 31147: Socket Thread]: D/nsSocketTransport after event [this=333ba4d00 cond=804b000d]

Then, after 10 seconds, a connection to the same address succeeded.

2025-04-26 08:07:36.825165771 UTC - [Parent Process 31147: Socket Thread]: D/nsSocketTransport advancing to STATE_CONNECTING
2025-04-26 08:07:36.825171142 UTC - [Parent Process 31147: Socket Thread]: D/nsSocketTransport trying address: 10.10.12.200
2025-04-26 08:07:36.833198974 UTC - [Parent Process 31147: Socket Thread]: D/nsSocketTransport nsSocketTransport::OnSocketReady [this=30bf5b700 outFlags=2]
2025-04-26 08:07:36.833207275 UTC - [Parent Process 31147: Socket Thread]: D/nsSocketTransport advancing to STATE_TRANSFERRING

It could be interesting to compare Firefox and Chrome using Wireshark. I suspect Chrome retries the request immediately.
Could you try capturing two separate recordings, one for each browser?
Thanks.

Flags: needinfo?(dtownsend)
You need to log in before you can comment on or make changes to this bug.