abra server add produces a confusing error when docker is not installed on target #507

Closed
opened 2025-03-03 19:14:40 +00:00 by cas · 2 comments
Member

Setting up a new server it took me a bit to figure out what this error meant! It could check that indeed the ssh worked but that docker failed to be run on the remote.

user@local:~/.ssh$ abra server add target.server
FATA can't ssh to target.server, make sure "ssh target.server" works
user@local:~/.ssh$ abra server add target.server -d
DEBU <cli/run.go:60> abra version 0.10.0-rc1-beta, commit 8af87aa38216c45a36135771755be187c66911ad
DEBU <internal/validate.go:125> validated target.server as domain argument
DEBU <server/server.go:24> successfully created /home/cas/.abra/servers/target.server
DEBU <server/add.go:168> creating context with domain target.server
DEBU <client/context.go:25> created the target.server context
DEBU <server/add.go:102> attempting to create client for target.server
DEBU <client/client.go:88> created client for target.server
DEBU <commandconn/commandconn.go:49> commandconn: starting ssh with [-o ConnectTimeout=5 -- target.server docker system dial-stdio]
DEBU <commandconn/commandconn.go:287> commandconn (ssh):fish: Unknown command: docker
fish:
docker system dial-stdio
^~~~~^

DEBU <commandconn/commandconn.go:49> commandconn: starting ssh with [-o ConnectTimeout=5 -- target.server docker system dial-stdio]
DEBU <commandconn/commandconn.go:287> commandconn (ssh):fish: Unknown command: docker
fish:
docker system dial-stdio
^~~~~^

DEBU <server/add.go:128> serverAdd: cleanUp: cleaning up context for target.server
DEBU <server/add.go:106> ssh target.server error: error during connect: Get "http://docker.example.com/v1.47/info": command [ssh -o ConnectTimeout=5 -- target.server docker system dial-stdio] has exited with exit status 127, please make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=fish: Unknown command: docker
fish:
docker system dial-stdio
^~~~~^

FATA <server/add.go:107> can't ssh to target.server, make sure "ssh target.server" works

(note i have fish as the shell on target server, but the only difference in the result is that the error from the remote server is phrased differently).

Setting up a new server it took me a bit to figure out what this error meant! It could check that indeed the ssh worked but that docker failed to be run on the remote. ``` user@local:~/.ssh$ abra server add target.server FATA can't ssh to target.server, make sure "ssh target.server" works user@local:~/.ssh$ abra server add target.server -d DEBU <cli/run.go:60> abra version 0.10.0-rc1-beta, commit 8af87aa38216c45a36135771755be187c66911ad DEBU <internal/validate.go:125> validated target.server as domain argument DEBU <server/server.go:24> successfully created /home/cas/.abra/servers/target.server DEBU <server/add.go:168> creating context with domain target.server DEBU <client/context.go:25> created the target.server context DEBU <server/add.go:102> attempting to create client for target.server DEBU <client/client.go:88> created client for target.server DEBU <commandconn/commandconn.go:49> commandconn: starting ssh with [-o ConnectTimeout=5 -- target.server docker system dial-stdio] DEBU <commandconn/commandconn.go:287> commandconn (ssh):fish: Unknown command: docker fish: docker system dial-stdio ^~~~~^ DEBU <commandconn/commandconn.go:49> commandconn: starting ssh with [-o ConnectTimeout=5 -- target.server docker system dial-stdio] DEBU <commandconn/commandconn.go:287> commandconn (ssh):fish: Unknown command: docker fish: docker system dial-stdio ^~~~~^ DEBU <server/add.go:128> serverAdd: cleanUp: cleaning up context for target.server DEBU <server/add.go:106> ssh target.server error: error during connect: Get "http://docker.example.com/v1.47/info": command [ssh -o ConnectTimeout=5 -- target.server docker system dial-stdio] has exited with exit status 127, please make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=fish: Unknown command: docker fish: docker system dial-stdio ^~~~~^ FATA <server/add.go:107> can't ssh to target.server, make sure "ssh target.server" works ``` (note i have fish as the shell on target server, but the only difference in the result is that the error from the remote server is phrased differently).
Author
Member

Note in fact any non-zero return from running docker system dial-stdio causes this same error, which is mighty confusing if you can in fact ssh to the server.

Note in fact any non-zero return from running `docker system dial-stdio` causes this same error, which is mighty confusing if you can in fact ssh to the server.
decentral1se added the
bug
label 2025-03-03 20:32:40 +00:00
decentral1se added this to the abra v0.10.0 project 2025-03-03 20:32:44 +00:00
Owner

Yeh agree, this is confusing @cas, thanks for reporting. There have been multiple refactors over this part of the code by different people trying to improve the errors and this seems to have gone too far in terms of simplication. We could interrogate the return message a bit more for this case.

Yeh agree, this is confusing @cas, thanks for reporting. There have been multiple refactors over this part of the code by different people trying to improve the errors and this seems to have gone too far in terms of simplication. We could interrogate the return message a bit more for this case.
decentral1se added the
release-candidate
label 2025-03-13 09:56:52 +00:00
decentral1se moved this to Done in abra v0.10.0 on 2025-04-14 22:00:59 +00:00
decentral1se moved this to Done in abra v0.10.0 on 2025-04-14 22:01:01 +00:00
decentral1se moved this to Done in abra v0.10.0 on 2025-04-16 05:16:08 +00:00
decentral1se moved this to Done in abra v0.10.0 on 2025-04-16 05:16:10 +00:00
decentral1se moved this to Done in abra v0.10.0 on 2025-04-19 07:28:29 +00:00
decentral1se moved this to Done in abra v0.10.0 on 2025-04-21 17:48:15 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: toolshed/abra#507
No description provided.