Repository: thingsboard/thingsboard

Issue #4924: [Bug] org.postgresql.util.PSQLException: The connection attempt failed.
Created: 2021-07-17T14:01:06Z
Describe the bug
A clear and concise description of what the bug is.
When I run “./docker-install-tb.sh –loadDemo”  reference  https://thingsboard.io/docs/user-guide/install/cluster/docker-compose-setup/  . There it is  "org.postgresql.util.PSQLException: The connection attempt failed."
The details are as follows：
$ ./docker-install-tb.sh –loadDemo
Creating network "docker_default" with the default driver
Creating docker_redis_1 ...
Creating docker_postgres_1 ...
Creating docker_redis_1    ... done
Creating docker_postgres_1 ... done
Creating docker_tb-core1_run ...
Creating docker_tb-core1_run ... done
Starting ThingsBoard installation ...
13:51:17,248 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
13:51:17,250 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
13:51:17,251 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/config/logback.xml]
13:51:17,254 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
13:51:17,254 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/usr/share/thingsboard/conf/logback.xml]
13:51:17,254 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/config/logback.xml]
13:51:17,584 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
13:51:17,618 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Will scan for changes in [file:/config/logback.xml]
13:51:17,618 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeTask scanning period to 10 seconds
13:51:17,628 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
13:51:17,651 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [fileLogAppender]
13:51:17,697 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1211076369 - setting totalSizeCap to 3 GB
13:51:17,717 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1211076369 - Archive files will be limited to [100 MB] each.
13:51:17,814 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1211076369 - No compression will be used
13:51:17,821 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1211076369 - Will use the pattern /var/log/thingsboard/tb-core1/thingsboard.%d{yyyy-MM-dd}.%i.log for the active file
13:51:17,829 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1593948d - The date pattern is 'yyyy-MM-dd' from file name pattern '/var/log/thingsboard/tb-core1/thingsboard.%d{yyyy-MM-dd}.%i.log'.
13:51:17,829 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1593948d - Roll-over at midnight.
13:51:17,838 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1593948d - Setting initial period to Sat Jul 17 05:30:02 UTC 2021
13:51:17,848 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
13:51:17,948 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] - Active log file name: /var/log/thingsboard/tb-core1/thingsboard.log
13:51:17,948 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] - File property is set to [/var/log/thingsboard/tb-core1/thingsboard.log]
13:51:17,952 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
13:51:17,958 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
13:51:17,958 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
13:51:17,963 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.thingsboard.server] to INFO
13:51:17,963 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.google.common.util.concurrent.AggregateFuture] to OFF
13:51:17,963 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
13:51:17,963 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [fileLogAppender] to Logger[ROOT]
13:51:17,965 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
13:51:17,965 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
13:51:17,966 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@1b604f19 - Registering current configuration as safe fallback point
===================================================
:: ThingsBoard ::       (v3.2.2)
Starting ThingsBoard Installation...
Installing DataBase schema for entities...
Installing SQL DataBase schema part: schema-entities.sql
Unexpected error during ThingsBoard installation!
org.postgresql.util.PSQLException: The connection attempt failed.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:315)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:51)
at org.postgresql.jdbc.PgConnection.(PgConnection.java:225)
at org.postgresql.Driver.makeConnection(Driver.java:465)
at org.postgresql.Driver.connect(Driver.java:264)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)
at org.thingsboard.server.service.install.SqlAbstractDatabaseSchemaService.createDatabaseSchema(SqlAbstractDatabaseSchemaService.java:66)
at org.thingsboard.server.service.install.SqlAbstractDatabaseSchemaService.createDatabaseSchema(SqlAbstractDatabaseSchemaService.java:57)
at org.thingsboard.server.install.ThingsboardInstallService.performInstall(ThingsboardInstallService.java:210)
at org.thingsboard.server.ThingsboardInstallApplication.main(ThingsboardInstallApplication.java:44)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467)
Caused by: java.net.SocketTimeoutException: connect timed out
at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
at java.base/java.net.Socket.connect(Socket.java:609)
at org.postgresql.core.PGStream.createSocket(PGStream.java:231)
at org.postgresql.core.PGStream.(PGStream.java:95)
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:98)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:213)
... 18 common frames omitted
Unexpected error during ThingsBoard installation!
Your Server Environment


own setup

ThingsBoard Version ：3.2.2
OS Name and Version ：windows10



postgres:12  logs->
2021-07-17 13:51:14.608 UTC [84] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:14.608 UTC [84] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:15.870 UTC [84] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:15.870 UTC [84] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:17.231 UTC [84] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:17.231 UTC [84] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:18.777 UTC [83] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:18.777 UTC [83] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:20.743 UTC [84] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:20.743 UTC [84] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:23.457 UTC [84] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:23.457 UTC [84] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:27.805 UTC [83] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:27.805 UTC [83] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:35.264 UTC [83] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:35.264 UTC [83] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:49.122 UTC [85] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:49.122 UTC [85] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:52:15.750 UTC [83] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:52:15.750 UTC [83] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:53:07.977 UTC [83] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:53:07.977 UTC [83] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
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 ... 20
selecting default shared_buffers ... 400kB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... 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 ... 20
selecting default shared_buffers ... 400kB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... 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 ... 20
selecting default shared_buffers ... 400kB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... 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 ... 20
selecting default shared_buffers ... 400kB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... 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.

Duplicate issue #4925: [Bug] org.postgresql.util.PSQLException: The connection attempt failed.
Created: 2021-07-17T14:08:45Z
Describe the bug
A clear and concise description of what the bug is.
When I run “./docker-install-tb.sh –loadDemo”  reference  https://thingsboard.io/docs/user-guide/install/cluster/docker-compose-setup/  . There it is  "org.postgresql.util.PSQLException: The connection attempt failed."
The details are as follows：
$ ./docker-install-tb.sh –loadDemo
Creating network "docker_default" with the default driver
Creating docker_redis_1 ...
Creating docker_postgres_1 ...
Creating docker_redis_1    ... done
Creating docker_postgres_1 ... done
Creating docker_tb-core1_run ...
Creating docker_tb-core1_run ... done
Starting ThingsBoard installation ...
13:51:17,248 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
13:51:17,250 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
13:51:17,251 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/config/logback.xml]
13:51:17,254 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
13:51:17,254 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/usr/share/thingsboard/conf/logback.xml]
13:51:17,254 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/config/logback.xml]
13:51:17,584 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
13:51:17,618 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Will scan for changes in [file:/config/logback.xml]
13:51:17,618 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeTask scanning period to 10 seconds
13:51:17,628 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
13:51:17,651 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [fileLogAppender]
13:51:17,697 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1211076369 - setting totalSizeCap to 3 GB
13:51:17,717 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1211076369 - Archive files will be limited to [100 MB] each.
13:51:17,814 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1211076369 - No compression will be used
13:51:17,821 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1211076369 - Will use the pattern /var/log/thingsboard/tb-core1/thingsboard.%d{yyyy-MM-dd}.%i.log for the active file
13:51:17,829 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1593948d - The date pattern is 'yyyy-MM-dd' from file name pattern '/var/log/thingsboard/tb-core1/thingsboard.%d{yyyy-MM-dd}.%i.log'.
13:51:17,829 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1593948d - Roll-over at midnight.
13:51:17,838 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1593948d - Setting initial period to Sat Jul 17 05:30:02 UTC 2021
13:51:17,848 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
13:51:17,948 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] - Active log file name: /var/log/thingsboard/tb-core1/thingsboard.log
13:51:17,948 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] - File property is set to [/var/log/thingsboard/tb-core1/thingsboard.log]
13:51:17,952 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
13:51:17,958 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
13:51:17,958 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
13:51:17,963 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.thingsboard.server] to INFO
13:51:17,963 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.google.common.util.concurrent.AggregateFuture] to OFF
13:51:17,963 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
13:51:17,963 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [fileLogAppender] to Logger[ROOT]
13:51:17,965 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
13:51:17,965 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
13:51:17,966 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@1b604f19 - Registering current configuration as safe fallback point
===================================================
:: ThingsBoard ::       (v3.2.2)
Starting ThingsBoard Installation...
Installing DataBase schema for entities...
Installing SQL DataBase schema part: schema-entities.sql
Unexpected error during ThingsBoard installation!
org.postgresql.util.PSQLException: The connection attempt failed.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:315)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:51)
at org.postgresql.jdbc.PgConnection.(PgConnection.java:225)
at org.postgresql.Driver.makeConnection(Driver.java:465)
at org.postgresql.Driver.connect(Driver.java:264)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)
at org.thingsboard.server.service.install.SqlAbstractDatabaseSchemaService.createDatabaseSchema(SqlAbstractDatabaseSchemaService.java:66)
at org.thingsboard.server.service.install.SqlAbstractDatabaseSchemaService.createDatabaseSchema(SqlAbstractDatabaseSchemaService.java:57)
at org.thingsboard.server.install.ThingsboardInstallService.performInstall(ThingsboardInstallService.java:210)
at org.thingsboard.server.ThingsboardInstallApplication.main(ThingsboardInstallApplication.java:44)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467)
Caused by: java.net.SocketTimeoutException: connect timed out
at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
at java.base/java.net.Socket.connect(Socket.java:609)
at org.postgresql.core.PGStream.createSocket(PGStream.java:231)
at org.postgresql.core.PGStream.(PGStream.java:95)
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:98)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:213)
... 18 common frames omitted
Unexpected error during ThingsBoard installation!
Your Server Environment


own setup

ThingsBoard Version ：3.2.2
OS Name and Version ：windows10



postgres:12  logs->
2021-07-17 13:51:14.608 UTC [84] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:14.608 UTC [84] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:15.870 UTC [84] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:15.870 UTC [84] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:17.231 UTC [84] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:17.231 UTC [84] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:18.777 UTC [83] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:18.777 UTC [83] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:20.743 UTC [84] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:20.743 UTC [84] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:23.457 UTC [84] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:23.457 UTC [84] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:27.805 UTC [83] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:27.805 UTC [83] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:35.264 UTC [83] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:35.264 UTC [83] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:51:49.122 UTC [85] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:51:49.122 UTC [85] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:52:15.750 UTC [83] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:52:15.750 UTC [83] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
2021-07-17 13:53:07.977 UTC [83] FATAL: data directory "/var/lib/postgresql/data" has invalid permissions
2021-07-17 13:53:07.977 UTC [83] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
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 ... 20
selecting default shared_buffers ... 400kB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... 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 ... 20
selecting default shared_buffers ... 400kB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... 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 ... 20
selecting default shared_buffers ... 400kB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... 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 ... 20
selecting default shared_buffers ... 400kB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... 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.

Closing comment (2021-07-19T07:26:07Z): Duplicate #4924