大网数据广告活动
服务器运维问答

Unable to connect after reboot in Google Compute Engine

· 52CE 我爱测

Due to excessive use I had to upgrade my machine which led to a reboot. After that I'm unable to connect through PuTTY, only using Google console. Also, my SVN repository is there, and I can't connect to it either. I looked at th…

问题原文

原帖链接 · carla · CC BY-SA 3.0

Due to excessive use I had to upgrade my machine which led to a reboot. After that I'm unable to connect through PuTTY, only using Google console.

Also, my SVN repository is there, and I can't connect to it either.

I looked at the firewall rules in 'VPC Network', and they are the same before the reboot :

The output of iptables -L :

[newuser@google-server ~]$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere            
INPUT_direct  all  --  anywhere             anywhere            
INPUT_ZONES_SOURCE  all  --  anywhere             anywhere            
INPUT_ZONES  all  --  anywhere             anywhere            
DROP       all  --  anywhere             anywhere             ctstate INVALID
REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere            
FORWARD_direct  all  --  anywhere             anywhere            
FORWARD_IN_ZONES_SOURCE  all  --  anywhere             anywhere            
FORWARD_IN_ZONES  all  --  anywhere             anywhere            
FORWARD_OUT_ZONES_SOURCE  all  --  anywhere             anywhere            
FORWARD_OUT_ZONES  all  --  anywhere             anywhere            
DROP       all  --  anywhere             anywhere             ctstate INVALID
REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
OUTPUT_direct  all  --  anywhere             anywhere            

Chain FORWARD_IN_ZONES (1 references)
target     prot opt source               destination         
FWDI_trusted  all  --  anywhere             anywhere            
FWDI_trusted  all  --  anywhere             anywhere            

Chain FORWARD_IN_ZONES_SOURCE (1 references)
target     prot opt source               destination         

Chain FORWARD_OUT_ZONES (1 references)
target     prot opt source               destination         
FWDO_trusted  all  --  anywhere             anywhere            
FWDO_trusted  all  --  anywhere             anywhere            

Chain FORWARD_OUT_ZONES_SOURCE (1 references)
target     prot opt source               destination         

Chain FORWARD_direct (1 references)
target     prot opt source               destination         

Chain FWDI_trusted (2 references)
target     prot opt source               destination         
FWDI_trusted_log  all  --  anywhere             anywhere            
FWDI_trusted_deny  all  --  anywhere             anywhere            
FWDI_trusted_allow  all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            

Chain FWDI_trusted_allow (1 references)
target     prot opt source               destination         

Chain FWDI_trusted_deny (1 references)
target     prot opt source               destination         

Chain FWDI_trusted_log (1 references)
target     prot opt source               destination         

Chain FWDO_trusted (2 references)
target     prot opt source               destination         
FWDO_trusted_log  all  --  anywhere             anywhere            
FWDO_trusted_deny  all  --  anywhere             anywhere            
FWDO_trusted_allow  all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            

Chain FWDO_trusted_allow (1 references)
target     prot opt source               destination         

Chain FWDO_trusted_deny (1 references)
target     prot opt source               destination         

Chain FWDO_trusted_log (1 references)
target     prot opt source               destination         

Chain INPUT_ZONES (1 references)
target     prot opt source               destination         
IN_trusted  all  --  anywhere             anywhere            
IN_trusted  all  --  anywhere             anywhere            

Chain INPUT_ZONES_SOURCE (1 references)
target     prot opt source               destination         

Chain INPUT_direct (1 references)
target     prot opt source               destination         

Chain IN_trusted (2 references)
target     prot opt source               destination         
IN_trusted_log  all  --  anywhere             anywhere            
IN_trusted_deny  all  --  anywhere             anywhere            
IN_trusted_allow  all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            

Chain IN_trusted_allow (1 references)
target     prot opt source               destination         

Chain IN_trusted_deny (1 references)
target     prot opt source               destination         

Chain IN_trusted_log (1 references)
target     prot opt source               destination         

Chain OUTPUT_direct (1 references)
target     prot opt source               destination  

My ssh key is still in .ssh/authorized_keys but when using PuTTY, even before asking for the user, it dies with:

Network error: connection timeout

When trying to update my SVN local copy it dies "because host didn't respond".

What I've already looked:

  • This and this don't adress the problem since my access using Google console works perfectly
  • Neither this, because it relates to issues regarding first time connecting

已采纳解答

原帖链接 · carla · CC BY-SA 3.0

The cause of the problem was that the IP changed after reboot.

I think it would be a good call to inform that besides reboot the machine may suffer from an IP change, unless you reserve a static external IP.

Fortunately, this wasn't my production server, so the change just caused a few hours of frustration for me till I discovered the problem.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-10-30)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。