Skip to main content
results of experiment with changing port number
Source Link
sam452
  • 161
  • 3
  • 11

when I started my working sinatra app on my Raspberry pi rev 1 machine running wheezy with the latest apt-get upgrade a few weeks ago I find that my postgresql 9.1 server is no longer running. Hunting in my logs I find this:

could not bind IPv4 socket: Cannot assign requested address 2015-08-17 08:32:17 CDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2015-08-17 08:32:17 CDT LOG: could not bind IPv6 socket:

Hunting the Googles I can report this:

lsof -i 5432:TCP => null result. Which would indicate that I have no other process running on port 5432? I've run top and can find nothing that looks like postgresql.

There is no pid file in /var/run/postgresql

This is my postgresql.conf file for this cluster. I've yanked out the commented lines in file locations and connections:

data_directory = '/var/lib/postgresql/9.1/main'     
hba_file = '/etc/postgresql/9.1/main/pg_hba.conf'               
ident_file = '/etc/postgresql/9.1/main/pg_ident.conf'   
external_pid_file = '/var/run/postgresql/9.1-main.pid'  
#listen_addresses = 'localhost'     # what IP address(es) to listen on;
port = 5432             # (change requires restart)
max_connections = 100           # (change requires restart)
unix_socket_directory = '/var/run/postgresql'       
ssl = true

The output of pg_lsclusters

Version Cluster   Port Status Owner    Data directory                     Log file
9.1     main      5432 down   postgres /var/lib/postgresql/9.1/main       /var/log/postgresql/postgresql-9.1-main.log   

Attempting sudo pg_ctlcluster 9.1 main stop yields: Cluster is not running.

As an experiment, I changed the port number in the conf file from 5432 to 5433 to see if it would start. The result is the same error output in that another postmaster may be using port 5433. So perhaps the pi is closing all the ports?

I'm unsure what to try next to understand. Clearly, postgres is seeing another 5432 running on startup that can't be found by me yet. Where should I look next? thanx, sam

when I started my working sinatra app on my Raspberry pi rev 1 machine running wheezy with the latest apt-get upgrade a few weeks ago I find that my postgresql 9.1 server is no longer running. Hunting in my logs I find this:

could not bind IPv4 socket: Cannot assign requested address 2015-08-17 08:32:17 CDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2015-08-17 08:32:17 CDT LOG: could not bind IPv6 socket:

Hunting the Googles I can report this:

lsof -i 5432:TCP => null result. Which would indicate that I have no other process running on port 5432? I've run top and can find nothing that looks like postgresql.

There is no pid file in /var/run/postgresql

This is my postgresql.conf file for this cluster. I've yanked out the commented lines in file locations and connections:

data_directory = '/var/lib/postgresql/9.1/main'     
hba_file = '/etc/postgresql/9.1/main/pg_hba.conf'               
ident_file = '/etc/postgresql/9.1/main/pg_ident.conf'   
external_pid_file = '/var/run/postgresql/9.1-main.pid'  
#listen_addresses = 'localhost'     # what IP address(es) to listen on;
port = 5432             # (change requires restart)
max_connections = 100           # (change requires restart)
unix_socket_directory = '/var/run/postgresql'       
ssl = true

The output of pg_lsclusters

Version Cluster   Port Status Owner    Data directory                     Log file
9.1     main      5432 down   postgres /var/lib/postgresql/9.1/main       /var/log/postgresql/postgresql-9.1-main.log   

Attempting sudo pg_ctlcluster 9.1 main stop yields: Cluster is not running.

I'm unsure what to try next to understand. Clearly, postgres is seeing another 5432 running on startup that can't be found by me yet. Where should I look next? thanx, sam

when I started my working sinatra app on my Raspberry pi rev 1 machine running wheezy with the latest apt-get upgrade a few weeks ago I find that my postgresql 9.1 server is no longer running. Hunting in my logs I find this:

could not bind IPv4 socket: Cannot assign requested address 2015-08-17 08:32:17 CDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2015-08-17 08:32:17 CDT LOG: could not bind IPv6 socket:

Hunting the Googles I can report this:

lsof -i 5432:TCP => null result. Which would indicate that I have no other process running on port 5432? I've run top and can find nothing that looks like postgresql.

There is no pid file in /var/run/postgresql

This is my postgresql.conf file for this cluster. I've yanked out the commented lines in file locations and connections:

data_directory = '/var/lib/postgresql/9.1/main'     
hba_file = '/etc/postgresql/9.1/main/pg_hba.conf'               
ident_file = '/etc/postgresql/9.1/main/pg_ident.conf'   
external_pid_file = '/var/run/postgresql/9.1-main.pid'  
#listen_addresses = 'localhost'     # what IP address(es) to listen on;
port = 5432             # (change requires restart)
max_connections = 100           # (change requires restart)
unix_socket_directory = '/var/run/postgresql'       
ssl = true

The output of pg_lsclusters

Version Cluster   Port Status Owner    Data directory                     Log file
9.1     main      5432 down   postgres /var/lib/postgresql/9.1/main       /var/log/postgresql/postgresql-9.1-main.log   

Attempting sudo pg_ctlcluster 9.1 main stop yields: Cluster is not running.

As an experiment, I changed the port number in the conf file from 5432 to 5433 to see if it would start. The result is the same error output in that another postmaster may be using port 5433. So perhaps the pi is closing all the ports?

I'm unsure what to try next to understand. Clearly, postgres is seeing another 5432 running on startup that can't be found by me yet. Where should I look next? thanx, sam

clarified use of lsof command.
Source Link
sam452
  • 161
  • 3
  • 11

when I started my working sinatra app on my Raspberry pi rev 1 machine running wheezy with the latest apt-get upgrade a few weeks ago I find that my postgresql 9.1 server is no longer running. Hunting in my logs I find this:

could not bind IPv4 socket: Cannot assign requested address 2015-08-17 08:32:17 CDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2015-08-17 08:32:17 CDT LOG: could not bind IPv6 socket:

Hunting the Googles I can report this:

lsof -i 5432:TCP yields a=> null result. Which would indicate that I have no other process running on port 5432? I've run top and can find nothing that looks like postgresql.

There is no pid file in /var/run/postgresql

This is my postgresql.conf file for this cluster. I've yanked out the commented lines in file locations and connections:

data_directory = '/var/lib/postgresql/9.1/main'     
hba_file = '/etc/postgresql/9.1/main/pg_hba.conf'               
ident_file = '/etc/postgresql/9.1/main/pg_ident.conf'   
external_pid_file = '/var/run/postgresql/9.1-main.pid'  
#listen_addresses = 'localhost'     # what IP address(es) to listen on;
port = 5432             # (change requires restart)
max_connections = 100           # (change requires restart)
unix_socket_directory = '/var/run/postgresql'       
ssl = true

The output of pg_lsclusters

Version Cluster   Port Status Owner    Data directory                     Log file
9.1     main      5432 down   postgres /var/lib/postgresql/9.1/main       /var/log/postgresql/postgresql-9.1-main.log   

Attempting sudo pg_ctlcluster 9.1 main stop yields: Cluster is not running.

I'm unsure what to try next to understand. Clearly, postgres is seeing another 5432 running on startup that can't be found by me yet. Where should I look next? thanx, sam

when I started my working sinatra app on my Raspberry pi rev 1 machine running wheezy with the latest apt-get upgrade a few weeks ago I find that my postgresql 9.1 server is no longer running. Hunting in my logs I find this:

could not bind IPv4 socket: Cannot assign requested address 2015-08-17 08:32:17 CDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2015-08-17 08:32:17 CDT LOG: could not bind IPv6 socket:

Hunting the Googles I can report this:

lsof 5432:TCP yields a null result.

There is no pid file in /var/run/postgresql

This is my postgresql.conf file for this cluster. I've yanked out the commented lines in file locations and connections:

data_directory = '/var/lib/postgresql/9.1/main'     
hba_file = '/etc/postgresql/9.1/main/pg_hba.conf'               
ident_file = '/etc/postgresql/9.1/main/pg_ident.conf'   
external_pid_file = '/var/run/postgresql/9.1-main.pid'  
#listen_addresses = 'localhost'     # what IP address(es) to listen on;
port = 5432             # (change requires restart)
max_connections = 100           # (change requires restart)
unix_socket_directory = '/var/run/postgresql'       
ssl = true

The output of pg_lsclusters

Version Cluster   Port Status Owner    Data directory                     Log file
9.1     main      5432 down   postgres /var/lib/postgresql/9.1/main       /var/log/postgresql/postgresql-9.1-main.log   

Attempting sudo pg_ctlcluster 9.1 main stop yields: Cluster is not running.

I'm unsure what to try next to understand. Clearly, postgres is seeing another 5432 running on startup that can't be found by me yet. Where should I look next? thanx, sam

when I started my working sinatra app on my Raspberry pi rev 1 machine running wheezy with the latest apt-get upgrade a few weeks ago I find that my postgresql 9.1 server is no longer running. Hunting in my logs I find this:

could not bind IPv4 socket: Cannot assign requested address 2015-08-17 08:32:17 CDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2015-08-17 08:32:17 CDT LOG: could not bind IPv6 socket:

Hunting the Googles I can report this:

lsof -i 5432:TCP => null result. Which would indicate that I have no other process running on port 5432? I've run top and can find nothing that looks like postgresql.

There is no pid file in /var/run/postgresql

This is my postgresql.conf file for this cluster. I've yanked out the commented lines in file locations and connections:

data_directory = '/var/lib/postgresql/9.1/main'     
hba_file = '/etc/postgresql/9.1/main/pg_hba.conf'               
ident_file = '/etc/postgresql/9.1/main/pg_ident.conf'   
external_pid_file = '/var/run/postgresql/9.1-main.pid'  
#listen_addresses = 'localhost'     # what IP address(es) to listen on;
port = 5432             # (change requires restart)
max_connections = 100           # (change requires restart)
unix_socket_directory = '/var/run/postgresql'       
ssl = true

The output of pg_lsclusters

Version Cluster   Port Status Owner    Data directory                     Log file
9.1     main      5432 down   postgres /var/lib/postgresql/9.1/main       /var/log/postgresql/postgresql-9.1-main.log   

Attempting sudo pg_ctlcluster 9.1 main stop yields: Cluster is not running.

I'm unsure what to try next to understand. Clearly, postgres is seeing another 5432 running on startup that can't be found by me yet. Where should I look next? thanx, sam

Source Link
sam452
  • 161
  • 3
  • 11

postgresql 9.1 raspberry pi could not bind IPv4 socket

when I started my working sinatra app on my Raspberry pi rev 1 machine running wheezy with the latest apt-get upgrade a few weeks ago I find that my postgresql 9.1 server is no longer running. Hunting in my logs I find this:

could not bind IPv4 socket: Cannot assign requested address 2015-08-17 08:32:17 CDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2015-08-17 08:32:17 CDT LOG: could not bind IPv6 socket:

Hunting the Googles I can report this:

lsof 5432:TCP yields a null result.

There is no pid file in /var/run/postgresql

This is my postgresql.conf file for this cluster. I've yanked out the commented lines in file locations and connections:

data_directory = '/var/lib/postgresql/9.1/main'     
hba_file = '/etc/postgresql/9.1/main/pg_hba.conf'               
ident_file = '/etc/postgresql/9.1/main/pg_ident.conf'   
external_pid_file = '/var/run/postgresql/9.1-main.pid'  
#listen_addresses = 'localhost'     # what IP address(es) to listen on;
port = 5432             # (change requires restart)
max_connections = 100           # (change requires restart)
unix_socket_directory = '/var/run/postgresql'       
ssl = true

The output of pg_lsclusters

Version Cluster   Port Status Owner    Data directory                     Log file
9.1     main      5432 down   postgres /var/lib/postgresql/9.1/main       /var/log/postgresql/postgresql-9.1-main.log   

Attempting sudo pg_ctlcluster 9.1 main stop yields: Cluster is not running.

I'm unsure what to try next to understand. Clearly, postgres is seeing another 5432 running on startup that can't be found by me yet. Where should I look next? thanx, sam