Code Monkey home page Code Monkey logo

Comments (21)

fcy avatar fcy commented on May 18, 2024 2

I agree it ia not fixed. Reopen.

from postgresapp.

fcy avatar fcy commented on May 18, 2024

Don't know what changed but this isn't happening anymore.

from postgresapp.

fcy avatar fcy commented on May 18, 2024

This problem keeps getting back and the only I know to "solve it" is to reboot (several times).

OS X Console shows:

07/08/12 15:28:21,795 Postgres[9035]: Could not connect the action selectPostgresStatus: to target of class AppDelegate
07/08/12 15:28:22,046 Postgres[9035]: 9037 /Applications/Postgres.app/Contents/MacOS/bin/pg_ctl: Status 0

Please, any ideas about this? Is there any other logs I could check?

from postgresapp.

fadr avatar fadr commented on May 18, 2024

Have you tried setting up your kernel resources as suggested in this article.
Fixed all problems with PostgresApp for me.

from postgresapp.

fcy avatar fcy commented on May 18, 2024

I "solved" the problem by making PostgresApp auto start at login. I still have no idea what the problem is/were. But I'll close this issue since this seems to be a problem in my Mac.

from postgresapp.

cjf avatar cjf commented on May 18, 2024

So I don't think this is solved. I've been trying to find a workaround today for my own machine. Worked fine until this morning. Rebooting didn't seem to have any effect. Same error message.

from postgresapp.

goofrider avatar goofrider commented on May 18, 2024

I'm having the same problem here, can't find any additional log files except those in the Console.app

from postgresapp.

danielberkompas avatar danielberkompas commented on May 18, 2024

Same issue is happening for me. Just started up again - maybe a recent upgrade on Mountain Lion is breaking things. I'm running Mac OS 10.8.2. Can't seem to get Postgres.app up and running again despite restarting twice.

Edit

I was able to solve the problem for me by chmodding my data folder. chmod 700 /Users/dberkom/Library/Application\ Support/Postgres/var

It seems that OS X Mountain Lion has a tendency to apply new permissions to some folders on startup. I've had a few other issues with that today. When I ran postmaster to try to get some more insight to this issue with Postgres.app I got the following error:

$ /Applications/Postgres.app/Contents/MacOS/bin/postmaster -D ~/Library/Application\ Support/Postgres/var
FATAL:  data directory "/Users/dberkom/Library/Application Support/Postgres/var" has group or world access
DETAIL:  Permissions should be u=rwx (0700).

Hence my solution of chmodding the /var folder.

from postgresapp.

jeanlucmongrain avatar jeanlucmongrain commented on May 18, 2024

@fmcypriano that is not a real fix. It's the "Windows" way to fix problem: reboot or reinstall. I reopen this issue.

The problem is caused by postmaster not starting properly when launched by Postgres.app and the error message is written to it's stderr not catched by Postgres.app and lost. it ends not reported in OSX logs and then available to users trough Console.app to see what proper action to take to fix it.

As suggested by @danielberkompas, the best way to know what the problem is, is to run /Applications/Postgres.app/Contents/MacOS/bin/postmaster -D ~/Library/Application\ Support/Postgres/var

from postgresapp.

jeanlucmongrain avatar jeanlucmongrain commented on May 18, 2024

@fmcypriano I can't reopen this issue, can you do it please?

from postgresapp.

mikaelbartlett avatar mikaelbartlett commented on May 18, 2024

I have the same issue as @fmcypriano

Works if I use "Automatically Start at login"

from postgresapp.

jbarbosat avatar jbarbosat commented on May 18, 2024

I am not running PostgresApp but Postgresql dowloaded with the one-clik installer over here...
http://www.postgresql.org/download/macosx/

but I'm still having the same problem. Mine won't work, even if I use "Automatically Start at login"

from postgresapp.

aghyad avatar aghyad commented on May 18, 2024

I'm using the postgres that ships preloaded on Mac Lion ... same problem:

$ which psql
/usr/bin/psql

$ psql --version
psql (PostgreSQL) 9.0.5
contains support for command-line editing

$ psql -h localhost
psql: could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?

Any solutions?

from postgresapp.

jbarbosat avatar jbarbosat commented on May 18, 2024

So I don't know if you guys have been messing around with the postgresql.conf file... I have. It turns out that I had modified the shared_buffers parameter into a bigger quantity that my kernel allows. How did I know this? I actually logged on as my PostgreSQL user when rebooting my computer.

I was trying to restart the server from my usual user:

/Library/PostgreSQL/9.2/bin/pg_ctl start -U postgres -D /Library/PostgreSQL/9.2/data

but I got this:

$ 2013-03-17 05:55:16 CST FATAL:
data directory "/Library/PostgreSQL/9.2/data" has wrong ownership
2013-03-17 05:55:16 CST HINT:  The server must be started by the user
that owns the data directory.

I tried several "sudo su postgres" stuff but nothing worked, so I rebooted, logged on to my PostgreSQL session and over there tried the same but got a permission error:

 Permissions should be u=rwx (0700).

So, chmod:

chmod 700 "/Library/PostgreSQL/9.2/data"

And then again

/Library/PostgreSQL/9.2/bin/pg_ctl start -U postgres -D /Library/PostgreSQL/9.2/data

Which gave me:

postgres$ 2013-03-17 06:01:02 CST FATAL:
could not create shared memory segment: Invalid argument
2013-03-17 06:01:02 CST DETAIL:  Failed system call was
shmget(key=5432001, size=572522496, 03600).
2013-03-17 06:01:02 CST HINT:  This error usually means that
PostgreSQL's request for a shared memory segment exceeded your
kernel's SHMMAX parameter.  You can either reduce the request size or
reconfigure the kernel with larger SHMMAX.  To reduce the request size
(currently 572522496 bytes), reduce PostgreSQL's shared memory usage,
perhaps by reducing shared_buffers or max_connections.
        If the request size is already small, it's possible that it is less
than your kernel's SHMMIN parameter, in which case raising the request
size or reconfiguring SHMMIN is called for.
        The PostgreSQL documentation contains more information about shared
memory configuration.

So, I undid my shared_buffer changes in the postgresql.conf file, restarted the server and everything ran smoothly again. I guess this may be not the usual case for you, guys, but the thing was that I couldn't know what was wrong until I actually logged on to my PostgreSQL user.

The other option seems to be, as @fadr suggested, to checkout kernel configuration. For temporary changes I did:

sudo sysctl -w kern.sysv.shmmax=1073741824

and have had no more problems so far. The link that @fadr posted:

http://www.caktusgroup.com/blog/2009/08/13/setting-postgresqls-shmmax-in-mac-os-x-105-leopard/

from postgresapp.

seba23571 avatar seba23571 commented on May 18, 2024

in my case I had the same problem and solve it with pgadmin 4.
I'm using win, but maybe for linux it's the same.
in the pgadmin 4 manager, go to the menu object, then properties.
In the dialog box go to connection, you have to change the port number. and ready.

from postgresapp.

hammadyasir avatar hammadyasir commented on May 18, 2024

sir I am facing the same problem, kindly give me the solution, when i want to connect Postgresql with AWS then I am facing time session error

from postgresapp.

giridhar2000 avatar giridhar2000 commented on May 18, 2024

in my case I had the same problem and solve it with pgadmin 4.
I'm using win, but maybe for linux it's the same.
in the pgadmin 4 manager, go to the menu object, then properties.
In the dialog box go to connection, you have to change the port number. and ready.
thanks

from postgresapp.

Chitra122499 avatar Chitra122499 commented on May 18, 2024

in my case I had the same problem and solve it with pgadmin 4.
I'm using win, but maybe for linux it's the same.
in the pgadmin 4 manager, go to the menu object, then properties.
In the dialog box go to connection, you have to change the port number. and ready.
thanks

i am also using win but the above procedure is not working

from postgresapp.

bhagwandassoni1953 avatar bhagwandassoni1953 commented on May 18, 2024

root@localhost:/# psql -h localhost -p 5432 -U postgres psql: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

from postgresapp.

bhagwandassoni1953 avatar bhagwandassoni1953 commented on May 18, 2024

🖕.

from postgresapp.

tbussmann avatar tbussmann commented on May 18, 2024

most of the comments in this issue seem to refer to PostgreSQL connection problems in general and / or are about other distributions of PostgreSQL. The ones at the beginning are outdated. I'm going to lock this thread. If you have issues connecting to a server that is provided by PostgresApp, please open a new issue.

from postgresapp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.