pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
initdb fails with error
7+ messages / 5 participants
[nested] [flat]

* initdb fails with error
@ 2021-09-16 11:47  Nikhil Shetty <nikhil.dba04@gmail.com>
  0 siblings, 3 replies; 7+ messages in thread

From: Nikhil Shetty @ 2021-09-16 11:47 UTC (permalink / raw)
  To: pgsql-admin

Hi Team,

I find strange behaviour today when initializing the postgres cluster.

Below is the ERROR :


$$>/usr/pgsql-11/bin/initdb -D /data/postgres/pg11/test -d
Running in debug mode.
The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.

VERSION=11.7
PGDATA=/data/postgres/pg11/test
share_path=/usr/pgsql-11/share
PGPATH=/usr/pgsql-11/bin
POSTGRES_SUPERUSERNAME=postgres
POSTGRES_BKI=/usr/pgsql-11/share/postgres.bki
POSTGRES_DESCR=/usr/pgsql-11/share/postgres.description
POSTGRES_SHDESCR=/usr/pgsql-11/share/postgres.shdescription
POSTGRESQL_CONF_SAMPLE=/usr/pgsql-11/share/postgresql.conf.sample
PG_HBA_SAMPLE=/usr/pgsql-11/share/pg_hba.conf.sample
PG_IDENT_SAMPLE=/usr/pgsql-11/share/pg_ident.conf.sample
The database cluster will be initialized with locale "en_US.UTF-8".
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.

creating directory /data/postgres/pg11/test ... ok
creating subdirectories ... ok
selecting default max_connections ... 20
selecting default shared_buffers ... 400kB
selecting default timezone ... America/Los_Angeles
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... 2021-09-16 11:42:47.944 GMT [24522] FATAL:
 invalid value for parameter "port": ""
child process exited with exit code 1
initdb: removing data directory "/data/postgres/pg11/test"

Any reason why this would be happening?

Thanks,
Nikhil

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: initdb fails with error
@ 2021-09-16 11:50  Jayson Hreczuck <jayson.hreczuck@studentuniverse.com>
  parent: Nikhil Shetty <nikhil.dba04@gmail.com>
  2 siblings, 1 reply; 7+ messages in thread

From: Jayson Hreczuck @ 2021-09-16 11:50 UTC (permalink / raw)
  To: Nikhil Shetty <nikhil.dba04@gmail.com>; +Cc: pgsql-admin

Check your postgresql.conf file and confirm there is an appropriate port
listed.

On Thu, Sep 16, 2021, 7:47 AM Nikhil Shetty <nikhil.dba04@gmail.com> wrote:

> Hi Team,
>
> I find strange behaviour today when initializing the postgres cluster.
>
> Below is the ERROR :
>
>
> $$>/usr/pgsql-11/bin/initdb -D /data/postgres/pg11/test -d
> Running in debug mode.
> The files belonging to this database system will be owned by user
> "postgres".
> This user must also own the server process.
>
> VERSION=11.7
> PGDATA=/data/postgres/pg11/test
> share_path=/usr/pgsql-11/share
> PGPATH=/usr/pgsql-11/bin
> POSTGRES_SUPERUSERNAME=postgres
> POSTGRES_BKI=/usr/pgsql-11/share/postgres.bki
> POSTGRES_DESCR=/usr/pgsql-11/share/postgres.description
> POSTGRES_SHDESCR=/usr/pgsql-11/share/postgres.shdescription
> POSTGRESQL_CONF_SAMPLE=/usr/pgsql-11/share/postgresql.conf.sample
> PG_HBA_SAMPLE=/usr/pgsql-11/share/pg_hba.conf.sample
> PG_IDENT_SAMPLE=/usr/pgsql-11/share/pg_ident.conf.sample
> The database cluster will be initialized with locale "en_US.UTF-8".
> 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.
>
> creating directory /data/postgres/pg11/test ... ok
> creating subdirectories ... ok
> selecting default max_connections ... 20
> selecting default shared_buffers ... 400kB
> selecting default timezone ... America/Los_Angeles
> selecting dynamic shared memory implementation ... posix
> creating configuration files ... ok
> running bootstrap script ... 2021-09-16 11:42:47.944 GMT [24522] FATAL:
>  invalid value for parameter "port": ""
> child process exited with exit code 1
> initdb: removing data directory "/data/postgres/pg11/test"
>
> Any reason why this would be happening?
>
> Thanks,
> Nikhil
>

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: initdb fails with error
@ 2021-09-16 13:14  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Nikhil Shetty <nikhil.dba04@gmail.com>
  2 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2021-09-16 13:14 UTC (permalink / raw)
  To: Nikhil Shetty <nikhil.dba04@gmail.com>; +Cc: pgsql-admin

Nikhil Shetty <nikhil.dba04@gmail.com> writes:
> running bootstrap script ... 2021-09-16 11:42:47.944 GMT [24522] FATAL:
>  invalid value for parameter "port": ""

Perhaps you have an incorrect environment setting for PGPORT ?
I can duplicate that if I run initdb after
export PGPORT=""

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: initdb fails with error
@ 2021-09-16 14:43  Mladen Gogala <gogala.mladen@gmail.com>
  parent: Nikhil Shetty <nikhil.dba04@gmail.com>
  2 siblings, 1 reply; 7+ messages in thread

From: Mladen Gogala @ 2021-09-16 14:43 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

On 9/16/21 07:47, Nikhil Shetty wrote:

> Hi Team,
>
> I find strange behaviour today when initializing the postgres cluster.
>
> Below is the ERROR :
>
> creating configuration files ... ok
> running bootstrap script ... 2021-09-16 11:42:47.944 GMT [24522] 
> FATAL:  invalid value for parameter "port": ""
> child process exited with exit code 1
> initdb: removing data directory "/data/postgres/pg11/test"
>
> Any reason why this would be happening?
>
> Thanks,
> Nikhil


Do you have the local firewall running?

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com






^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: initdb fails with error
@ 2021-09-16 15:08  Holger Jakobs <holger@jakobs.com>
  parent: Mladen Gogala <gogala.mladen@gmail.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Holger Jakobs @ 2021-09-16 15:08 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Firewall may prevent a connection, but not starting is the server. 

The message clearly states that the setting of the port is wrong.

Am 16. September 2021 16:43:04 MESZ schrieb Mladen Gogala <gogala.mladen@gmail.com>:
>On 9/16/21 07:47, Nikhil Shetty wrote:
>
>> Hi Team,
>>
>> I find strange behaviour today when initializing the postgres cluster.
>>
>> Below is the ERROR :
>>
>> creating configuration files ... ok
>> running bootstrap script ... 2021-09-16 11:42:47.944 GMT [24522] 
>> FATAL:  invalid value for parameter "port": ""
>> child process exited with exit code 1
>> initdb: removing data directory "/data/postgres/pg11/test"
>>
>> Any reason why this would be happening?
>>
>> Thanks,
>> Nikhil
>
>
>Do you have the local firewall running?
>

-- 
Holger Jakobs, Bergisch Gladbach
+49 178 9759012
- sent from mobile, therefore short -





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: initdb fails with error
@ 2021-09-17 08:57  Nikhil Shetty <nikhil.dba04@gmail.com>
  parent: Jayson Hreczuck <jayson.hreczuck@studentuniverse.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Nikhil Shetty @ 2021-09-17 08:57 UTC (permalink / raw)
  To: Jayson Hreczuck <jayson.hreczuck@studentuniverse.com>; +Cc: pgsql-admin

Hi Jayson,

Port is correct. I don't see any issue with the parameter in
postgresql.conf. After a couple of tries it worked but not sure why

Thanks,
Nikhil

On Thu, Sep 16, 2021 at 5:21 PM Jayson Hreczuck <
jayson.hreczuck@studentuniverse.com> wrote:

> Check your postgresql.conf file and confirm there is an appropriate port
> listed.
>
> On Thu, Sep 16, 2021, 7:47 AM Nikhil Shetty <nikhil.dba04@gmail.com>
> wrote:
>
>> Hi Team,
>>
>> I find strange behaviour today when initializing the postgres cluster.
>>
>> Below is the ERROR :
>>
>>
>> $$>/usr/pgsql-11/bin/initdb -D /data/postgres/pg11/test -d
>> Running in debug mode.
>> The files belonging to this database system will be owned by user
>> "postgres".
>> This user must also own the server process.
>>
>> VERSION=11.7
>> PGDATA=/data/postgres/pg11/test
>> share_path=/usr/pgsql-11/share
>> PGPATH=/usr/pgsql-11/bin
>> POSTGRES_SUPERUSERNAME=postgres
>> POSTGRES_BKI=/usr/pgsql-11/share/postgres.bki
>> POSTGRES_DESCR=/usr/pgsql-11/share/postgres.description
>> POSTGRES_SHDESCR=/usr/pgsql-11/share/postgres.shdescription
>> POSTGRESQL_CONF_SAMPLE=/usr/pgsql-11/share/postgresql.conf.sample
>> PG_HBA_SAMPLE=/usr/pgsql-11/share/pg_hba.conf.sample
>> PG_IDENT_SAMPLE=/usr/pgsql-11/share/pg_ident.conf.sample
>> The database cluster will be initialized with locale "en_US.UTF-8".
>> 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.
>>
>> creating directory /data/postgres/pg11/test ... ok
>> creating subdirectories ... ok
>> selecting default max_connections ... 20
>> selecting default shared_buffers ... 400kB
>> selecting default timezone ... America/Los_Angeles
>> selecting dynamic shared memory implementation ... posix
>> creating configuration files ... ok
>> running bootstrap script ... 2021-09-16 11:42:47.944 GMT [24522] FATAL:
>>  invalid value for parameter "port": ""
>> child process exited with exit code 1
>> initdb: removing data directory "/data/postgres/pg11/test"
>>
>> Any reason why this would be happening?
>>
>> Thanks,
>> Nikhil
>>
>

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: initdb fails with error
@ 2021-09-18 00:58  Mladen Gogala <gogala.mladen@gmail.com>
  parent: Nikhil Shetty <nikhil.dba04@gmail.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Mladen Gogala @ 2021-09-18 00:58 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org


On 9/17/21 04:57, Nikhil Shetty wrote:
> Hi Jayson,
>
> Port is correct. I don't see any issue with the parameter in 
> postgresql.conf. After a couple of tries it worked but not sure why
>
> Thanks,
> Nikhil


I would try something like "strace -e trace=file -f -o /tmp/initdb.out 
initdb <args>".  That should reveal the nature of the problem.

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com






^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2021-09-18 00:58 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 11:47 initdb fails with error Nikhil Shetty <nikhil.dba04@gmail.com>
2021-09-16 11:50 ` Jayson Hreczuck <jayson.hreczuck@studentuniverse.com>
2021-09-17 08:57   ` Nikhil Shetty <nikhil.dba04@gmail.com>
2021-09-18 00:58     ` Mladen Gogala <gogala.mladen@gmail.com>
2021-09-16 13:14 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-09-16 14:43 ` Mladen Gogala <gogala.mladen@gmail.com>
2021-09-16 15:08   ` Holger Jakobs <holger@jakobs.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox