Remote Docker Daemon Error With Droplet

I setup docker with digital ocean and pushed everything to a domain live yesterday and it was all working. However, when I opened wappler to work on things I couldn’t connect docker to my digital ocean droplet, I tried on my mac desktop and still couldn’t, I even destroyed the droplet and tried creating a few others but continued to get this error:

Server:
ERROR: Cannot connect to the Docker daemon at tcp://xx.xxx.xx.xx:2375. Is the docker daemon running?
errors pretty printing info
Error Occurred Testing Docker Connection!

I’ve spent over 6 hours today trying to solve this, I’m going crazy at this point.

Hello,

I think this is a bug, I get the same error when clicking the “Test Connection” button, however, I’m able to deploy normally

Have you tested deploying anyway?

I get this fun error:

“Error: All configured authentication methods failed at doNextAuth (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/client.js:803:21) at tryNextAuth (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/client.js:993:7) at tryNextAgentKey (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/client.js:1002:11) at USERAUTH_FAILURE (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/client.js:366:20) at 51 (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/protocol/handlers.misc.js:337:16) at Protocol.onPayload (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/protocol/Protocol.js:2025:10) at AESGCMDecipherNative.decrypt (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/protocol/crypto.js:987:26) at Protocol.parsePacket [as _parse] (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/protocol/Protocol.js:1994:25) at Protocol.parse (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/protocol/Protocol.js:293:16) at Socket. (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/client.js:713:21) at Socket.emit (node:events:390:28) at addChunk (node:internal/streams/readable:315:12) at readableAddChunk (node:internal/streams/readable:289:9) at Socket.Readable.push (node:internal/streams/readable:228:10) at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
Error: Timed out while waiting for handshake at /Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/client.js:1014:23 at sentryWrapped (/Applications/Wappler.app/Contents/Resources/app/node_modules/@sentry/browser/dist/helpers.js:75:23)”

Which chatgpt tells me:

"This error message suggests that there was a problem with the SSH authentication while attempting to connect to your Digital Ocean server using Wappler with Docker.

The error message specifically states that “All configured authentication methods failed,” which could mean that there was an issue with the SSH key used for authentication, or there may be a problem with the permissions on the server.

The error also mentions a timeout while waiting for a handshake, which could indicate that there is a network issue or a problem with the server responding."

However, I’ve tried adding my own SSH key to my droplet and that did not solve it.

Can you connect to your server using the Terminal on MacOS?

ssh root@1.2.3.4

And make sure MacOS has the correct SSH key in the ~/.ssh folder, you can check it by doing in the terminal:

cd ~/.ssh
cat id_rsa
cat id_rsa.pub

The last cat command gives you the public key that should be on the VPS, check if it’s the same as on DigitalOcean’s control panel (if you can)

I’m only talking about MacOS because that’s what I use, so it’s easier for me to help you troubleshoot the problem

Also, do you know if you’ve installed fail2ban on your VPS? (due to the connection problem/timeout)

I keep getting the same error when trying to ssh via the terminal too.

Do you know how to replace the ssh key on my droplet with the one on my Mac if they don’t align? ( going to check in the morning).

Also I have no installed fail2ban, should I?

Use droplet console to enter your VPS, and type:

cd ~/.ssh
cat authorized_keys

Some line of authorized_keys file must match your id_rsa.pub file on your Mac

You can write a new key using:

echo "your new public key" >> ./authorized_keys

No, not for now - I just wanted to know as it could’ve caused some problem here, but since you don’t have it installed I can exclude a theory

I added my key into the droplet and went to test it by ssh in the terminal and still received this error:

Permission denied (publickey).

Ugh

On your Mac try:

ssh root@1.2.3.4 -i ~/.ssh/id_rsa

Could also be a case of wrong permissions on authorized_keys on your VPS (ask ChatGPT how to fix it)

I’m not sure what happened but it started working again. I still get the error when testing my connection in settings, target, remote but I am able to push to production and it’s live on the domain.

My new issue is that the database is not being pushed to the domain, I have the half green circle next to the production deployment button.

Thank you for all of your help btw!

1 Like