首页 > 解决方案 > 隧道堡垒客户端服务无法启动

问题描述

我正在尝试在两个 ec2 实例之间建立隧道堡垒连接。客户端允许 Lambda 访问服务器端 RDS。我检查了客户端ec2,发现服务隧道-堡垒-客户端无法启动。

Aug 17 23:07:49 ip-172-31-25-38 systemd[1]: tunnel-bastion-client.service: Scheduled restart job, restart counter is>
Aug 17 23:07:49 ip-172-31-25-38 systemd[1]: Stopped Maintain connection with tunnel bastion.
Aug 17 23:07:49 ip-172-31-25-38 systemd[1]: Started Maintain connection with tunnel bastion.
Aug 17 23:07:50 ip-172-31-25-38 ssh[186032]: Host key verification failed.
Aug 17 23:07:50 ip-172-31-25-38 systemd[1]: tunnel-bastion-client.service: Main process exited, code=exited, status=>
Aug 17 23:07:50 ip-172-31-25-38 systemd[1]: tunnel-bastion-client.service: Failed with result 'exit-code'

由于某种原因,无法手动启动隧道堡垒客户端服务。我可以从服务器端 ec2 连接 RDS。所以,这不是数据库问题。

# psql -h xxxx-xxxx-xxxxxxx.xxxxxxxxxxxxx.us-west-1.rds.amazonaws.com -p 5432 postgres
Password: 
psql (10.18 (Ubuntu 10.18-0ubuntu0.18.04.1), server 11.9)
WARNING: psql major version 10, server major version 11.
         Some psql features might not work.
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.

postgres=>

我使用 terraform 来支持 ec2 和从参数存储中抓取。请帮我找出问题到底出在哪里。提前欣赏。

标签: postgresqlamazon-ec2terraformpsqlssh-tunnel

解决方案


解决方法,从 /etc/systemd/system/tunnel-bastion-client.service 文件执行“ExecStart”行。


推荐阅读