Fleet issue "Failed initializing SSH client: dial tcp 127.0.0.1:2222: connection refused"

509 views
Skip to first unread message

Ruban James

unread,
Jul 18, 2014, 7:31:55 AM7/18/14
to coreo...@googlegroups.com
core-01 ~ # systemctl start fleet
core-01 ~ # fleetctl status
core-01 ~ # export FLEETCTL_TUNNEL=127.0.0.1:2222
core-01 ~ # ssh-add ~/.vagrant.d/insecure_private_key
Could not open a connection to your authentication agent.
core-01 ~ # eval `ssh-agent -s`
Agent pid 1089
core-01 ~ # ssh-add ~/.vagrant.d/insecure_private_key
/root/.vagrant.d/insecure_private_key: No such file or directory
core-01 ~ # fleetctl list-machines
Failed initializing SSH client: dial tcp 127.0.0.1:2222: connection refused
core-01 ~ # cd /run/
blkid/       etcd/        issue.d/     mdadm/       udev/
coreos/      fleet/       lock/        mount/       user/
dbus/        initramfs/   log/         systemd/     utmp
docker.sock  issue        lvm/         tmpfiles.d/
core-01 ~ # cd /run/fleet/units/
core-01 units # vi myapp.service
core-01 units # ls
myapp.service
core-01 units # cat myapp.service
[unit]
Description=MyApp
After=docker.service
Requires=docker.service

[Service]
ExecStart=/usr/bin/docker run busybox /bin/sh -c "while true; do echo Hello World; sleep 1; done"
core-01 units # fleetctl start myapp.service
Failed initializing SSH client: dial tcp 127.0.0.1:2222: connection refused
core-01 units # fleetctl version
fleetctl version 0.5.0
core-01 units #



I cannot start/ list my fleet machines.
Pls help me, I'm a newbie.

Thanks in advance. 

Rob Szumski

unread,
Jul 18, 2014, 2:30:53 PM7/18/14
to Ruban James, coreo...@googlegroups.com
These commands need to be run on the host computer, not inside the VM. You can see it was failing because the file wasn’t found.

Your fleetctl start command would have worked if the tunnel environment variable wasn’t set, but it failed since it was set to an invalid value. This was indicated by the connection refused error.

If you want to be able to run fleet commands from your host but control the VM, run those same commands outside the VM. If thats not important to you, unset the tunnel variable and start your unit from inside the host. It should work fine.

Let me know if you still run into issues afterwards.

 - Rob

Ruban Savvy

unread,
Jul 19, 2014, 4:47:43 AM7/19/14
to coreo...@googlegroups.com, rubanj...@gmail.com

Thanks Rob Szumski 

I still have a problem when I tried to run fleet commands. Below is the error message.

CoreOS (beta)
core@core
-01 ~ $ fleetctl list-machines
E0719
06:36:45.178182 01065 fleetctl.go:141] error attempting to check latest fleet version in Registry: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
Error retrieving list of active machines: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]


Please help me out,
I din't set the environment variables in the host machine. Looking forward for you help.



Christopher Armstrong

unread,
Jul 19, 2014, 9:21:26 PM7/19/14
to Ruban Savvy, coreo...@googlegroups.com
Ruban,

Is this a multi-node cluster? Have you provided a discovery URL for the cluster when you provisioned it?


--
You received this message because you are subscribed to the Google Groups "CoreOS User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coreos-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruban Savvy

unread,
Jul 19, 2014, 11:10:59 PM7/19/14
to coreo...@googlegroups.com
Hi Christopher Armstrong,

Three CoreOS VMs are in the same machine. I'm not sure whether they are multi-node. And they are provided with the discovery URL when they are provisioned.

Jonathan Boulle

unread,
Jul 20, 2014, 1:12:37 AM7/20/14
to Ruban Savvy, coreos-user
The error indicates that etcd isn't working. Frequently this is caused by a discovery URL being re-used across VM deletion/creation - any idea if that's occurred here? 

To get some more info on what's going on with etcd - `systemctl status etcd` and `journalctl -u etcd`


On Sat, Jul 19, 2014 at 8:10 PM, Ruban Savvy <rubanj...@gmail.com> wrote:
Hi Christopher Armstrong,

Three CoreOS VMs are in the same machine. I'm not sure whether they are multi-node.  And they are provided with the discovery URL when they are provisioned.

Ruban Savvy

unread,
Jul 21, 2014, 12:01:16 AM7/21/14
to coreo...@googlegroups.com, rubanj...@gmail.com
Sure Jonathan Boulle, I'll  check on to it and let you know.

Ruban Savvy

unread,
Jul 21, 2014, 5:36:29 AM7/21/14
to coreo...@googlegroups.com, rubanj...@gmail.com
Thanks a ton Jonathan, I'm now able to run fleet commands. What I did was, I created the setup from scratch. It really helped a lot. 
Reply all
Reply to author
Forward
0 new messages