Docker postgres 12 和鳄梨酱错误 "incomplete message from client"
Docker postgres 12 and guacamole error "incomplete message from client"
我在 ubuntu18 上使用 docker 20.10.9,我用鳄梨酱和 guacd 1.3 与 postgres 12.3 组成项目,突然间容器或主机没有任何变化我的鳄梨酱停止工作,我有这些错误消息:
postgres_gqm_1 | 2022-01-13T19:32:24.187916615Z 2022-01-13 19:32:24.187 UTC [4394] LOG: incomplete message from client
guacamole_1 | 2022-01-13T19:32:24.214231454Z 19:32:24.214 [http-nio-8080-exec-6] ERROR o.a.g.rest.RESTExceptionMapper - Unexpected internal error:
guacamole_1 | 2022-01-13T19:32:24.214398980Z ### Error rolling back transaction. Cause: org.postgresql.util.PSQLException: This connection has been closed.
guacamole_1 | 2022-01-13T19:32:24.214445260Z ### Cause: org.postgresql.util.PSQLException: This connection has been closed.
guacamole_1 | 2022-01-13T19:32:24.496644124Z 19:32:24.496 [http-nio-8080-exec-1] INFO o.a.g.r.auth.AuthenticationService - User "guacadmin" successful
来自鳄梨酱团队,他们说“您需要检查您的 PostgreSQL 数据库服务器并确保它是健康的 - 出于某种原因拒绝来自鳄梨酱客户端系统的请求,这就是导致您看到的错误的原因。 “
我没有做任何更改,我可以登录到数据库并且容器是健康的
这是 docker 网络:
br-f326529eaab0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.18.0.1 netmask 255.255.0.0 broadcast 172.18.255.255
inet6 fe80::42:38ff:fedb:b859 prefixlen 64 scopeid 0x20<link>
ether 02:42:38:db:b8:59 txqueuelen 0 (Ethernet)
RX packets 41155862 bytes 21949886776 (21.9 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 41787311 bytes 104021450183 (104.0 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:38:c8:46:85 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
我没有高 cpu \disk space 问题 \ 我在 psql 上检查了查询的 运行ning 并且一切看起来都正常并且有一些查询 运行 从鳄梨酱那里得到很好的结果,有没有办法从 psql 获取更多信息以查看问题所在?
或者我可以检查的任何其他想法?
也尝试重新启动所有 docker + docker 服务 + 重新启动服务器
来自撰写:
postgres_gqm:
image: postgres:12.3
environment:
PGDATA: /var/lib/postgresql/data/guacamole
POSTGRES_DB: db
POSTGRES_PASSWORD: XXX
POSTGRES_USER: user
restart: always
volumes:
- ./init:/docker-entrypoint-initdb.d:ro
- ./data:/var/lib/postgresql/data:rw
logging:
driver: "json-file"
options:
max-size: "750m"
没有特殊的 psql 配置文件
来自容器的 postgres 日志:
postgres_gqm_1 | 2022-01-13T12:00:50.261340648Z
postgres_gqm_1 | 2022-01-13T12:00:50.261369022Z PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres_gqm_1 | 2022-01-13T12:00:50.261372995Z
postgres_gqm_1 | 2022-01-13T12:00:50.279414293Z 2022-01-13 12:00:50.276 UTC [1] LOG: starting PostgreSQL 12.3 (Debian 12.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
postgres_gqm_1 | 2022-01-13T12:00:50.279436073Z 2022-01-13 12:00:50.276 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
postgres_gqm_1 | 2022-01-13T12:00:50.279439637Z 2022-01-13 12:00:50.276 UTC [1] LOG: listening on IPv6 address "::", port 5432
postgres_gqm_1 | 2022-01-13T12:00:50.283140828Z 2022-01-13 12:00:50.283 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres_gqm_1 | 2022-01-13T12:00:50.299483405Z 2022-01-13 12:00:50.299 UTC [27] LOG: database system was shut down at 2022-01-13 11:50:48 UTC
postgres_gqm_1 | 2022-01-13T12:00:50.308479194Z 2022-01-13 12:00:50.308 UTC [1] LOG: database system is ready to accept connections
postgres_gqm_1 | 2022-01-13T12:13:37.071961111Z 2022-01-13 12:13:37.071 UTC [50] LOG: incomplete message from client
postgres_gqm_1 | 2022-01-13T12:16:36.454145261Z 2022-01-13 12:16:36.453 UTC [34] LOG: incomplete message from client
postgres_gqm_1 | 2022-01-13T13:22:07.250077256Z 2022-01-13 13:22:07.249 UTC [36] LOG: incomplete message from client
postgres_gqm_1 | 2022-01-13T17:35:23.387228077Z 2022-01-13 17:35:23.386 UTC [4073] LOG: incomplete message from client
postgres_gqm_1 | 2022-01-13T19:32:24.187916615Z 2022-01-13 19:32:24.187 UTC [4394] LOG: incomplete message from client
谢谢。
通过
使用 clean db 启动 postgres 鳄梨酱解决了这个问题
mv data data_back
mkdir data
然后我重新启动了 docker compose
docker-compose down
docker-compose up -d
然后我制作了一个脚本,使用 API 请求将所有活动连接从我的常规数据库复制到鳄梨酱,它复制了所有 550 台机器。
现在一切正常,似乎数据库损坏了。
我在 ubuntu18 上使用 docker 20.10.9,我用鳄梨酱和 guacd 1.3 与 postgres 12.3 组成项目,突然间容器或主机没有任何变化我的鳄梨酱停止工作,我有这些错误消息:
postgres_gqm_1 | 2022-01-13T19:32:24.187916615Z 2022-01-13 19:32:24.187 UTC [4394] LOG: incomplete message from client
guacamole_1 | 2022-01-13T19:32:24.214231454Z 19:32:24.214 [http-nio-8080-exec-6] ERROR o.a.g.rest.RESTExceptionMapper - Unexpected internal error:
guacamole_1 | 2022-01-13T19:32:24.214398980Z ### Error rolling back transaction. Cause: org.postgresql.util.PSQLException: This connection has been closed.
guacamole_1 | 2022-01-13T19:32:24.214445260Z ### Cause: org.postgresql.util.PSQLException: This connection has been closed.
guacamole_1 | 2022-01-13T19:32:24.496644124Z 19:32:24.496 [http-nio-8080-exec-1] INFO o.a.g.r.auth.AuthenticationService - User "guacadmin" successful
来自鳄梨酱团队,他们说“您需要检查您的 PostgreSQL 数据库服务器并确保它是健康的 - 出于某种原因拒绝来自鳄梨酱客户端系统的请求,这就是导致您看到的错误的原因。 “
我没有做任何更改,我可以登录到数据库并且容器是健康的 这是 docker 网络:
br-f326529eaab0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.18.0.1 netmask 255.255.0.0 broadcast 172.18.255.255
inet6 fe80::42:38ff:fedb:b859 prefixlen 64 scopeid 0x20<link>
ether 02:42:38:db:b8:59 txqueuelen 0 (Ethernet)
RX packets 41155862 bytes 21949886776 (21.9 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 41787311 bytes 104021450183 (104.0 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:38:c8:46:85 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
我没有高 cpu \disk space 问题 \ 我在 psql 上检查了查询的 运行ning 并且一切看起来都正常并且有一些查询 运行 从鳄梨酱那里得到很好的结果,有没有办法从 psql 获取更多信息以查看问题所在? 或者我可以检查的任何其他想法?
也尝试重新启动所有 docker + docker 服务 + 重新启动服务器
来自撰写:
postgres_gqm:
image: postgres:12.3
environment:
PGDATA: /var/lib/postgresql/data/guacamole
POSTGRES_DB: db
POSTGRES_PASSWORD: XXX
POSTGRES_USER: user
restart: always
volumes:
- ./init:/docker-entrypoint-initdb.d:ro
- ./data:/var/lib/postgresql/data:rw
logging:
driver: "json-file"
options:
max-size: "750m"
没有特殊的 psql 配置文件
来自容器的 postgres 日志:
postgres_gqm_1 | 2022-01-13T12:00:50.261340648Z
postgres_gqm_1 | 2022-01-13T12:00:50.261369022Z PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres_gqm_1 | 2022-01-13T12:00:50.261372995Z
postgres_gqm_1 | 2022-01-13T12:00:50.279414293Z 2022-01-13 12:00:50.276 UTC [1] LOG: starting PostgreSQL 12.3 (Debian 12.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
postgres_gqm_1 | 2022-01-13T12:00:50.279436073Z 2022-01-13 12:00:50.276 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
postgres_gqm_1 | 2022-01-13T12:00:50.279439637Z 2022-01-13 12:00:50.276 UTC [1] LOG: listening on IPv6 address "::", port 5432
postgres_gqm_1 | 2022-01-13T12:00:50.283140828Z 2022-01-13 12:00:50.283 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres_gqm_1 | 2022-01-13T12:00:50.299483405Z 2022-01-13 12:00:50.299 UTC [27] LOG: database system was shut down at 2022-01-13 11:50:48 UTC
postgres_gqm_1 | 2022-01-13T12:00:50.308479194Z 2022-01-13 12:00:50.308 UTC [1] LOG: database system is ready to accept connections
postgres_gqm_1 | 2022-01-13T12:13:37.071961111Z 2022-01-13 12:13:37.071 UTC [50] LOG: incomplete message from client
postgres_gqm_1 | 2022-01-13T12:16:36.454145261Z 2022-01-13 12:16:36.453 UTC [34] LOG: incomplete message from client
postgres_gqm_1 | 2022-01-13T13:22:07.250077256Z 2022-01-13 13:22:07.249 UTC [36] LOG: incomplete message from client
postgres_gqm_1 | 2022-01-13T17:35:23.387228077Z 2022-01-13 17:35:23.386 UTC [4073] LOG: incomplete message from client
postgres_gqm_1 | 2022-01-13T19:32:24.187916615Z 2022-01-13 19:32:24.187 UTC [4394] LOG: incomplete message from client
谢谢。
通过
使用 clean db 启动 postgres 鳄梨酱解决了这个问题mv data data_back
mkdir data
然后我重新启动了 docker compose
docker-compose down
docker-compose up -d
然后我制作了一个脚本,使用 API 请求将所有活动连接从我的常规数据库复制到鳄梨酱,它复制了所有 550 台机器。 现在一切正常,似乎数据库损坏了。