Skip site navigation (1) Skip section navigation (2)

Re: Postgres crashed on invalid IP entry in pg_hba.conf

From: Pallav Kalva <pkalva(at)deg(dot)cc>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Subject: Re: Postgres crashed on invalid IP entry in pg_hba.conf
Date: 2005-02-16 20:15:03
Message-ID: 4213A9C7.2010404@deg.cc (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-bugs
Hi Tom,

    Thanks! for the quick reply actually i forgot to attach the log file 
in my first email, the next email has the attachment, anyways here is 
the output from the log file. as you can see i have 5 numbers in the ip 
address which was a typo and postgres crashes when it reads the hba file 
with this entry. do you think this problem is specific to the 7.4.2 
version .




Feb 15 17:30:55 prod postgres[2322]: [702-1] LOG:  invalid IP address 
"100.1.100.1.50" in pg_hba.conf file: Name or service not known
Feb 15 17:30:55 prod postgres[13585]: [702-1] LOG:  server process (PID 
2322) was terminated by signal 11
Feb 15 17:30:55 prod postgres[13585]: [703-1] LOG:  terminating any 
other active server processes
Feb 15 17:30:55 prod postgres[13585]: [704-1] LOG:  all server processes 
terminated; reinitializing
Feb 15 17:30:55 prod postgres[2323]: [705-1] LOG:  database system was 
interrupted at 2005-02-15 17:30:51 EST
Feb 15 17:30:55 prod postgres[2323]: [706-1] LOG:  checkpoint record is 
at D5/796387A8
Feb 15 17:30:55 prod postgres[2323]: [707-1] LOG:  redo record is at 
D5/796387A8; undo record is at 0/0; shutdown TRUE
Feb 15 17:30:55 prod postgres[2323]: [708-1] LOG:  next transaction ID: 
146738745; next OID: 565698175
Feb 15 17:30:55 prod postgres[2323]: [709-1] LOG:  database system was 
not properly shut down; automatic recovery in progress
Feb 15 17:30:55 prod postgres[2323]: [710-1] LOG:  record with zero 
length at D5/796387E8
Feb 15 17:30:55 prod postgres[2323]: [711-1] LOG:  redo is not required
Feb 15 17:30:55 prod postgres[2324]: [705-1] FATAL:  the database system 
is starting up
Feb 15 17:30:57 prod postgres[2323]: [712-1] LOG:  database system is ready
Feb 15 17:30:59 prod postgres[2329]: [705-1] LOG:  invalid IP address 
"100.1.100.1.50" in pg_hba.conf file: Name or service not known
Feb 15 17:30:59 prod postgres[2329]: [706-1] LOG:  invalid entry in 
pg_hba.conf file at line 206, token "100.1.100.1.50"
Feb 15 17:30:59 prod postgres[2329]: [707-1] FATAL:  missing or 
erroneous pg_hba.conf file
Feb 15 17:30:59 prod postgres[2329]: [707-2] HINT:  See server log for 
details.
Feb 15 17:30:59 prod postgres[13585]: [705-1] LOG:  server process (PID 
2329) was terminated by signal 11
Feb 15 17:30:59 prod postgres[13585]: [706-1] LOG:  terminating any 
other active server processes



Tom Lane wrote:

>pkalva(at)deg(dot)cc writes:
>  
>
>>   Yesterday, our production database was crashed as soon as we added an invlid
>>entry in the pg_hba.conf file. Immediately, after the SIGHUP it tried to read
>>the pg_hba.conf file and it couldnt validate the IP address and restarted the
>>postgres server, as soon as we change the pg_hba.conf with the right entry
>>everything was back to normal. Attached you will see the postgres log file at
>>the time of the crash. Postgres version we are using is 7.4.2.
>>    
>>
>
>Works fine for me in 7.4.7 ... I get log entries like this:
>
>LOG:  invalid IP address "1727.0.0.1" in pg_hba.conf file: Unknown server error
>LOG:  invalid entry in pg_hba.conf file at line 56, token "1727.0.0.1"
>FATAL:  missing or erroneous pg_hba.conf file
>HINT:  See server log for details.
>
>and after I fix the pg_hba.conf file it lets me in again.  I see no crash.
>
>			regards, tom lane
>
>  
>



In response to

Responses

pgsql-admin by date

Next:From: Tom LaneDate: 2005-02-16 20:24:36
Subject: Re: Postgres crashed on invalid IP entry in pg_hba.conf
Previous:From: Tom LaneDate: 2005-02-16 20:05:17
Subject: Re: Postgres crashed on invalid IP entry in pg_hba.conf

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-02-16 20:24:36
Subject: Re: Postgres crashed on invalid IP entry in pg_hba.conf
Previous:From: Tom LaneDate: 2005-02-16 20:05:17
Subject: Re: Postgres crashed on invalid IP entry in pg_hba.conf

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group