Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using docker timescale/timescaledb image, 'CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;' fails as it is not preloaded #66

Closed
DanielJoyce opened this issue Jun 21, 2019 · 31 comments

Comments

@DanielJoyce
Copy link

Seems prebuilt images are misconfigured, trying to create the timescaledb extension fails because the premade docker images do not have the library preloaded in their config.

Error: FATAL: extension "timescaledb" must be preloaded
  Hint: Please preload the timescaledb library via shared_preload_libraries.

This can be done by editing the config file at: /var/lib/postgresql/data/pgdata/postgresql.conf
and adding 'timescaledb' to the list in the shared_preload_libraries config.
	# Modify postgresql.conf:
	shared_preload_libraries = 'timescaledb'

Another way to do this, if not preloading other libraries, is with the command:
	echo "shared_preload_libraries = 'timescaledb'" >> /var/lib/postgresql/data/pgdata/postgresql.conf 

(Will require a database restart.)

If you REALLY know what you are doing and would like to load the library without preloading, you can disable this check with: 
	SET timescaledb.allow_install_without_preload = 'on';
SQLState:  XX000
ErrorCode: 0
Error: An I/O error occurred while sending to the backend.
SQLState:  08006
ErrorCode: 0
@DanielJoyce
Copy link
Author

Seems a fix was put in a month ago, but the docker images have not been rebuilt? Is there a reason why?

@DanielJoyce
Copy link
Author

docker image ls | grep timescale
timescale/timescaledb latest 8bbf6a3cc41c 5 weeks ago 57.6MB

But I just pulled it down today.

@DanielJoyce
Copy link
Author

If I requested a specific image version, it seemed to work

docker ps
CONTAINER ID        IMAGE                              COMMAND                  CREATED             STATUS                   PORTS                    NAMES
261947f18eca        oedev/redis:5.0                    "docker-entrypoint.s…"   2 minutes ago       Up 2 minutes (healthy)   0.0.0.0:6379->6379/tcp   tesla_redis_1
09bd69425582        timescale/timescaledb:1.3.1-pg11   "docker-entrypoint.s…"   2 minutes ago       Up 2 minutes             0.0.0.0:5432->5432/tcp   tesla_postgres_1

seems using timescale/timescaledb doesn't pull a latest version image.

@RobAtticus
Copy link
Member

@DanielJoyce - Were you using the latest tag before? We removed that tag a few weeks ago because its semantics for our extension are confusing and potentially disruptive for operators. latest was using PostgreSQL 9.6 because that's what it started with, and changing the PG version in between releases could leave people in a broken state.

Perhaps that is what you were seeing? It should throw an error when you try to use the latest tag

@andylamp
Copy link

@RobAtticus I have the same issue - the image tag used was: timescale/timescaledb-postgis:1.3.1-pg11 and I get the same error; maybe look into it?

@RobAtticus
Copy link
Member

Okay, we're releasing 1.3.2 so anything on master should be in that release.

@andylamp
Copy link

@RobAtticus, cool thanks - if possible ping once the images are live :)

@RobAtticus
Copy link
Member

@andylamp 1.3.2 should be out (except for the postgis flavored ones, we are working on an issue there) if you'd like to try

@andylamp
Copy link

@RobAtticus okay, thanks - am not currently using postgis functionality, so can test to check that the regular one works. Will ping again if things break :)

@andylamp
Copy link

andylamp commented Jun 24, 2019

@RobAtticus nope stills breaks -- executing:

select * from pg_extension

only returns plpgsql as an extension, while

create extension if not exists timescaledb cascade

still fails with the same error as before. The image used was: image: timescale/timescaledb:1.3.2-pg11

@RobAtticus
Copy link
Member

I just tried with that @andylamp and this is what I see:

$ docker exec -it timescaledb bash
bash-4.4# psql -U postgres
psql (11.4)
Type "help" for help.

postgres=# \dx
                                      List of installed extensions
    Name     | Version |   Schema   |                            Description
-------------+---------+------------+-------------------------------------------------------------------
 plpgsql     | 1.0     | pg_catalog | PL/pgSQL procedural language
 timescaledb | 1.3.2   | public     | Enables scalable inserts and complex queries for time-series data
(2 rows)

postgres=# CREATE DATABASE foo;
CREATE DATABASE
postgres=# \c foo
You are now connected to database "foo" as user "postgres".
foo=# CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
NOTICE:  extension "timescaledb" already exists, skipping
CREATE EXTENSION
foo=# \dx
                                      List of installed extensions
    Name     | Version |   Schema   |                            Description
-------------+---------+------------+-------------------------------------------------------------------
 plpgsql     | 1.0     | pg_catalog | PL/pgSQL procedural language
 timescaledb | 1.3.2   | public     | Enables scalable inserts and complex queries for time-series data
(2 rows)

foo=#

Does docker logs timescaledb --tail all show anything failing?

@RobAtticus
Copy link
Member

RobAtticus commented Jun 24, 2019

This was my log:

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... UTC
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
sh: locale: not found
2019-06-24 21:35:55.810 UTC [26] WARNING:  no usable system locales were found
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or

Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

--auth-local and --auth-host, the next time you run initdb.
waiting for server to start....2019-06-24 21:35:56.628 UTC [30] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-06-24 21:35:56.648 UTC [31] LOG:  database system was shut down at 2019-06-24 21:35:56 UTC
2019-06-24 21:35:56.651 UTC [30] LOG:  database system is ready to accept connections
2019-06-24 21:35:56.652 UTC [37] LOG:  TimescaleDB background worker launcher connected to shared catalogs
 done
server started

/usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/000_install_timescaledb.sh
2019-06-24 21:35:56.895 UTC [41] WARNING:
	WELCOME TO
	 _____ _                               _     ____________
	|_   _(_)                             | |    |  _  \ ___ \
	  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ /
	  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \
	  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
	  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
	               Running version 1.3.2
	For more information on TimescaleDB, please visit the following links:

	 1. Getting started: https://docs.timescale.com/getting-started
	 2. API reference documentation: https://docs.timescale.com/api
	 3. How TimescaleDB is designed: https://docs.timescale.com/introduction/architecture

	Note: TimescaleDB collects anonymous reports to better understand and assist our users.
	For more information and how to disable, please see our docs https://docs.timescaledb.com/using-timescaledb/telemetry.

2019-06-24 21:35:56.895 UTC [41] CONTEXT:  PL/pgSQL function inline_code_block line 23 at RAISE
WARNING:
WELCOME TO
 _____ _                               _     ____________
|_   _(_)                             | |    |  _  \ ___ \
  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ /
  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \
  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
               Running version 1.3.2
For more information on TimescaleDB, please visit the following links:

 1. Getting started: https://docs.timescale.com/getting-started
 2. API reference documentation: https://docs.timescale.com/api
 3. How TimescaleDB is designed: https://docs.timescale.com/introduction/architecture

Note: TimescaleDB collects anonymous reports to better understand and assist our users.
For more information and how to disable, please see our docs https://docs.timescaledb.com/using-timescaledb/telemetry.

CREATE EXTENSION
2019-06-24 21:35:57.089 UTC [45] WARNING:
	WELCOME TO
	 _____ _                               _     ____________
	|_   _(_)                             | |    |  _  \ ___ \
	  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ /
	  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \
	  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
	  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
	               Running version 1.3.2
	For more information on TimescaleDB, please visit the following links:

	 1. Getting started: https://docs.timescale.com/getting-started
	 2. API reference documentation: https://docs.timescale.com/api
	 3. How TimescaleDB is designed: https://docs.timescale.com/introduction/architecture

WARNING:
WELCOME TO
 _____ _                               _     ____________
|_   _(_)                             | |    |  _  \ ___ \
  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ /
  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \
  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
               Running version 1.3.2
For more information on TimescaleDB, please visit the following links:

 1. Getting started: https://docs.timescale.com/getting-started
 2. API reference documentation: https://docs.timescale.com/api
 3. How TimescaleDB is designed: https://docs.timescale.com/introduction/architecture

Note: TimescaleDB collects anonymous reports to better understand and assist our users.
	Note: TimescaleDB collects anonymous reports to better understand and assist our users.
	For more information and how to disable, please see our docs https://docs.timescaledb.com/using-timescaledb/telemetry.

2019-06-24 21:35:57.089 UTC [45] CONTEXT:  PL/pgSQL function inline_code_block line 23 at RAISE
For more information and how to disable, please see our docs https://docs.timescaledb.com/using-timescaledb/telemetry.

2019-06-24 21:35:57.095 UTC [46] ERROR:  TimescaleDB background worker connected to template database, exiting
CREATE EXTENSION

/usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/001_reenable_auth.sh
2019-06-24 21:35:57.097 UTC [30] LOG:  background worker "TimescaleDB Background Worker Scheduler" (PID 46) exited with exit code 1

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/002_timescaledb_tune.sh
Using postgresql.conf at this path:
/var/lib/postgresql/data/postgresql.conf

Writing backup to:
/tmp/timescaledb_tune.backup201906242135

Recommendations based on 1.95 GB of available memory and 2 CPUs for PostgreSQL 11
shared_buffers = 511759kB
effective_cache_size = 1499MB
maintenance_work_mem = 255879kB
work_mem = 2558kB
timescaledb.max_background_workers = 8
max_worker_processes = 13
max_parallel_workers_per_gather = 1
max_parallel_workers = 2
wal_buffers = 15352kB
min_wal_size = 4GB
max_wal_size = 8GB
default_statistics_target = 500
random_page_cost = 1.1
checkpoint_completion_target = 0.9
max_locks_per_transaction = 64
effective_io_concurrency = 200
timescaledb.last_tuned = '2019-06-24T21:35:57Z'
timescaledb.last_tuned_version = '0.6.0'
Saving changes to: /var/lib/postgresql/data/postgresql.conf

waiting for server to shut down....2019-06-24 21:35:57.122 UTC [30] LOG:  received fast shutdown request
2019-06-24 21:35:57.125 UTC [30] LOG:  aborting any active transactions
2019-06-24 21:35:57.126 UTC [37] LOG:  terminating TimescaleDB background worker launcher due to administrator command
2019-06-24 21:35:57.126 UTC [42] LOG:  terminating TimescaleDB job scheduler due to administrator command
2019-06-24 21:35:57.126 UTC [42] FATAL:  terminating connection due to administrator command
2019-06-24 21:35:57.126 UTC [37] FATAL:  terminating connection due to administrator command
2019-06-24 21:35:57.128 UTC [30] LOG:  background worker "TimescaleDB Background Worker Launcher" (PID 37) exited with exit code 1
2019-06-24 21:35:57.128 UTC [30] LOG:  background worker "logical replication launcher" (PID 38) exited with exit code 1
2019-06-24 21:35:57.128 UTC [30] LOG:  background worker "TimescaleDB Background Worker Scheduler" (PID 42) exited with exit code 1
2019-06-24 21:35:57.128 UTC [32] LOG:  shutting down
2019-06-24 21:35:57.216 UTC [30] LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

2019-06-24 21:35:57.231 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2019-06-24 21:35:57.231 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2019-06-24 21:35:57.236 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-06-24 21:35:57.258 UTC [65] LOG:  database system was shut down at 2019-06-24 21:35:57 UTC
2019-06-24 21:35:57.262 UTC [1] LOG:  database system is ready to accept connections
2019-06-24 21:35:57.265 UTC [71] LOG:  TimescaleDB background worker launcher connected to shared catalogs

@andylamp
Copy link

this is the output of docker logs container_id --tail all, with container_id being the hash for the timescaledb image that is currently loaded.

2019-06-24 21:45:02.118 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2019-06-24 21:45:02.118 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2019-06-24 21:45:02.124 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-06-24 21:45:02.143 UTC [18] LOG:  database system was interrupted; last known up at 2019-06-24 21:32:17 UTC
2019-06-24 21:45:02.570 UTC [18] LOG:  database system was not properly shut down; automatic recovery in progress
2019-06-24 21:45:02.573 UTC [18] LOG:  redo starts at 0/1E450B8
2019-06-24 21:45:02.573 UTC [18] LOG:  invalid record length at 0/1E45198: wanted 24, got 0
2019-06-24 21:45:02.573 UTC [18] LOG:  redo done at 0/1E45160
2019-06-24 21:45:02.589 UTC [1] LOG:  database system is ready to accept connections
2019-06-24 21:45:03.027 UTC [25] LOG:  incomplete startup packet
2019-06-24 21:45:43.233 UTC [29] FATAL:  extension "timescaledb" must be preloaded
2019-06-24 21:45:43.233 UTC [29] HINT:  Please preload the timescaledb library via shared_preload_libraries.
	
	This can be done by editing the config file at: /var/lib/postgresql/data/postgresql.conf
	and adding 'timescaledb' to the list in the shared_preload_libraries config.
		# Modify postgresql.conf:
		shared_preload_libraries = 'timescaledb'
	
	Another way to do this, if not preloading other libraries, is with the command:
		echo "shared_preload_libraries = 'timescaledb'" >> /var/lib/postgresql/data/postgresql.conf 
	
	(Will require a database restart.)
	
	If you REALLY know what you are doing and would like to load the library without preloading, you can disable this check with: 
		SET timescaledb.allow_install_without_preload = 'on';
2019-06-24 21:45:43.233 UTC [29] STATEMENT:  CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE

@RobAtticus
Copy link
Member

Are you trying to run it from a volume that already exists? I wonder the volume got into a bad state when you tried with a broken Docker image and now it can't start correctly (it looks like its recovering rather than starting from a clean volume).

@andylamp
Copy link

@RobAtticus aha - missed that bit; had to delete the volume entirely do make this work. Thought the image would copy the "new" .conf file but alas this was not the case.

it would be awesome to have this documented somewhere - that existing volumes would need to be cleared or a way to "copy" the new config to them!

Thanks for the super fast replies!

@RobAtticus
Copy link
Member

No worries, hopefully that works for @DanielJoyce too. We'll work on documenting or improving that flow

@Antiarchitect
Copy link

Let me please refresh this issue:
PostgreSQL 11.6
TimescaleDB 1.6.0

This problem occurs in my CI/CD pipelines in one case on a hundred or so. Here are the full logs:

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... Etc/UTC
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

waiting for server to start....2020-04-03 08:58:31.222 UTC [48] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-04-03 08:58:31.237 UTC [49] LOG:  database system was shut down at 2020-04-03 08:58:31 UTC
2020-04-03 08:58:31.241 UTC [48] LOG:  database system is ready to accept connections
2020-04-03 08:58:31.242 UTC [55] LOG:  TimescaleDB background worker launcher connected to shared catalogs
 done
server started

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/install_timescaledb.sh
2020-04-03 08:58:31.546 UTC [70] WARNING:  
	WELCOME TO
	 _____ _                               _     ____________  
	|_   _(_)                             | |    |  _  \ ___ \ 
	  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ / 
	  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \ 
	  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
	  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
	               Running version 1.6.0
	For more information on TimescaleDB, please visit the following links:
	
	 1. Getting started: https://docs.timescale.com/getting-started
	 2. API reference documentation: https://docs.timescale.com/api
	 3. How TimescaleDB is designed: https://docs.timescale.com/introduction/architecture
	
	Note: TimescaleDB collects anonymous reports to better understand and assist our users.
	For more information and how to disable, please see our docs https://docs.timescaledb.com/using-timescaledb/telemetry.
	
2020-04-03 08:58:31.546 UTC [70] CONTEXT:  PL/pgSQL function inline_code_block line 23 at RAISE
CREATE EXTENSION
2020-04-03 08:58:31.765 UTC [84] WARNING:  
	WELCOME TO
	 _____ _                               _     ____________  
	|_   _(_)                             | |    |  _  \ ___ \ 
	  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ / 
	  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \ 
	  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
	  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
	               Running version 1.6.0
	For more information on TimescaleDB, please visit the following links:
	
	 1. Getting started: https://docs.timescale.com/getting-started
	 2. API reference documentation: https://docs.timescale.com/api
	 3. How TimescaleDB is designed: https://docs.timescale.com/introduction/architecture
	
	Note: TimescaleDB collects anonymous reports to better understand and assist our users.
	For more information and how to disable, please see our docs https://docs.timescaledb.com/using-timescaledb/telemetry.
	
2020-04-03 08:58:31.765 UTC [84] CONTEXT:  PL/pgSQL function inline_code_block line 23 at RAISE
CREATE EXTENSION
2020-04-03 08:58:31.766 UTC [85] ERROR:  TimescaleDB background worker connected to template database, exiting
2020-04-03 08:58:31.766 UTC [73] WARNING:  telemetry could not connect to "telemetry.timescale.com"
2020-04-03 08:58:31.766 UTC [73] DETAIL:  SSL error want read

2020-04-03 08:58:31.768 UTC [48] LOG:  background worker "TimescaleDB Background Worker Scheduler" (PID 85) exited with exit code 1
2020-04-03 08:58:31.769 UTC [48] LOG:  received fast shutdown request
waiting for server to shut down....2020-04-03 08:58:31.770 UTC [48] LOG:  aborting any active transactions
2020-04-03 08:58:31.770 UTC [55] LOG:  terminating TimescaleDB background worker launcher due to administrator command
2020-04-03 08:58:31.770 UTC [71] LOG:  terminating TimescaleDB job scheduler due to administrator command
2020-04-03 08:58:31.770 UTC [71] FATAL:  terminating connection due to administrator command
2020-04-03 08:58:31.770 UTC [55] FATAL:  terminating connection due to administrator command
2020-04-03 08:58:31.771 UTC [48] LOG:  background worker "logical replication launcher" (PID 56) exited with exit code 1
2020-04-03 08:58:31.772 UTC [48] LOG:  background worker "TimescaleDB Background Worker Launcher" (PID 55) exited with exit code 1
........................................................... failed

The initialization script is:

#!/bin/bash

TS_TELEMETRY="basic"
if [ "$TIMESCALEDB_TELEMETRY" == "off" ]; then
	TS_TELEMETRY="off"
fi

echo "timescaledb.telemetry_level=$TS_TELEMETRY" >> "$PGDATA/postgresql.conf"

# create extension timescaledb in initial databases
psql -U "$POSTGRES_USER" postgres -c "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;"
psql -U "$POSTGRES_USER" template1 -c "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;"

if [ "$POSTGRES_DB" != "postgres" ]; then
  psql -U "$POSTGRES_USER" "$POSTGRES_DB" -c "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;"
fi

Docker compose config slice:

  timescaledb-test:
    image: private.acme.com/timescaledb-development:pg-11.6-timescale-1.6.0
    environment:
      TIMESCALEDB_TELEMETRY: "off"
    env_file:
      - config/k8s_test.env
    command: 'postgres -cshared_preload_libraries=timescaledb'
    volumes:
      - type: tmpfs
        target: /var/lib/postgresql/data

And the docker-compose run command:

docker-compose -f "$DOCKER_COMPOSE_FILE" -p "${CI_JOB_ID}-${SERVICE}" up --abort-on-container-exit --force-recreate --renew-anon-volumes --exit-code-from "$SERVICE" "$SERVICE"

@Antiarchitect
Copy link

These are from PostgreSQL 11.7 and timescaledb 1.6.1:

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... Etc/UTC
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

waiting for server to start....2020-04-03 11:44:34.506 UTC [49] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-04-03 11:44:34.519 UTC [50] LOG:  database system was shut down at 2020-04-03 11:44:34 UTC
2020-04-03 11:44:34.524 UTC [49] LOG:  database system is ready to accept connections
2020-04-03 11:44:34.525 UTC [56] LOG:  TimescaleDB background worker launcher connected to shared catalogs
 done
server started

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/install_timescaledb.sh
2020-04-03 11:44:34.861 UTC [71] WARNING:  
	WELCOME TO
	 _____ _                               _     ____________  
	|_   _(_)                             | |    |  _  \ ___ \ 
	  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ / 
	  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \ 
	  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
	  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
	               Running version 1.6.1
	For more information on TimescaleDB, please visit the following links:
	
	 1. Getting started: https://docs.timescale.com/getting-started
	 2. API reference documentation: https://docs.timescale.com/api
	 3. How TimescaleDB is designed: https://docs.timescale.com/introduction/architecture
	
	Note: TimescaleDB collects anonymous reports to better understand and assist our users.
	For more information and how to disable, please see our docs https://docs.timescaledb.com/using-timescaledb/telemetry.
	
2020-04-03 11:44:34.861 UTC [71] CONTEXT:  PL/pgSQL function inline_code_block line 23 at RAISE
CREATE EXTENSION

2020-04-03 11:44:34.866 UTC [49] LOG:  received fast shutdown request
waiting for server to shut down....2020-04-03 11:44:34.866 UTC [49] LOG:  aborting any active transactions
2020-04-03 11:44:34.866 UTC [72] LOG:  terminating TimescaleDB scheduler entrypoint due to administrator command
2020-04-03 11:44:34.866 UTC [56] LOG:  terminating TimescaleDB background worker launcher due to administrator command
2020-04-03 11:44:34.867 UTC [56] FATAL:  terminating connection due to administrator command
2020-04-03 11:44:34.868 UTC [49] LOG:  background worker "logical replication launcher" (PID 57) exited with exit code 1
2020-04-03 11:44:34.869 UTC [49] LOG:  background worker "TimescaleDB Background Worker Launcher" (PID 56) exited with exit code 1
........................................................... failed

@Antiarchitect
Copy link

so the problem is

2020-04-03 11:44:34.866 UTC [49] LOG:  received fast shutdown request
waiting for server to shut down ... failed
pg_ctl: server does not shut down

What could it possibly be?

@mingan
Copy link

mingan commented Jun 5, 2020

I'm totally new to TimescaleDB but trying to run the Docker version seems to end the same way as described above:

docker run --rm --name timescaledb2 -p 5432:5432 -e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg12
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... sh: locale: not found
2020-06-05 18:24:06.914 UTC [29] WARNING:  no usable system locales were found
ok
syncing data to disk ... initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
ok


Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

waiting for server to start....2020-06-05 18:24:07.490 UTC [34] LOG:  starting PostgreSQL 12.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.2.0) 9.2.0, 64-bit
2020-06-05 18:24:07.493 UTC [34] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-06-05 18:24:07.516 UTC [35] LOG:  database system was shut down at 2020-06-05 18:24:07 UTC
2020-06-05 18:24:07.521 UTC [34] LOG:  database system is ready to accept connections
2020-06-05 18:24:07.523 UTC [41] LOG:  TimescaleDB background worker launcher connected to shared catalogs
 done
server started

/usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/000_install_timescaledb.sh
2020-06-05 18:24:07.844 UTC [45] WARNING:  
	WELCOME TO
	 _____ _                               _     ____________  
	|_   _(_)                             | |    |  _  \ ___ \ 
	  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ / 
	  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \ 
	  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
	  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
	               Running version 1.7.1
	For more information on TimescaleDB, please visit the following links:
	
	 1. Getting started: https://docs.timescale.com/getting-started
	 2. API reference documentation: https://docs.timescale.com/api
	 3. How TimescaleDB is designed: https://docs.timescale.com/introduction/architecture
	
	Note: TimescaleDB collects anonymous reports to better understand and assist our users.
	For more information and how to disable, please see our docs https://docs.timescaledb.com/using-timescaledb/telemetry.
	
2020-06-05 18:24:07.844 UTC [45] CONTEXT:  PL/pgSQL function inline_code_block line 23 at RAISE
WARNING:  
WELCOME TO
 _____ _                               _     ____________  
|_   _(_)                             | |    |  _  \ ___ \ 
  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ / 
  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \ 
  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
               Running version 1.7.1
For more information on TimescaleDB, please visit the following links:

 1. Getting started: https://docs.timescale.com/getting-started
 2. API reference documentation: https://docs.timescale.com/api
 3. How TimescaleDB is designed: https://docs.timescale.com/introduction/architecture

Note: TimescaleDB collects anonymous reports to better understand and assist our users.
For more information and how to disable, please see our docs https://docs.timescaledb.com/using-timescaledb/telemetry.

CREATE EXTENSION
2020-06-05 18:24:08.138 UTC [48] WARNING:  
	WELCOME TO
	 _____ _                               _     ____________  
	|_   _(_)                             | |    |  _  \ ___ \ 
	  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ / 
	  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \ 
	  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
	  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
	               Running version 1.7.1
	For more information on TimescaleDB, please visit the following links:
	
	 1. Getting started: https://docs.timescale.com/getting-started
	 2. API reference documentation: https://docs.timescale.com/api
	 3. How TimescaleDB is designed: https://docs.timescale.com/introduction/architecture
	
	Note: TimescaleDB collects anonymous reports to better understand and assist our users.
	For more information and how to disable, please see our docs https://docs.timescaledb.com/using-timescaledb/telemetry.
	
2020-06-05 18:24:08.138 UTC [48] CONTEXT:  PL/pgSQL function inline_code_block line 23 at RAISE
WARNING:  
WELCOME TO
 _____ _                               _     ____________  
|_   _(_)                             | |    |  _  \ ___ \ 
  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ / 
  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \ 
  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
               Running version 1.7.1
For more information on TimescaleDB, please visit the following links:

 1. Getting started: https://docs.timescale.com/getting-started
 2. API reference documentation: https://docs.timescale.com/api
 3. How TimescaleDB is designed: https://docs.timescale.com/introduction/architecture

Note: TimescaleDB collects anonymous reports to better understand and assist our users.
For more information and how to disable, please see our docs https://docs.timescaledb.com/using-timescaledb/telemetry.

2020-06-05 18:24:08.142 UTC [49] WARNING:  telemetry could not connect to "telemetry.timescale.com"
2020-06-05 18:24:08.142 UTC [49] DETAIL:  SSL error want read
2020-06-05 18:24:08.142 UTC [50] ERROR:  TimescaleDB background worker connected to template database, exiting
CREATE EXTENSION

/usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/001_reenable_auth.sh
2020-06-05 18:24:08.143 UTC [34] LOG:  background worker "TimescaleDB Background Worker Scheduler" (PID 50) exited with exit code 1

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/002_timescaledb_tune.sh
Using postgresql.conf at this path:
/var/lib/postgresql/data/postgresql.conf

Writing backup to:
/tmp/timescaledb_tune.backup202006051824

Recommendations based on 15.35 GB of available memory and 8 CPUs for PostgreSQL 12
shared_buffers = 3929MB
effective_cache_size = 11789MB
maintenance_work_mem = 1964MB
work_mem = 5030kB
timescaledb.max_background_workers = 8
max_worker_processes = 19
max_parallel_workers_per_gather = 4
max_parallel_workers = 8
wal_buffers = 16MB
min_wal_size = 512MB
default_statistics_target = 500
random_page_cost = 1.1
checkpoint_completion_target = 0.9
max_locks_per_transaction = 128
autovacuum_max_workers = 10
autovacuum_naptime = 10
effective_io_concurrency = 200
timescaledb.last_tuned = '2020-06-05T18:24:08Z'
timescaledb.last_tuned_version = '0.8.1'
Saving changes to: /var/lib/postgresql/data/postgresql.conf

waiting for server to shut down....2020-06-05 18:24:08.162 UTC [34] LOG:  received fast shutdown request
2020-06-05 18:24:08.165 UTC [34] LOG:  aborting any active transactions
2020-06-05 18:24:08.165 UTC [46] LOG:  terminating TimescaleDB job scheduler due to administrator command
2020-06-05 18:24:08.165 UTC [68] FATAL:  terminating autovacuum process due to administrator command
2020-06-05 18:24:08.165 UTC [46] FATAL:  terminating connection due to administrator command
2020-06-05 18:24:08.165 UTC [34] LOG:  background worker "logical replication launcher" (PID 42) exited with exit code 1
2020-06-05 18:24:08.165 UTC [41] LOG:  terminating TimescaleDB background worker launcher due to administrator command
2020-06-05 18:24:08.165 UTC [41] FATAL:  terminating connection due to administrator command
2020-06-05 18:24:08.166 UTC [34] LOG:  background worker "TimescaleDB Background Worker Launcher" (PID 41) exited with exit code 1
2020-06-05 18:24:08.166 UTC [34] LOG:  background worker "TimescaleDB Background Worker Scheduler" (PID 46) exited with exit code 1
2020-06-05 18:24:08.166 UTC [36] LOG:  shutting down
2020-06-05 18:24:08.263 UTC [34] LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

2020-06-05 18:24:08.392 UTC [1] LOG:  starting PostgreSQL 12.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.2.0) 9.2.0, 64-bit
2020-06-05 18:24:08.394 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2020-06-05 18:24:08.394 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2020-06-05 18:24:08.401 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-06-05 18:24:08.481 UTC [70] LOG:  database system was shut down at 2020-06-05 18:24:08 UTC
2020-06-05 18:24:08.493 UTC [1] LOG:  database system is ready to accept connections
2020-06-05 18:24:08.497 UTC [76] LOG:  TimescaleDB background worker launcher connected to shared catalogs
^C2020-06-05 18:24:11.600 UTC [1] LOG:  received fast shutdown request
2020-06-05 18:24:11.602 UTC [1] LOG:  aborting any active transactions
2020-06-05 18:24:11.602 UTC [76] LOG:  terminating TimescaleDB background worker launcher due to administrator command
2020-06-05 18:24:11.602 UTC [78] LOG:  terminating TimescaleDB job scheduler due to administrator command
2020-06-05 18:24:11.602 UTC [76] FATAL:  terminating connection due to administrator command
2020-06-05 18:24:11.602 UTC [78] FATAL:  terminating connection due to administrator command
2020-06-05 18:24:11.602 UTC [78] LOG:  terminating TimescaleDB job scheduler due to administrator command
2020-06-05 18:24:11.603 UTC [1] LOG:  background worker "logical replication launcher" (PID 77) exited with exit code 1
2020-06-05 18:24:11.603 UTC [1] LOG:  background worker "TimescaleDB Background Worker Launcher" (PID 76) exited with exit code 1
2020-06-05 18:24:11.604 UTC [1] LOG:  background worker "TimescaleDB Background Worker Scheduler" (PID 78) exited with exit code 1

@mingan
Copy link

mingan commented Nov 3, 2020

As an update, I can run 1.7.4, get similar output ending with

waiting for server to shut down....2020-11-03 20:38:53.039 UTC [34] LOG:  received fast shutdown request
2020-11-03 20:38:53.049 UTC [34] LOG:  aborting any active transactions
2020-11-03 20:38:53.049 UTC [48] LOG:  terminating TimescaleDB job scheduler due to administrator command
2020-11-03 20:38:53.049 UTC [60] FATAL:  terminating autovacuum process due to administrator command
2020-11-03 20:38:53.049 UTC [41] LOG:  terminating TimescaleDB background worker launcher due to administrator command
2020-11-03 20:38:53.049 UTC [41] FATAL:  terminating connection due to administrator command
2020-11-03 20:38:53.049 UTC [48] FATAL:  terminating connection due to administrator command
2020-11-03 20:38:53.050 UTC [34] LOG:  background worker "TimescaleDB Background Worker Launcher" (PID 41) exited with exit code 1
2020-11-03 20:38:53.050 UTC [34] LOG:  background worker "logical replication launcher" (PID 42) exited with exit code 1
2020-11-03 20:38:53.050 UTC [48] LOG:  terminating TimescaleDB job scheduler due to administrator command
2020-11-03 20:38:53.052 UTC [34] LOG:  background worker "TimescaleDB Background Worker Scheduler" (PID 48) exited with exit code 1
2020-11-03 20:38:53.052 UTC [36] LOG:  shutting down
2020-11-03 20:38:53.116 UTC [34] LOG:  database system is shut down
 done
server stopped

but it is followed by

PostgreSQL init process complete; ready for start up.

2020-11-03 20:42:23.054 UTC [1] LOG:  starting PostgreSQL 12.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.3.0) 9.3.0, 64-bit
2020-11-03 20:42:23.055 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2020-11-03 20:42:23.055 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2020-11-03 20:42:23.061 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-11-03 20:42:23.146 UTC [70] LOG:  database system was shut down at 2020-11-03 20:42:22 UTC
2020-11-03 20:42:23.153 UTC [1] LOG:  database system is ready to accept connections
2020-11-03 20:42:23.154 UTC [76] LOG:  TimescaleDB background worker launcher connected to shared catalogs

and when I connect to the database and follow https://docs.timescale.com/latest/getting-started/creating-hypertables, it works 🎉. Running on Fedora.

Replicated on a colleague's computer (Mac) with the same result.

The output looks like something weird is going on (it is first stopped but then starts up again) but the end result seems to be ok, so solved? 🤷‍♂️

@cserb
Copy link

cserb commented Jul 12, 2021

Same issue as @mingan and @Antiarchitect trying to deploy on AWS ECS

@NunoFilipeSantos
Copy link

@DanielJoyce can you please try with our latest TimescaleDB 2.4.2 (PG 12 or PG13) and get back to us?

@NunoFilipeSantos
Copy link

@cserb which TimescaleDB and PostgreSQL version are you using?

@camille-vanhoffelen
Copy link

@NunoFilipeSantos I'm getting the same weird output as @mingan with timescale/timescaledb:2.4.2-pg13

@akuzm
Copy link
Member

akuzm commented Oct 28, 2021

Seems to run normally for me with the docker run command mentioned above:
docker run --rm --name timescaledb2 -p 5432:5432 -e POSTGRES_PASSWORD=password

click for log
timescale/timescaledb:latest-pg12
Unable to find image 'timescale/timescaledb:latest-pg12' locally
latest-pg12: Pulling from timescale/timescaledb
a0d0a0d46f8b: Pull complete 
5034a66b99e6: Pull complete 
82e9eb77798b: Pull complete 
57a44591d957: Pull complete 
b1c9e53bf891: Pull complete 
3783fb52ad9d: Pull complete 
5a73087232a9: Pull complete 
7ee8590ba756: Pull complete 
5b1abdd5c759: Pull complete 
ee8be0fbe020: Pull complete 
9255f7862f39: Pull complete 
588499bb605e: Pull complete 
bf7f4fc4fd91: Pull complete 
Digest: sha256:2d62a4968bc3a7eefd46c5ca7505a501301d1e8988eadca0115621a5647b98f7
Status: Downloaded newer image for timescale/timescaledb:latest-pg12
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... sh: locale: not found
2021-10-28 09:26:21.351 UTC [30] WARNING:  no usable system locales were found
ok
syncing data to disk ... ok


Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
waiting for server to start....2021-10-28 09:26:24.079 UTC [36] LOG:  starting PostgreSQL 12.8 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit
2021-10-28 09:26:24.082 UTC [36] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2021-10-28 09:26:24.114 UTC [37] LOG:  database system was shut down at 2021-10-28 09:26:22 UTC
2021-10-28 09:26:24.120 UTC [36] LOG:  database system is ready to accept connections
2021-10-28 09:26:24.125 UTC [43] LOG:  TimescaleDB background worker launcher connected to shared catalogs
 done
server started

/usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/000_install_timescaledb.sh
2021-10-28 09:26:24.760 UTC [52] WARNING:  
	WELCOME TO
	 _____ _                               _     ____________  
	|_   _(_)                             | |    |  _  \ ___ \ 
	  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ / 
	  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \ 
	  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
	  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
	               Running version 2.5.0
	For more information on TimescaleDB, please visit the following links:
	
	 1. Getting started: https://docs.timescale.com/timescaledb/latest/getting-started
	 2. API reference documentation: https://docs.timescale.com/api/latest
	 3. How TimescaleDB is designed: https://docs.timescale.com/timescaledb/latest/overview/core-concepts
	
	Note: TimescaleDB collects anonymous reports to better understand and assist our users.
	For more information and how to disable, please see our docs https://docs.timescale.com/timescaledb/latest/how-to-guides/configuration/telemetry.
	
2021-10-28 09:26:24.760 UTC [52] CONTEXT:  PL/pgSQL function inline_code_block line 12 at RAISE
psql:/tmp/tmp.PaJkml:1: WARNING:  
WELCOME TO
 _____ _                               _     ____________  
|_   _(_)                             | |    |  _  \ ___ \ 
  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ / 
  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \ 
  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
               Running version 2.5.0
For more information on TimescaleDB, please visit the following links:

 1. Getting started: https://docs.timescale.com/timescaledb/latest/getting-started
 2. API reference documentation: https://docs.timescale.com/api/latest
 3. How TimescaleDB is designed: https://docs.timescale.com/timescaledb/latest/overview/core-concepts

Note: TimescaleDB collects anonymous reports to better understand and assist our users.
For more information and how to disable, please see our docs https://docs.timescale.com/timescaledb/latest/how-to-guides/configuration/telemetry.

CREATE EXTENSION
2021-10-28 09:26:25.311 UTC [55] WARNING:  
	WELCOME TO
	 _____ _                               _     ____________  
	|_   _(_)                             | |    |  _  \ ___ \ 
	  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ / 
	  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \ 
	  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
	  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
	               Running version 2.5.0
	For more information on TimescaleDB, please visit the following links:
	
	 1. Getting started: https://docs.timescale.com/timescaledb/latest/getting-started
	 2. API reference documentation: https://docs.timescale.com/api/latest
	 3. How TimescaleDB is designed: https://docs.timescale.com/timescaledb/latest/overview/core-concepts
	
	Note: TimescaleDB collects anonymous reports to better understand and assist our users.
	For more information and how to disable, please see our docs https://docs.timescale.com/timescaledb/latest/how-to-guides/configuration/telemetry.
	
2021-10-28 09:26:25.311 UTC [55] CONTEXT:  PL/pgSQL function inline_code_block line 12 at RAISE
psql:/tmp/tmp.PaJkml:1: WARNING:  
WELCOME TO
 _____ _                               _     ____________  
|_   _(_)                             | |    |  _  \ ___ \ 
  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ / 
  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \ 
  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
               Running version 2.5.0
For more information on TimescaleDB, please visit the following links:

 1. Getting started: https://docs.timescale.com/timescaledb/latest/getting-started
 2. API reference documentation: https://docs.timescale.com/api/latest
 3. How TimescaleDB is designed: https://docs.timescale.com/timescaledb/latest/overview/core-concepts

Note: TimescaleDB collects anonymous reports to better understand and assist our users.
For more information and how to disable, please see our docs https://docs.timescale.com/timescaledb/latest/how-to-guides/configuration/telemetry.

2021-10-28 09:26:25.322 UTC [58] ERROR:  TimescaleDB background worker connected to template database, exiting
CREATE EXTENSION

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/001_timescaledb_tune.sh
2021-10-28 09:26:25.324 UTC [36] LOG:  background worker "TimescaleDB Background Worker Scheduler" (PID 58) exited with exit code 1
Using postgresql.conf at this path:
/var/lib/postgresql/data/postgresql.conf

Writing backup to:
/tmp/timescaledb_tune.backup202110280926

Recommendations based on 11.58 GB of available memory and 8 CPUs for PostgreSQL 12
shared_buffers = 2965MB
effective_cache_size = 8895MB
maintenance_work_mem = 1482MB
work_mem = 3795kB
timescaledb.max_background_workers = 8
max_worker_processes = 19
max_parallel_workers_per_gather = 4
max_parallel_workers = 8
wal_buffers = 16MB
min_wal_size = 512MB
default_statistics_target = 500
random_page_cost = 1.1
checkpoint_completion_target = 0.9
max_locks_per_transaction = 128
autovacuum_max_workers = 10
autovacuum_naptime = 10
effective_io_concurrency = 200
timescaledb.last_tuned = '2021-10-28T09:26:25Z'
timescaledb.last_tuned_version = '0.12.0'
Saving changes to: /var/lib/postgresql/data/postgresql.conf

waiting for server to shut down...2021-10-28 09:26:25.386 UTC [36] LOG:  received fast shutdown request
.2021-10-28 09:26:25.389 UTC [36] LOG:  aborting any active transactions
2021-10-28 09:26:25.389 UTC [53] LOG:  terminating TimescaleDB job scheduler due to administrator command
2021-10-28 09:26:25.389 UTC [57] LOG:  terminating TimescaleDB background job "Telemetry Reporter [1]" due to administrator command
terminating TimescaleDB background worker launcher due to administrator command2021-10-28 09:26:25.389 UTC [53] FATAL:  terminating connection due to administrator command
2021-10-28 09:26:25.389 UTC [43] FATAL:  terminating connection due to administrator command
2021-10-28 09:26:25.389 UTC [53] LOG:  terminating TimescaleDB job scheduler due to administrator command
2021-10-28 09:26:25.391 UTC [57] LOG:  terminating TimescaleDB background job "Telemetry Reporter [1]" due to administrator command
2021-10-28 09:26:25.391 UTC [57] FATAL:  terminating connection due to administrator command
2021-10-28 09:26:25.391 UTC [36] LOG:  background worker "TimescaleDB Background Worker Launcher" (PID 43) exited with exit code 1
2021-10-28 09:26:25.391 UTC [36] LOG:  background worker "logical replication launcher" (PID 44) exited with exit code 1
2021-10-28 09:26:25.392 UTC [36] LOG:  background worker "TimescaleDB Background Worker Scheduler" (PID 53) exited with exit code 1
2021-10-28 09:26:25.393 UTC [36] LOG:  background worker "Telemetry Reporter [1]" (PID 57) exited with exit code 1
2021-10-28 09:26:25.394 UTC [38] LOG:  shutting down
2021-10-28 09:26:25.464 UTC [36] LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

2021-10-28 09:26:25.506 UTC [1] LOG:  starting PostgreSQL 12.8 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit
2021-10-28 09:26:25.506 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2021-10-28 09:26:25.506 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2021-10-28 09:26:25.511 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2021-10-28 09:26:25.650 UTC [76] LOG:  database system was shut down at 2021-10-28 09:26:25 UTC
2021-10-28 09:26:25.659 UTC [1] LOG:  database system is ready to accept connections
2021-10-28 09:26:25.663 UTC [82] LOG:  TimescaleDB background worker launcher connected to shared catalogs

One difference I see in the log is "could not connect to telemetry.timescale.com". Tried setting it to 127.0.0.1 in hosts, or using --network none docker option, I get no message and postgres still doesn't terminate.

@akuzm
Copy link
Member

akuzm commented Oct 28, 2021

What's the exact image hash you're using that gives this error? Mine w/o error was 2d62a4968bc3a7eefd46c5ca7505a501301d1e8988eadca0115621a5647b98f7

@camille-vanhoffelen
Copy link

@akuzm I get the similar logs to you and @mingan above. The database seems functional, but is the following ERROR log considered normal?

2021-10-28 09:26:25.322 UTC [58] ERROR:  TimescaleDB background worker connected to template database, exiting
CREATE EXTENSION

@akuzm
Copy link
Member

akuzm commented Oct 28, 2021

@akuzm I get the similar logs to you and @mingan above. The database seems functional, but is the following ERROR log considered normal?

2021-10-28 09:26:25.322 UTC [58] ERROR:  TimescaleDB background worker connected to template database, exiting
CREATE EXTENSION

Safe to ignore, but we could probably improve it. I created an issue: #170

@NunoFilipeSantos
Copy link

Hi! What's the exact image hash you're using that gives this error?

@NunoFilipeSantos
Copy link

Closing. You can follow the progress on #170. Thank you everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants