Long Story
我正在准备安装监控软件代理的云init脚本(免责声明:我是MonitOwl的创始人之一)。代理软件收集信息(如内存或网络统计数据)并将其发送到服务器。每个公司集团都应该连接到自己的个性化服务器网址,如:https://customer_name.example.org。
云init脚本是一个从github下载代理、安装systemd服务和安装python需求的Content-Type: multipart/mixed;。目前,我们使用它的方式如下:
# ec2-run-instances --user-data-file <our_generated_file>
我按照这个示例从云函数连接到Postgres:。
当我使用Public创建测试Cloud实例并触发云函数时,它将连接到cloud实例并返回一些内容。出于安全原因,我不能继续使用公共IP,所以当我在云SQL实例上选择私有IP时,我得到:
Error: function crashed. Details:
could not connect to server: Connection refused
Is the server running locally and accepting
connections on Unix domain socket "/cloudsql