#47431 closed defect (bug) (duplicate)
Healthcheck: Misleading Critical Issue when using Localhost servers for development
Reported by: | gecko_guy | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.2 |
Component: | Site Health | Keywords: | site-health |
Focuses: | ui, rest-api | Cc: |
Description
Critical issues report when using a localhost server that does not resolve to a real domain that is publicly accessible.
In both cases below this is not correct.
1: The REST API encountered an error
The REST API request failed due to an error.
Error: [] cURL error 6: Could not resolve host: dev.example.vm
The host resolution issue is not an error. Localhost domains can never resolve to a public nameserver.
2: Your site could not complete a loopback request
The loopback request to your site failed, this means features relying on them are not currently working as expected.
Error: [] cURL error 6: Could not resolve host: dev.example.vm
Loopback requests work fine, there is no error, it's just a localhost domain
Change History (5)
#1
@
5 years ago
- Component changed from General to Administration
- Keywords site-health added; needs-dev-note removed
- Version changed from 5.2.1 to 5.2
#3
follow-up:
↓ 4
@
5 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
I agree with @dd32, so I am going to close this one out. The related tickets I mentioned above expand on the points made by @dd32 a bit more.
If you are aware of why these tests are not passing in your local development environment and that is intended, there is a plugin you can use to turn off certain checks you feel are irrelevant.
#4
in reply to:
↑ 3
@
5 years ago
Replying to desrosj:
I agree with @dd32, so I am going to close this one out. The related tickets I mentioned above expand on the points made by @dd32 a bit more.
If you are aware of why these tests are not passing in your local development environment and that is intended, there is a plugin you can use to turn off certain checks you feel are irrelevant.
Thank you for your input, agree the ticket should be closed.
On further investigation I discovered that the cause of the issue was due to the way in which the development sites were configured inside of Docker.
I'm not sure the fact that it's a localhost server should mean any of the checks should just be skipped. It's a valid error and something that would affect it's "site health" - Cron tasks won't fire, some plugins will cease to operate, and probably a few other things that would be unexpected to many.
Sure, you can choose to ignore some of the checks on localhost if you know they're not an issue - but in this case it would make more sense to ensure that WordPress can resolve it's own domain - which can be done by making your development platform either respect your systems host file, or by adding those domains to the VMs hosts file or DNS resolver.