ssh: connect to host c220g2-011315.wisc.cloudlab.us port 22: Connection refused

186 views
Skip to first unread message

Zeying Zhu

unread,
Mar 17, 2022, 5:11:06 PM3/17/22
to cloudlab-users
Dear Team,

I deleted all the partitions of /dev/sda in c220g2-011315.wisc.cloudlab.us using fdisk and add a new partition to contain all the space in the disk. Then I reboot the machine. However, now we cannot ssh to it and it shows "ssh: connect to host c220g2-011315.wisc.cloudlab.us port 22: Connection refused", although the server status is ready. Could you help me on fixing this problem? 

Thanks so much!
Zeying

David M Johnson

unread,
Mar 17, 2022, 5:20:57 PM3/17/22
to cloudla...@googlegroups.com
Did you look at the node's console log? Starting from the end, you can
see that sshd failed to start up; it is complaining about a bogus line
in the config ("ClientAliveInterval60"). Go ahead and login on console
in the Cloudlab web interface and fix that up... looks like sshd is in a
restart loop.

(I notice there is a stale swap device in /etc/fstab... you'll want to
remove that to reduce whining in logfiles at startup.)

> Thanks so much!
> Zeying

David

Gary Wong

unread,
Mar 17, 2022, 5:23:21 PM3/17/22
to cloudla...@googlegroups.com
Please don't delete the root filesystem on /dev/sda. It's necessary
for the machine to boot and (as you observed) nothing will come up
without it. The easiest way to recover will be to reload the node
with a completely new image (the node menu in the web interface has
an option from that), or start a new experiment.

If you want to reallocate partitions on /dev/sda, there's a
utility "mkextrafs.pl" documented in Section 10.2.2 of the manual
that might help you:

http://docs.cloudlab.us/advanced-storage.html

Thanks,
Gary.
--
Gary Wong g...@flux.utah.edu http://www.cs.utah.edu/~gtw/

Zeying Zhu

unread,
Mar 17, 2022, 5:31:03 PM3/17/22
to cloudlab-users
Thanks! But I have some important code files on the original machine and cannot lose them. Are there other ways to solve it?

When I open the console, it is blank. What should I do with console?

Thanks!
Zeying

David M Johnson

unread,
Mar 17, 2022, 5:38:25 PM3/17/22
to cloudla...@googlegroups.com
On 3/17/22 3:31 PM, Zeying Zhu wrote:
> Thanks! But I have some important code files on the original machine and
> cannot lose them. Are there other ways to solve it?
>
> When I open the console, it is blank. What should I do with console?

You are talking about this expt?
https://www.cloudlab.us/status.php?uuid=fe91a756-6795-11ec-b318-e4434b2381fc
That has the node you mention.

You shouldn't see a blank screen, you should see at least some text. It
turned out my console connection was still live on the backend, so you
would have seen an error message about the console line being busy, but
I've fixed that, so now you should see

```
Trying 127.0.0.1...
Connected to localhost.
Escape character is 'off'.
```

Hit Enter to get a login prompt. Click the little `Password` link just
above the black console screen; that will give you the current root
password so you login and fix the sshd config file.

> Thanks!
> Zeying

David

> On Thursday, March 17, 2022 at 5:23:21 PM UTC-4 gtw wrote:
>
> On Thu, Mar 17, 2022 at 02:11:06PM -0700, Zeying Zhu wrote:
> > I deleted all the partitions of /dev/sda in
> c220g2-011315.wisc.cloudlab.us <http://c220g2-011315.wisc.cloudlab.us>
> > using fdisk and add a new partition to contain all the space in
> the disk.
> > Then I reboot the machine. However, now we cannot ssh to it and it
> shows
> > "ssh: connect to host c220g2-011315.wisc.cloudlab.us
> <http://c220g2-011315.wisc.cloudlab.us> port 22: Connection
> > refused", although the server status is ready. Could you help me
> on fixing
> > this problem?
>
> Please don't delete the root filesystem on /dev/sda. It's necessary
> for the machine to boot and (as you observed) nothing will come up
> without it. The easiest way to recover will be to reload the node
> with a completely new image (the node menu in the web interface has
> an option from that), or start a new experiment.
>
> If you want to reallocate partitions on /dev/sda, there's a
> utility "mkextrafs.pl <http://mkextrafs.pl>" documented in Section
> 10.2.2 of the manual
> that might help you:
>
> http://docs.cloudlab.us/advanced-storage.html
> <http://docs.cloudlab.us/advanced-storage.html>
>
> Thanks,
> Gary.
> --
> Gary Wong g...@flux.utah.edu http://www.cs.utah.edu/~gtw/
> <http://www.cs.utah.edu/~gtw/>
>
> --
> You received this message because you are subscribed to the Google
> Groups "cloudlab-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to cloudlab-user...@googlegroups.com
> <mailto:cloudlab-user...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/cloudlab-users/8bbecb42-d2c4-47c5-810c-af12f0c465cfn%40googlegroups.com
> <https://groups.google.com/d/msgid/cloudlab-users/8bbecb42-d2c4-47c5-810c-af12f0c465cfn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Mike Hibler

unread,
Mar 17, 2022, 5:48:31 PM3/17/22
to cloudla...@googlegroups.com
As an aside, you should keep copies of your important files somewhere
other than the experiment nodes. Especially if you are about to repartition
the root disk. :-)
> --
> You received this message because you are subscribed to the Google Groups
> "cloudlab-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to cloudlab-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/
> cloudlab-users/8bbecb42-d2c4-47c5-810c-af12f0c465cfn%40googlegroups.com.

Zeying Zhu

unread,
Mar 17, 2022, 6:16:39 PM3/17/22
to cloudla...@googlegroups.com
Thanks for all your help! Will take care next time.

Thanks!
Zeying

You received this message because you are subscribed to a topic in the Google Groups "cloudlab-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cloudlab-users/aVNfr-HEU7U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cloudlab-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudlab-users/20220317214829.GL71929%40flux.utah.edu.
Reply all
Reply to author
Forward
0 new messages