-1

I am getting Network error: Connection refused while connecting to AWS instance via putty.

However I can ping this instance and port 22 in configured under security group as well. Earlier I could access this instance, I tried reboot and attached and removed another volume. Post that I am getting this issue.

PFB my system log:

Welcome to [1mUbuntu 16.04.3 LTS[0m!

[    3.898926] systemd[1]: Set hostname to <ip-172-31-18-16>.
[    3.927671] systemd-fstab-generator[340]: Failed to create mount unit file /run/systemd/generator/newone.mount, as it already exists. Duplicate entry in /etc/fstab?
[    3.936143] systemd-fstab-generator[340]: Failed to create mount unit file /run/systemd/generator/newone.mount, as it already exists. Duplicate entry in /etc/fstab?
[    3.943499] systemd[328]: /lib/systemd/system-generators/systemd-fstab-generator failed with error code 1.
sweta
  • 149
  • 10
  • *"I tried reboot and attached and removed another volume."* Please consider clarifying exactly what you are describing here, but also note that this question seems more appropriate for [Server Fault](https://serverfault.com) or perhaps [Ask Ubuntu](https://askubuntu.com) and indeed may already have an answer on one of those sites. Note that questions should only be posted on one site, so please do not cross-post. – Michael - sqlbot Nov 29 '17 at 14:02

1 Answers1

0

Have you configured elastic lP for your instance? The default public IP is bound to change during restarts. It is advisable to use elastic IP.

From your logs, it seems you have errored while mounting and unmounting the volume. The current problem is that you are unable to mount the home directory of your logged in user. If you have an alternate sudoer account, use that account to log into this machine and correct the issue in /etc/fstab.

ARMV
  • 194
  • 5
  • Yes, I have configured elastic IP for my instance. – sweta Nov 29 '17 at 09:15
  • *"The current problem is that you are unable to mount the home directory of your logged in user."* While that would be a serious problem, this looks like something more system-wide. `Connection refused` means the SSH service is not running. – Michael - sqlbot Nov 29 '17 at 14:04
  • @Michael-sqlbot - I can get this from logs, but how do I resolve this? I have searched for this issue in stackoverflow as well as other sites but nothing is helpful. – sweta Nov 30 '17 at 05:37