Thread: [NOVICE] The server does not listen

[NOVICE] The server does not listen

From
manno_it@libero.it
Date:

Hello,

I am running Postgres 9.2 on a MacOs X El Captain 10.11.6. I start my database named posgres last time in May. [After that, I had problems on my Mac, so I re-installad and upgraded the OS ti El Captain.] Now I'm trying to connect to my database by PgAdminIII, Navicat and so on, but it seems impossibile to start a connection: "The server does not listen". I have tried to find a solution in the Postgres documentation, under the Appendices (Installation, starting the database etc.), but I am not able to find a solution.

I have a basic knowledge of linux commands, shell, privileges etc.

I will attach here some screenshot with the error messages: https://www.dropbox.com/sh/60onx881lrzwpgf/AAAa0iOBzfm0n1Jd5LD7sdg_a?dl=0

Could anyone help me (a) to understand what the problem exactly is and (b) how to find a solution? Hope my tables and data are there!!

Thank you very much for you attention,
Mauro - IT

Re: [NOVICE] The server does not listen

From
Adarsh Jaiswal
Date:
Hi,

Try checking if the service is started and listening on port 5432.

You can use netstat command to check it.

netstat -nalp | grep :5432


Also , check the latest logs of the postgres when you start the engine, what it is saying. We can get the logs usually at the location "/var/log/postgresql"



Thanks and Regards,
Adarsh Jaiswal

On Sun, Oct 15, 2017 at 6:30 PM, <manno_it@libero.it> wrote:

Hello,

I am running Postgres 9.2 on a MacOs X El Captain 10.11.6. I start my database named posgres last time in May. [After that, I had problems on my Mac, so I re-installad and upgraded the OS ti El Captain.] Now I'm trying to connect to my database by PgAdminIII, Navicat and so on, but it seems impossibile to start a connection: "The server does not listen". I have tried to find a solution in the Postgres documentation, under the Appendices (Installation, starting the database etc.), but I am not able to find a solution.

I have a basic knowledge of linux commands, shell, privileges etc.

I will attach here some screenshot with the error messages: https://www.dropbox.com/sh/60onx881lrzwpgf/AAAa0iOBzfm0n1Jd5LD7sdg_a?dl=0

Could anyone help me (a) to understand what the problem exactly is and (b) how to find a solution? Hope my tables and data are there!!

Thank you very much for you attention,
Mauro - IT


Re: [NOVICE] The server does not listen

From
manno_it@libero.it
Date:

Dear all,

thank you for your reply.

Here my findings:

Port Scanning host: 127.0.0.1

     Open TCP Port:     22             ssh
     Open TCP Port:     631            ipp
     Open TCP Port:     3306           mysql
     Open TCP Port:     4370
     Open TCP Port:     4380
     Open TCP Port:     8080           http-alt
Esamina Porte completato...


Unfortunatly the port 5432 is not open or does not show postgresql...

Bests,

mauro

Il 16 ottobre 2017 alle 5.25 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:

Hi,

Try checking if the service is started and listening on port 5432.

You can use netstat command to check it.

netstat -nalp | grep :5432


Also , check the latest logs of the postgres when you start the engine, what it is saying. We can get the logs usually at the location "/var/log/postgresql"



Thanks and Regards,
Adarsh Jaiswal

On Sun, Oct 15, 2017 at 6:30 PM, <manno_it@libero.it> wrote:

Hello,

I am running Postgres 9.2 on a MacOs X El Captain 10.11.6. I start my database named posgres last time in May. [After that, I had problems on my Mac, so I re-installad and upgraded the OS ti El Captain.] Now I'm trying to connect to my database by PgAdminIII, Navicat and so on, but it seems impossibile to start a connection: "The server does not listen". I have tried to find a solution in the Postgres documentation, under the Appendices (Installation, starting the database etc.), but I am not able to find a solution.

I have a basic knowledge of linux commands, shell, privileges etc.

I will attach here some screenshot with the error messages: https://www.dropbox.com/sh/60onx881lrzwpgf/AAAa0iOBzfm0n1Jd5LD7sdg_a?dl=0

Could anyone help me (a) to understand what the problem exactly is and (b) how to find a solution? Hope my tables and data are there!!

Thank you very much for you attention,
Mauro - IT


Re: [NOVICE] The server does not listen

From
Adarsh Jaiswal
Date:
Hi,

Check if the service is running. (/etc/init.d/postgresql status)

Start the service if not running and check the logs (location in the earlier email)

Thanks and Regards,
Adarsh Jaiswal

On Mon, Oct 16, 2017 at 4:43 PM, <manno_it@libero.it> wrote:

Dear all,

thank you for your reply.

Here my findings:

Port Scanning host: 127.0.0.1

     Open TCP Port:     22             ssh
     Open TCP Port:     631            ipp
     Open TCP Port:     3306           mysql
     Open TCP Port:     4370
     Open TCP Port:     4380
     Open TCP Port:     8080           http-alt
Esamina Porte completato...


Unfortunatly the port 5432 is not open or does not show postgresql...

Bests,

mauro

Il 16 ottobre 2017 alle 5.25 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:

Hi,

Try checking if the service is started and listening on port 5432.

You can use netstat command to check it.

netstat -nalp | grep :5432


Also , check the latest logs of the postgres when you start the engine, what it is saying. We can get the logs usually at the location "/var/log/postgresql"



Thanks and Regards,
Adarsh Jaiswal

On Sun, Oct 15, 2017 at 6:30 PM, <manno_it@libero.it> wrote:

Hello,

I am running Postgres 9.2 on a MacOs X El Captain 10.11.6. I start my database named posgres last time in May. [After that, I had problems on my Mac, so I re-installad and upgraded the OS ti El Captain.] Now I'm trying to connect to my database by PgAdminIII, Navicat and so on, but it seems impossibile to start a connection: "The server does not listen". I have tried to find a solution in the Postgres documentation, under the Appendices (Installation, starting the database etc.), but I am not able to find a solution.

I have a basic knowledge of linux commands, shell, privileges etc.

I will attach here some screenshot with the error messages: https://www.dropbox.com/sh/60onx881lrzwpgf/AAAa0iOBzfm0n1Jd5LD7sdg_a?dl=0

Could anyone help me (a) to understand what the problem exactly is and (b) how to find a solution? Hope my tables and data are there!!

Thank you very much for you attention,
Mauro - IT



Re: [NOVICE] The server does not listen

From
manno_it@libero.it
Date:

Hemmm,

thank you Adarsh, but how can I check the status via /etc/init.d/postgresql status ? In the shell with sudo? I'm not an expert on linux...

And how to "start the service"?

Thank you,
mauro


16 ottobre 2017 alle 13.16 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:


Hi,

Check if the service is running. (/etc/init.d/postgresql status)

Start the service if not running and check the logs (location in the earlier email)

Thanks and Regards,
Adarsh Jaiswal

On Mon, Oct 16, 2017 at 4:43 PM, <manno_it@libero.it> wrote:

Dear all,

thank you for your reply.

Here my findings:

Port Scanning host: 127.0.0.1

     Open TCP Port:     22             ssh
     Open TCP Port:     631            ipp
     Open TCP Port:     3306           mysql
     Open TCP Port:     4370
     Open TCP Port:     4380
     Open TCP Port:     8080           http-alt
Esamina Porte completato...


Unfortunatly the port 5432 is not open or does not show postgresql...

Bests,

mauro

Il 16 ottobre 2017 alle 5.25 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:

Hi,

Try checking if the service is started and listening on port 5432.

You can use netstat command to check it.

netstat -nalp | grep :5432


Also , check the latest logs of the postgres when you start the engine, what it is saying. We can get the logs usually at the location "/var/log/postgresql"



Thanks and Regards,
Adarsh Jaiswal

On Sun, Oct 15, 2017 at 6:30 PM, <manno_it@libero.it> wrote:

Hello,

I am running Postgres 9.2 on a MacOs X El Captain 10.11.6. I start my database named posgres last time in May. [After that, I had problems on my Mac, so I re-installad and upgraded the OS ti El Captain.] Now I'm trying to connect to my database by PgAdminIII, Navicat and so on, but it seems impossibile to start a connection: "The server does not listen". I have tried to find a solution in the Postgres documentation, under the Appendices (Installation, starting the database etc.), but I am not able to find a solution.

I have a basic knowledge of linux commands, shell, privileges etc.

I will attach here some screenshot with the error messages: https://www.dropbox.com/sh/60onx881lrzwpgf/AAAa0iOBzfm0n1Jd5LD7sdg_a?dl=0

Could anyone help me (a) to understand what the problem exactly is and (b) how to find a solution? Hope my tables and data are there!!

Thank you very much for you attention,
Mauro - IT



Re: [NOVICE] The server does not listen

From
Adarsh Jaiswal
Date:
Hi,

Yes you are correct. We will have to run the commands in the shell via sudo to check the status.

"/etc/init.d/postgresql status"

Share the status of the command above.

Similarly to start the Postgres Server , we will run the following command:

"/etc/init.d/postgresql start"

Then run the status command above and run command above and see if the server is up.

If the server hasn't started, we need to check the log file. Open the log file "/var/log/postgresql". We can check this by downloading the file and viewing using a text editor.



Thanks and Regards,
Adarsh Jaiswal

On Mon, Oct 16, 2017 at 7:51 PM, <manno_it@libero.it> wrote:

Hemmm,

thank you Adarsh, but how can I check the status via /etc/init.d/postgresql status ? In the shell with sudo? I'm not an expert on linux...

And how to "start the service"?

Thank you,
mauro


16 ottobre 2017 alle 13.16 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:


Hi,

Check if the service is running. (/etc/init.d/postgresql status)

Start the service if not running and check the logs (location in the earlier email)

Thanks and Regards,
Adarsh Jaiswal

On Mon, Oct 16, 2017 at 4:43 PM, <manno_it@libero.it> wrote:

Dear all,

thank you for your reply.

Here my findings:

Port Scanning host: 127.0.0.1

     Open TCP Port:     22             ssh
     Open TCP Port:     631            ipp
     Open TCP Port:     3306           mysql
     Open TCP Port:     4370
     Open TCP Port:     4380
     Open TCP Port:     8080           http-alt
Esamina Porte completato...


Unfortunatly the port 5432 is not open or does not show postgresql...

Bests,

mauro

Il 16 ottobre 2017 alle 5.25 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:

Hi,

Try checking if the service is started and listening on port 5432.

You can use netstat command to check it.

netstat -nalp | grep :5432


Also , check the latest logs of the postgres when you start the engine, what it is saying. We can get the logs usually at the location "/var/log/postgresql"



Thanks and Regards,
Adarsh Jaiswal

On Sun, Oct 15, 2017 at 6:30 PM, <manno_it@libero.it> wrote:

Hello,

I am running Postgres 9.2 on a MacOs X El Captain 10.11.6. I start my database named posgres last time in May. [After that, I had problems on my Mac, so I re-installad and upgraded the OS ti El Captain.] Now I'm trying to connect to my database by PgAdminIII, Navicat and so on, but it seems impossibile to start a connection: "The server does not listen". I have tried to find a solution in the Postgres documentation, under the Appendices (Installation, starting the database etc.), but I am not able to find a solution.

I have a basic knowledge of linux commands, shell, privileges etc.

I will attach here some screenshot with the error messages: https://www.dropbox.com/sh/60onx881lrzwpgf/AAAa0iOBzfm0n1Jd5LD7sdg_a?dl=0

Could anyone help me (a) to understand what the problem exactly is and (b) how to find a solution? Hope my tables and data are there!!

Thank you very much for you attention,
Mauro - IT




Re: [NOVICE] The server does not listen

From
Moreno Andreo
Date:
Il 16/10/2017 16:21, manno_it@libero.it ha scritto:

Hemmm,

thank you Adarsh, but how can I check the status via /etc/init.d/postgresql status ? In the shell with sudo? I'm not an expert on linux...


in a terminal run (no need for sudo)

moreno@test:~$ /etc/init.d/postgresql status
● postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled)
   Active: active (exited) since mar 2017-09-26 16:34:23 CEST; 2 weeks 5 days ago
  Process: 15540 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 15540 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/postgresql.service

And how to "start the service"?

In the same terminal, run
sudo /etc/init.d/postgresql start

It will give you feedback on startup ([OK] or [FAIL])

Cheers,
Moreno.

Thank you,
mauro


16 ottobre 2017 alle 13.16 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:


Hi,

Check if the service is running. (/etc/init.d/postgresql status)

Start the service if not running and check the logs (location in the earlier email)

Thanks and Regards,
Adarsh Jaiswal

On Mon, Oct 16, 2017 at 4:43 PM, <manno_it@libero.it> wrote:

Dear all,

thank you for your reply.

Here my findings:

Port Scanning host: 127.0.0.1

     Open TCP Port:     22             ssh
     Open TCP Port:     631            ipp
     Open TCP Port:     3306           mysql
     Open TCP Port:     4370
     Open TCP Port:     4380
     Open TCP Port:     8080           http-alt
Esamina Porte completato...


Unfortunatly the port 5432 is not open or does not show postgresql...

Bests,

mauro

Il 16 ottobre 2017 alle 5.25 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:

Hi,

Try checking if the service is started and listening on port 5432.

You can use netstat command to check it.

netstat -nalp | grep :5432


Also , check the latest logs of the postgres when you start the engine, what it is saying. We can get the logs usually at the location "/var/log/postgresql"



Thanks and Regards,
Adarsh Jaiswal

On Sun, Oct 15, 2017 at 6:30 PM, <manno_it@libero.it> wrote:

Hello,

I am running Postgres 9.2 on a MacOs X El Captain 10.11.6. I start my database named posgres last time in May. [After that, I had problems on my Mac, so I re-installad and upgraded the OS ti El Captain.] Now I'm trying to connect to my database by PgAdminIII, Navicat and so on, but it seems impossibile to start a connection: "The server does not listen". I have tried to find a solution in the Postgres documentation, under the Appendices (Installation, starting the database etc.), but I am not able to find a solution.

I have a basic knowledge of linux commands, shell, privileges etc.

I will attach here some screenshot with the error messages: https://www.dropbox.com/sh/60onx881lrzwpgf/AAAa0iOBzfm0n1Jd5LD7sdg_a?dl=0

Could anyone help me (a) to understand what the problem exactly is and (b) how to find a solution? Hope my tables and data are there!!

Thank you very much for you attention,
Mauro - IT




Re: [NOVICE] The server does not listen

From
manno_it@libero.it
Date:

Thank you Adarsh,

Il 16 ottobre 2017 alle 16.31 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:

Hi,

Yes you are correct. We will have to run the commands in the shell via sudo to check the status.

"/etc/init.d/postgresql status"

Share the status of the command above.

sudo: /etc/init.d/postgresql: command not found


Similarly to start the Postgres Server , we will run the following command:

"/etc/init.d/postgresql start"

Then run the status command above and run command above and see if the server is up.

sudo: /etc/init.d/postgresql: command not found

If the server hasn't started, we need to check the log file. Open the log file "/var/log/postgresql". We can check this by downloading the file and viewing using a text editor.

In the log file there is not postgresql ! (see here https://www.dropbox.com/s/46n3mv603jy3eaz/Senza%20titolo.tiff?dl=0)

My last log was on May (see my first email with link to the image: https://www.dropbox.com/sh/60onx881lrzwpgf/AAAa0iOBzfm0n1Jd5LD7sdg_a?dl=0 )

After that time, I had problems in June with my Os, so a technician made an upgrade to OS El Captain. And here I am!

Bests,

Mauro


Thanks and Regards,
Adarsh Jaiswal

On Mon, Oct 16, 2017 at 7:51 PM, <manno_it@libero.it> wrote:

Hemmm,

thank you Adarsh, but how can I check the status via /etc/init.d/postgresql status ? In the shell with sudo? I'm not an expert on linux...

And how to "start the service"?

Thank you,
mauro


16 ottobre 2017 alle 13.16 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:


Hi,

Check if the service is running. (/etc/init.d/postgresql status)

Start the service if not running and check the logs (location in the earlier email)

Thanks and Regards,
Adarsh Jaiswal

On Mon, Oct 16, 2017 at 4:43 PM, <manno_it@libero.it> wrote:

Dear all,

thank you for your reply.

Here my findings:

Port Scanning host: 127.0.0.1

     Open TCP Port:     22             ssh
     Open TCP Port:     631            ipp
     Open TCP Port:     3306           mysql
     Open TCP Port:     4370
     Open TCP Port:     4380
     Open TCP Port:     8080           http-alt
Esamina Porte completato...


Unfortunatly the port 5432 is not open or does not show postgresql...

Bests,

mauro

Il 16 ottobre 2017 alle 5.25 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:

Hi,

Try checking if the service is started and listening on port 5432.

You can use netstat command to check it.

netstat -nalp | grep :5432


Also , check the latest logs of the postgres when you start the engine, what it is saying. We can get the logs usually at the location "/var/log/postgresql"



Thanks and Regards,
Adarsh Jaiswal

On Sun, Oct 15, 2017 at 6:30 PM, <manno_it@libero.it> wrote:

Hello,

I am running Postgres 9.2 on a MacOs X El Captain 10.11.6. I start my database named posgres last time in May. [After that, I had problems on my Mac, so I re-installad and upgraded the OS ti El Captain.] Now I'm trying to connect to my database by PgAdminIII, Navicat and so on, but it seems impossibile to start a connection: "The server does not listen". I have tried to find a solution in the Postgres documentation, under the Appendices (Installation, starting the database etc.), but I am not able to find a solution.

I have a basic knowledge of linux commands, shell, privileges etc.

I will attach here some screenshot with the error messages: https://www.dropbox.com/sh/60onx881lrzwpgf/AAAa0iOBzfm0n1Jd5LD7sdg_a?dl=0

Could anyone help me (a) to understand what the problem exactly is and (b) how to find a solution? Hope my tables and data are there!!

Thank you very much for you attention,
Mauro - IT




Re: [NOVICE] The server does not listen

From
manno_it@libero.it
Date:

Thank you Moreno,


And how to "start the service"?
In the same terminal, run
sudo /etc/init.d/postgresql start

It will give you feedback on startup ([OK] or [FAIL])

In my etc folder there is not a init.d file...: see the findings of a ls in this txt file: https://www.dropbox.com/s/4m7a9n17ensr6ri/Output%20di%20Terminale%20salvato?dl=0

Thanks,

M




Thank you,

mauro


16 ottobre 2017 alle 13.16 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:


Hi,

Check if the service is running. (/etc/init.d/postgresql status)

Start the service if not running and check the logs (location in the earlier email)

Thanks and Regards,
Adarsh Jaiswal

On Mon, Oct 16, 2017 at 4:43 PM, <manno_it@libero.it> wrote:

Dear all,

thank you for your reply.

Here my findings:

Port Scanning host: 127.0.0.1

     Open TCP Port:     22             ssh
     Open TCP Port:     631            ipp
     Open TCP Port:     3306           mysql
     Open TCP Port:     4370
     Open TCP Port:     4380
     Open TCP Port:     8080           http-alt
Esamina Porte completato...


Unfortunatly the port 5432 is not open or does not show postgresql...

Bests,

mauro

Il 16 ottobre 2017 alle 5.25 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:

Hi,

Try checking if the service is started and listening on port 5432.

You can use netstat command to check it.

netstat -nalp | grep :5432


Also , check the latest logs of the postgres when you start the engine, what it is saying. We can get the logs usually at the location "/var/log/postgresql"



Thanks and Regards,
Adarsh Jaiswal

On Sun, Oct 15, 2017 at 6:30 PM, <manno_it@libero.it> wrote:

Hello,

I am running Postgres 9.2 on a MacOs X El Captain 10.11.6. I start my database named posgres last time in May. [After that, I had problems on my Mac, so I re-installad and upgraded the OS ti El Captain.] Now I'm trying to connect to my database by PgAdminIII, Navicat and so on, but it seems impossibile to start a connection: "The server does not listen". I have tried to find a solution in the Postgres documentation, under the Appendices (Installation, starting the database etc.), but I am not able to find a solution.

I have a basic knowledge of linux commands, shell, privileges etc.

I will attach here some screenshot with the error messages: https://www.dropbox.com/sh/60onx881lrzwpgf/AAAa0iOBzfm0n1Jd5LD7sdg_a?dl=0

Could anyone help me (a) to understand what the problem exactly is and (b) how to find a solution? Hope my tables and data are there!!

Thank you very much for you attention,
Mauro - IT




Re: [NOVICE] The server does not listen

From
Moreno Andreo
Date:
Il 16/10/2017 16:50, manno_it@libero.it ha scritto:

Thank you Moreno,


And how to "start the service"?
In the same terminal, run
sudo /etc/init.d/postgresql start

It will give you feedback on startup ([OK] or [FAIL])

In my etc folder there is not a init.d file...: see the findings of a ls in this txt file: https://www.dropbox.com/s/4m7a9n17ensr6ri/Output%20di%20Terminale%20salvato?dl=0

I think this coul be useful
https://stackoverflow.com/questions/7975556/how-to-start-postgresql-server-on-mac-os-x
I'm not a Mac expert, so I can't go further (and I've got no Mac around me to do a quick check), just take a look and see if it helps.
I saw many results while googling, so similar searches should let you acquire more informations.

HTH
Moreno.

Thanks,

M




Thank you,

mauro


16 ottobre 2017 alle 13.16 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:


Hi,

Check if the service is running. (/etc/init.d/postgresql status)

Start the service if not running and check the logs (location in the earlier email)

Thanks and Regards,
Adarsh Jaiswal

On Mon, Oct 16, 2017 at 4:43 PM, <manno_it@libero.it> wrote:

Dear all,

thank you for your reply.

Here my findings:

Port Scanning host: 127.0.0.1

     Open TCP Port:     22             ssh
     Open TCP Port:     631            ipp
     Open TCP Port:     3306           mysql
     Open TCP Port:     4370
     Open TCP Port:     4380
     Open TCP Port:     8080           http-alt
Esamina Porte completato...


Unfortunatly the port 5432 is not open or does not show postgresql...

Bests,

mauro

Il 16 ottobre 2017 alle 5.25 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:

Hi,

Try checking if the service is started and listening on port 5432.

You can use netstat command to check it.

netstat -nalp | grep :5432


Also , check the latest logs of the postgres when you start the engine, what it is saying. We can get the logs usually at the location "/var/log/postgresql"



Thanks and Regards,
Adarsh Jaiswal

On Sun, Oct 15, 2017 at 6:30 PM, <manno_it@libero.it> wrote:

Hello,

I am running Postgres 9.2 on a MacOs X El Captain 10.11.6. I start my database named posgres last time in May. [After that, I had problems on my Mac, so I re-installad and upgraded the OS ti El Captain.] Now I'm trying to connect to my database by PgAdminIII, Navicat and so on, but it seems impossibile to start a connection: "The server does not listen". I have tried to find a solution in the Postgres documentation, under the Appendices (Installation, starting the database etc.), but I am not able to find a solution.

I have a basic knowledge of linux commands, shell, privileges etc.

I will attach here some screenshot with the error messages: https://www.dropbox.com/sh/60onx881lrzwpgf/AAAa0iOBzfm0n1Jd5LD7sdg_a?dl=0

Could anyone help me (a) to understand what the problem exactly is and (b) how to find a solution? Hope my tables and data are there!!

Thank you very much for you attention,
Mauro - IT





Re: [NOVICE] The server does not listen

From
Payal Singh
Date:
On Mon, Oct 16, 2017 at 11:24 AM, Moreno Andreo <moreno.andreo@evolu-s.it> wrote:
Il 16/10/2017 16:50, manno_it@libero.it ha scritto:

Thank you Moreno,


And how to "start the service"?
In the same terminal, run
sudo /etc/init.d/postgresql start

It will give you feedback on startup ([OK] or [FAIL])

In my etc folder there is not a init.d file...: see the findings of a ls in this txt file: https://www.dropbox.com/s/4m7a9n17ensr6ri/Output%20di%20Terminale%20salvato?dl=0

I think this coul be useful
https://stackoverflow.com/questions/7975556/how-to-start-postgresql-server-on-mac-os-x
I'm not a Mac expert, so I can't go further (and I've got no Mac around me to do a quick check), just take a look and see if it helps.
I saw many results while googling, so similar searches should let you acquire more informations.

HTH
Moreno.

How did you install postgres? Did you use the package or did you compile it from source? If you compiled it, you will have to manually create a service for postgres. But to start the database without the service, you can use pg_ctl directly:

pg_ctl -D <your-data-directory-full-path> start

Thanks, 

Payal Singh,
Database Administrator,
OmniTI Computer Consulting Inc.
Phone: 240.646.0770 x 253




Thanks,

M




Thank you,

mauro


16 ottobre 2017 alle 13.16 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:


Hi,

Check if the service is running. (/etc/init.d/postgresql status)

Start the service if not running and check the logs (location in the earlier email)

Thanks and Regards,
Adarsh Jaiswal

On Mon, Oct 16, 2017 at 4:43 PM, <manno_it@libero.it> wrote:

Dear all,

thank you for your reply.

Here my findings:

Port Scanning host: 127.0.0.1

     Open TCP Port:     22             ssh
     Open TCP Port:     631            ipp
     Open TCP Port:     3306           mysql
     Open TCP Port:     4370
     Open TCP Port:     4380
     Open TCP Port:     8080           http-alt
Esamina Porte completato...


Unfortunatly the port 5432 is not open or does not show postgresql...

Bests,

mauro

Il 16 ottobre 2017 alle 5.25 Adarsh Jaiswal <adarshjaiswal1989@gmail.com> ha scritto:

Hi,

Try checking if the service is started and listening on port 5432.

You can use netstat command to check it.

netstat -nalp | grep :5432


Also , check the latest logs of the postgres when you start the engine, what it is saying. We can get the logs usually at the location "/var/log/postgresql"



Thanks and Regards,
Adarsh Jaiswal

On Sun, Oct 15, 2017 at 6:30 PM, <manno_it@libero.it> wrote:

Hello,

I am running Postgres 9.2 on a MacOs X El Captain 10.11.6. I start my database named posgres last time in May. [After that, I had problems on my Mac, so I re-installad and upgraded the OS ti El Captain.] Now I'm trying to connect to my database by PgAdminIII, Navicat and so on, but it seems impossibile to start a connection: "The server does not listen". I have tried to find a solution in the Postgres documentation, under the Appendices (Installation, starting the database etc.), but I am not able to find a solution.

I have a basic knowledge of linux commands, shell, privileges etc.

I will attach here some screenshot with the error messages: https://www.dropbox.com/sh/60onx881lrzwpgf/AAAa0iOBzfm0n1Jd5LD7sdg_a?dl=0

Could anyone help me (a) to understand what the problem exactly is and (b) how to find a solution? Hope my tables and data are there!!

Thank you very much for you attention,
Mauro - IT






Re: [NOVICE] The server does not listen

From
manno_it@libero.it
Date:

Hello,

How did you install postgres? Did you use the package or did you compile it from source? If you compiled it, you will have to manually create a service for postgres. But to start the database without the service, you can use pg_ctl directly:

pg_ctl -D <your-data-directory-full-path> start

I installed postgres years ago using a package, because I was not able to compile it from soource.

The file pg_ctl in in /Users/postgres/bin/pg_ctl
BUT I'm not able to start it.

with the command pg_ctl -D  /Users/postgres/bin/pg_ctl start it does not work; the result is:

MacBook-Pro-di-Mauro-Bonetti:~ mauro$ pg_ctl -D  /Users/postgres/bin/pg_ctl start
-bash: pg_ctl: command not found

If I try to OPEN the file, the result, in another window, is:

Last login: Tue Oct 17 00:04:34 on ttys001
MacBook-Pro-di-Mauro-Bonetti:~ mauro$ /Users/postgres/bin/pg_ctl ; exit;
pg_ctl: no operation specified
Try "pg_ctl --help" for more information.
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.


I repeat: I install the first time postgres some yers ago (version 9.2). I log in last time on May. In June, after some crashes, a friend format my disk and I upgraded to Mac Os El Captain, using then a complete backup to restore my files, Applications etc.

Thanks for all your kind attention,
M

Re: [NOVICE] The server does not listen

From
"David G. Johnston"
Date:
On Mon, Oct 16, 2017 at 3:15 PM, <manno_it@libero.it> wrote:

-Pro-di-Mauro-Bonetti:~ mauro$ pg_ctl -D  /Users/postgres/bin/pg_ctl start

-bash: pg_ctl: command not found

I'd suggest installing the database application (9.2) from scratch and get everything working with an empty database.  Then learn what the "data directory" is, find your old one, and replace the "data directory" that was created during the fresh installation with the data directory from the previous installation.

As for the command you ran:

The pg_ctl is apparently not in user "mauro"'s PATH
The -D argument should point to the "data directory", not the pg_ctl executable (how did you even come to write that particular command?)
Usually one does not run the database under a login user account but rather has "postgres" run it.  That the executable is under  /Users/postgres supports this.

Ideally you'd have an actual back-up and so after you install from scratch you can simply restore the backup into the running database instead of manipulation directories at the O/S level.

David J.

Re: [NOVICE] The server does not listen

From
Gerald Cheves
Date:
On 10/16/2017 6:52 PM, David G. Johnston wrote:
On Mon, Oct 16, 2017 at 3:15 PM, <manno_it@libero.it> wrote:

-Pro-di-Mauro-Bonetti:~ mauro$ pg_ctl -D  /Users/postgres/bin/pg_ctl start

-bash: pg_ctl: command not found

I'd suggest installing the database application (9.2) from scratch and get everything working with an empty database.  Then learn what the "data directory" is, find your old one, and replace the "data directory" that was created during the fresh installation with the data directory from the previous installation.

As for the command you ran:

The pg_ctl is apparently not in user "mauro"'s PATH
The -D argument should point to the "data directory", not the pg_ctl executable (how did you even come to write that particular command?)
Usually one does not run the database under a login user account but rather has "postgres" run it.  That the executable is under  /Users/postgres supports this.

Ideally you'd have an actual back-up and so after you install from scratch you can simply restore the backup into the running database instead of manipulation directories at the O/S level.

David J.

For help locating your "data directory" try this

How do I find PostgreSQL's data directory?

https://dba.stackexchange.com/questions/1350/how-do-i-find-postgresqls-data-directory

And then you may have to change the PATH.

How to put psql on the path when using Postgres.app on OS X?

https://stackoverflow.com/questions/20928734/how-to-put-psql-on-the-path-when-using-postgres-app-on-os-x



-- 
siamo arrivati sani e salvi