Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';t将postgres\u导出器连接到postgresql数据库_Postgresql_Docker_Prometheus - Fatal编程技术网

Can';t将postgres\u导出器连接到postgresql数据库

Can';t将postgres\u导出器连接到postgresql数据库,postgresql,docker,prometheus,Postgresql,Docker,Prometheus,我无法连接到postgresql数据库。我越来越 time="2019-04-29T15:37:46Z" level=info msg="Established new database connection to \"localhost:5432\"." source="postgres_exporter.go:767" time="2019-04-29T15:37:46Z" level=error msg="Error opening connection to database (post

我无法连接到postgresql数据库。我越来越

time="2019-04-29T15:37:46Z" level=info msg="Established new database connection to \"localhost:5432\"." source="postgres_exporter.go:767"
time="2019-04-29T15:37:46Z" level=error msg="Error opening connection to database (postgresql://postgres:PASSWORD_REMOVED@localhost:5432/postgres?sslmode=disable): pq: unknown authentication response: 10" source="postgres_exporter.go:1260"
time="2019-04-29T15:37:46Z" level=info msg="Starting Server: :9187" source="postgres_exporter.go:1360"
端口正常,密码也正常。当我试着把它当作

# Start an example database
docker run --net=host -it --rm -e POSTGRES_PASSWORD=password postgres
# Connect to it
docker run --net=host -e DATA_SOURCE_NAME="postgresql://postgres:password@localhost:5432/postgres?sslmode=disable" wrouesnel/postgres_exporter


它工作得很好,但是已经有postgresql运行实例,所以我无法创建新实例。

看起来您正在数据库中使用紧急停堆身份验证,但是
postgres\u导出程序
还不支持它


你可以等待解决,使用更新的包自己构建导出程序,以启用紧急停堆支持或使用md5身份验证。

这听起来很合理,我也在考虑这一点,但当我在本地和主机选项中将身份验证方法更改为md5时,这并没有帮助本地所有md5主机所有127.0.0.1/32 md5```