DevKinsta: This site can’t be reached

2020 Mac M1 - Sonoma 14.3.1
Docker (4.27.2) and DevKinsta (2.13.1) are the latest versions

Some background - Around 3 months ago I added a new docker container for a separate codebase. During the setup, I followed installation instructions which required the installation of ASDF and I think during this setup, some files got moved around (I think where php versions are stored?) and some settings were changed.

It’s possible that this new container did not cause the DevKinsta error, and that I only noticed the DevKinsta error after setting up this other repo (since I don’t check DevKinsta app frequently, as long as the local sites are working)

After this other docker container was setup, I noticed my DevKinsta was giving me the
DK0006 error while DevKinsta was trying to start up. However, the docker containers were working fine to spin up the local wordpress sites (all of mysites.local were working just fine) as long as I turned off the other docker container (for the non-wordpress site - I believe there was some issue about the DevKinsta sites and the other docker container trying to share the same port).

So I had some time today to try and figure out the DevKinsta error, and followed quite a few other threads. I noticed the docker.sock file was gone, so I followed the recommendation of:

sudo ln -s "$HOME/.docker/run/docker.sock" /var/run/docker.sock

Which allowed DevKinsta to finally load and bypass the DK0006 error. However, now my local sites are not working - site.local and site.local:49533/ are all broken. So by fixing DevKinsta, I’ve somehow messed up the Docker/DNS/port configs or something (I’m really not sure)

From another thread’s suggestion, I ran

sudo killall -HUP mDNSResponder

to refresh the DNS cache

I tested a new site w/ “Add site” → “New WordPress site” - and the new site works. But all existing sites are still not working

In main.log I have the following error that I think is about SSL:

[2024-02-26 14:59:26.694] [info]  [checkWpVersion] site's current version 6.4.3
[2024-02-26 14:59:26.694] [info]  [checkWpVersion] site's stored version 6.4.3
[2024-02-26 14:59:26.694] [info]  [checkWpVersion] containerExec response test true
[2024-02-26 14:59:29.780] [error] create thumbnail error: Error: write EPROTO 4813368224:error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:../../third_party/boringssl/src/ssl/

I’ve tried the suggestions recommended in this thread
and did a wp search-replace:

wp search-replace 'https://ascentfunding.local:49828' 'https://ascentfunding.local'

which made 14509 replacements

Still my site does not work

I have checked Docker Settings and “Allow the default Docker socket to be used” is checked

This is starting to get ridiculous and I’m wondering if I’m creating more issues. . .

Hi @rpearson

I am sorry to hear you’re facing such issues. I suggest checking the following steps to resolve it:

  1. If the website should load without a custom port, please ensure that the “Auto Detect” port option in DevKinsta is unchecked and the default ports 80 and 443 are set respectively.

  2. Check and confirm that the domain “ascentfunding.local” still exists in your machine’s local host file. For Mac Sonoma, the host file can be located at /etc/hosts file.

  3. Since you have already tried running a search and replace to remove the custom port, please double-check the Site and Home URLs directly in the Database Manager to ensure that the URLs do not have the custom port included anymore.

If all the above steps have been completed correctly, but the site still tries to load with a custom port resulting to page becoming unreachable, please clear your browser cache or try to load the site using a private browser.

I hope it helps. Let us know how it goes.

1 Like
  1. I don’t see this option within DevKinsta when I select a site and click on settings. Can you explain how to get to that Port selector screen?

  2. Looks like the hosts file includes this domain: ascentfunding.local www.ascentfunding.local
    ::1 ascentfunding.local
    ::1 www.ascentfunding.local

  3. yes within the wp_options table I changed two of the values to remove the port. Is there another table I should check?

After these steps DevKinsta links to: https://ascentfunding.local:49533/ - which doesn’t work on any browser

I found the Port selector within DevKinsta → Settings (I thought it would be within the Site’s settings, but it’s the global DevKinsta settings)

I worked with a coworker who setup the other docker container and we concluded that the sitename.local domain was not set up properly.

The /etc/hosts file included the sitename.local
however running
host sitename.local
dig sitename.local

was not finding it the domain

We think that the other docker container was assigning zones which may have conflicted with what DevKinsta was trying to do with domains and ports

Anyways, I got my sites to work on sitename.local:8443 after some work

My coworker mentioned (I’m paraphrasing here and may have this wrong) that DevKinsta → settings → Port Selector allows us to edit which external ports the site will display on, but the internal port was being used by the other container.

Hi @rpearson,

We’re glad that you found the Port Selector in DevKinsta’s global settings and were able to resolve the issue by using a different external port (sitename.local:8443).

In the context of a conflict from another Docker container utilizing the same internal port, the resolution likely stemmed from modifying the external port through DevKinsta’s Port Selector. This means you assigned a different external port to your local site’s internal port, which sorted out the issue and made it easy to access the site without any problems.

In simpler terms, tweaking the external port setup helped smooth things out, letting both Docker containers peacefully share the same host machine without messing with each other’s internal ports. This flexibility in port mapping is a big deal in Docker, making it easy for lots of different stuff to run smoothly on just one machine.

Please remember, in case you bump into some other questions regarding this matter. Please feel free to leave a message on this thread and we’ll get back in touch ASAP.

Best regards,