Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Instance stuck at 'Stopping' when installing on Centos7 AMI #10

Open
atoy3731 opened this issue Aug 11, 2019 · 0 comments
Open

Instance stuck at 'Stopping' when installing on Centos7 AMI #10

atoy3731 opened this issue Aug 11, 2019 · 0 comments
Assignees

Comments

@atoy3731
Copy link

Trying to get this working with a Centos 7 Base AMI. I've created the following systemd file and hibagent successfully starts:

[Unit]
Description=AWS Hibernate Service
After=network.target

[Service]
Type=forking
Restart=always
RestartSec=1
User=root
ExecStart=/usr/bin/hibagent -c /etc/hibagent-config.cfg

[Install]
WantedBy=multi-user.target

And the logs in /var/log/messages seem to be okay:

Aug 11 13:43:05 ip-10-2-1-225 hibagent: Will check if swap is at least: 7819 megabytes
Aug 11 13:43:05 ip-10-2-1-225 hibagent: Will check if swap is at least: 7819 megabytes
Aug 11 13:43:05 ip-10-2-1-225 hibagent: Info current pm_freeze_timeout (40 seconds) is greater than or equal to the requested (40 seconds) timeout, doing nothing
Aug 11 13:43:05 ip-10-2-1-225 hibagent: No swap is present, will create and initialize it
Aug 11 13:43:05 ip-10-2-1-225 hibagent: There's enough space (90321072128 present, 8210321408 needed) on the swap device: /
Aug 11 13:43:05 ip-10-2-1-225 hibagent: Info current pm_freeze_timeout (40 seconds) is greater than or equal to the requested (40 seconds) timeout, doing nothing
Aug 11 13:43:05 ip-10-2-1-225 hibagent: No swap is present, will create and initialize it
Aug 11 13:43:05 ip-10-2-1-225 hibagent: There's enough space (90321072128 present, 8210321408 needed) on the swap device: /
Aug 11 13:43:05 ip-10-2-1-225 hibagent: Initial checks are finished, daemonizing and writing PID into /run/hibagent
Aug 11 13:43:05 ip-10-2-1-225 hibagent: Initial checks are finished, daemonizing and writing PID into /run/hibagent
Aug 11 13:43:05 ip-10-2-1-225 hibagent: Locking all the code in memory
Aug 11 13:43:08 ip-10-2-1-225 hibagent: Starting the hibernation polling loop
Aug 11 13:43:08 ip-10-2-1-225 hibagent: Swap file size (8199864320 bytes) is already large enough
Aug 11 13:43:08 ip-10-2-1-225 hibagent: Running: /sbin/mkswap /swap
Aug 11 13:43:09 ip-10-2-1-225 hibagent: Running: /sbin/swapon /swap
Aug 11 13:43:10 ip-10-2-1-225 hibagent: Updating the kernel offset for the swapfile: /swap
Aug 11 13:43:10 ip-10-2-1-225 hibagent: Updating GRUB to use the device /dev/xvda1 with offset 318544 for resume
Aug 11 13:43:10 ip-10-2-1-225 hibagent: GRUB configuration is updated
Aug 11 13:43:10 ip-10-2-1-225 hibagent: Setting swap device to 51713 with offset 318544
Aug 11 13:43:10 ip-10-2-1-225 hibagent: Done updating the swap offset
Aug 11 13:43:10 ip-10-2-1-225 hibagent: Background swap initialization thread is complete.

However, when I initiate a HIbernate call from the AWS UI, it gets into a 'Stopping' state and stays there. I do get booted from the instance, and the only way to get back in is a hard stop and start.

Here's the logs right after I pushed the Hibernate button:

Aug 11 14:07:29 ip-10-2-1-225 systemd-logind: Suspend key pressed.
Aug 11 14:07:30 ip-10-2-1-225 NetworkManager[1261]: <info>  [1565532450.0699] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Aug 11 14:07:30 ip-10-2-1-225 journal: Screen lock is locked down, not locking
Aug 11 14:07:30 ip-10-2-1-225 NetworkManager[1261]: <info>  [1565532450.0706] manager: NetworkManager state is now ASLEEP
Aug 11 14:07:30 ip-10-2-1-225 NetworkManager[1261]: <info>  [1565532450.0708] device (ens3): state change: activated -> deactivating (reason 'sleeping', sys-iface-state: 'managed')
Aug 11 14:07:30 ip-10-2-1-225 NetworkManager[1261]: <info>  [1565532450.0860] device (ens3): state change: deactivating -> disconnected (reason 'sleeping', sys-iface-state: 'managed')
Aug 11 14:07:30 ip-10-2-1-225 dbus[963]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Aug 11 14:07:30 ip-10-2-1-225 avahi-daemon[983]: Withdrawing address record for fe80::c18:78ff:fed4:4776 on ens3.
Aug 11 14:07:30 ip-10-2-1-225 systemd: Starting Network Manager Script Dispatcher Service...
Aug 11 14:07:30 ip-10-2-1-225 NetworkManager[1261]: <info>  [1565532450.1230] dhcp4 (ens3): canceled DHCP transaction, DHCP client pid 1396
Aug 11 14:07:30 ip-10-2-1-225 NetworkManager[1261]: <info>  [1565532450.1232] dhcp4 (ens3): state changed bound -> done
Aug 11 14:07:30 ip-10-2-1-225 avahi-daemon[983]: Withdrawing address record for 10.2.1.225 on ens3.
Aug 11 14:07:30 ip-10-2-1-225 avahi-daemon[983]: Leaving mDNS multicast group on interface ens3.IPv4 with address 10.2.1.225.
Aug 11 14:07:30 ip-10-2-1-225 dbus[963]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Aug 11 14:07:30 ip-10-2-1-225 nm-dispatcher: req:1 'connectivity-change': new request (5 scripts)
Aug 11 14:07:30 ip-10-2-1-225 nm-dispatcher: req:1 'connectivity-change': start running ordered scripts...
Aug 11 14:07:30 ip-10-2-1-225 avahi-daemon[983]: Interface ens3.IPv4 no longer relevant for mDNS.
Aug 11 14:07:30 ip-10-2-1-225 systemd: Started Network Manager Script Dispatcher Service.
Aug 11 14:07:30 ip-10-2-1-225 kernel: ixgbevf 0000:00:03.0: NIC Link is Up 10 Gbps
Aug 11 14:07:30 ip-10-2-1-225 NetworkManager[1261]: <info>  [1565532450.2005] device (ens3): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Aug 11 14:07:30 ip-10-2-1-225 dnsmasq[1762]: no servers found in /etc/resolv.conf, will retry
Aug 11 14:07:30 ip-10-2-1-225 nm-dispatcher: req:2 'down' [ens3]: new request (5 scripts)
Aug 11 14:07:30 ip-10-2-1-225 chronyd[969]: Source 148.167.132.200 offline
Aug 11 14:07:30 ip-10-2-1-225 systemd: Reached target Sleep.
Aug 11 14:07:30 ip-10-2-1-225 chronyd[969]: Source 208.113.157.157 offline
Aug 11 14:07:30 ip-10-2-1-225 systemd: Starting Suspend...
Aug 11 14:07:30 ip-10-2-1-225 chronyd[969]: Source 74.6.168.72 offline
Aug 11 14:07:30 ip-10-2-1-225 chronyd[969]: Source 107.155.79.108 offline
Aug 11 14:07:30 ip-10-2-1-225 chronyd[969]: Can't synchronise: no selectable sources
Aug 11 14:07:30 ip-10-2-1-225 nm-dispatcher: req:2 'down' [ens3]: start running ordered scripts...
Aug 11 14:07:30 ip-10-2-1-225 systemd-sleep: Suspending system...

I also see the /swap file that is generated is around 8gb (the amount of RAM I have).

Is this just not compatible with CentOS? Or am I missing something? I've waited a half hour after hibernating and still no dice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants