4
PostgreSQL init process complete; ready for start up.

2022-05-16 19:28:51.674 UTC [1] LOG:  starting PostgreSQL 14.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20211027) 10.3.1 20211027, 64-bit
2022-05-16 19:28:51.674 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2022-05-16 19:28:51.674 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2022-05-16 19:28:51.677 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-05-16 19:28:51.681 UTC [51] LOG:  database system was shut down at 2022-05-16 19:28:51 UTC
2022-05-16 19:28:51.684 UTC [1] LOG:  database system is ready to accept connections
2022-05-16 19:29:07.610 UTC [59] LOG:  invalid length of startup packet
2022-05-16 19:29:07.611 UTC [58] LOG:  invalid length of startup packet
2022-05-16 19:29:07.612 UTC [60] LOG:  invalid length of startup packet
2022-05-16 19:29:08.647 UTC [62] LOG:  invalid length of startup packet
2022-05-16 19:29:08.650 UTC [61] LOG:  invalid length of startup packet
2022-05-16 19:29:08.652 UTC [63] LOG:  invalid length of startup packet

Any help would be appreciated I couldn't figure out

Docker composer file

version: '3.9'

services: postgres: image: postgres:14-alpine ports: - 5432:5432 volumes: - ~/apps/postgres:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=S3cret - POSTGRES_USER=citizix_user - POSTGRES_DB=citizix_db

Using ubuntu 20.4

Rakesh kv
  • 53
  • 1
  • 1
  • 3
  • There are lots of same questions. Please check https://serverfault.com/questions/964034/what-does-unknownunknown-log-incomplete-startup-packet-mean. – Umut TEKİN May 16 '22 at 20:24

2 Answers2

0

Something, probably a monitoring system, is establishing TCP connections to the database server, then closing them without sending a correct PostgreSQL connection packet.

You can include %h in your log_line_prefix to see the client address of these connections, which may help identify the culprit.

The solution is to get the monitoring system to establish a database connection rather than only a TCP connection. Not only will that get rid of the message, but it will make the test much more useful.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
0

Try these fixes:

  1. Update docker and restart it
  2. Reduce the name length of the sql file that you are providing to /docker-entrypoint-initdb.d in volumes
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/34674793) – programmerq Jul 14 '23 at 15:55