Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Fix a PostgreSQL and Apple Remote Desktop conflict System
You may not realize it, but Apple Remote Desktop (ARD) uses a built-in PostgreSQL instance of its own. When ARD is installed, this PostgreSQL daemon listens on the default port of 5432.

This can cause a conflict if you have your own version of PostgreSQL installed. If, for whatever reason, you cannot or do not want to alter the port your installation uses, you can change the port that ARD's PG uses. As root, simply edit this file:
/var/db/RemoteManagement/RMDB/rmdb.data/postgresql.conf 
Uncomment the port = line, and change it to something else, e.g. 5431. Restart ARD via the Sharing System Preferences pane, and the ARD PostgreSQL will restart with the new port number, freeing up 5432 for your own copy of PostgreSQL.
    •    
  • Currently 2.20 / 5
  You rated: 3 / 5 (5 votes cast)
 
[10,886 views]  

Fix a PostgreSQL and Apple Remote Desktop conflict | 5 comments | Create New Account
Click here to return to the 'Fix a PostgreSQL and Apple Remote Desktop conflict' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Fix a PostgreSQL and Apple Remote Desktop conflict
Authored by: scared on Jan 25, '06 07:43:32AM

how very odd. i've been running postgresql (both from Marc Liyanage and the sourceforge pgsqlformac project (formerly from druware)) for quite some time and have never noticed a conflict with ARD.

how does the conflict manifest itself? i can connect to my postgresql server just fine (for instance, when i update the version, the version number shows up properly in phpPgAdmin and pgAdminIII), and i've never noticed any problems in ARD. is there something specific in ARD that will occur if there is a conflict?

i'm definitely using the standard 5432 port on my postgresql install…



[ Reply to This | # ]
Fix a PostgreSQL and Apple Remote Desktop conflict
Authored by: mayo2ca on Jan 25, '06 09:26:34AM

maybe ARD picks another port if 5432 is in use (or is used when ARD is installed). I haven't had any problems with this either.



[ Reply to This | # ]
Fix a PostgreSQL and Apple Remote Desktop conflict
Authored by: lbundle on Jan 25, '06 02:45:15PM

What generally happens is that when postgresql starts up it creates a file /tmp/.s.PGSQL.5432 if it uses port 5432. In my case ARD would start first, and create this file. Then my postgresql would try to start, but find this file and so (wrongly) assume it has already started and so quits.

I struggled with this for a long time. One bad solution I had was running my database on the ARD instance of postgresql (but ARD only uses version 7.4 :-( ).



[ Reply to This | # ]
Fix a PostgreSQL and Apple Remote Desktop conflict
Authored by: leejoramo on Jan 27, '06 06:33:25AM

I think that I first ran into this problem after I upgraded to Tiger. Under Panther, Apple Remote Desktop and Postgres (I use Marc Liyanage's package) never seemed to conflict. Maybe under Panther the start up order put Liyanage's package ahead of ARD's? I never have needed the data gathering aspects of ARD so I might not have notice if that functionality was missing under Panther.

And just to clarify the original post, this is talking about Apple Remote Desktop 2.x the paid for administrator's application, and not the ARD client that is built into Mac OS X.



[ Reply to This | # ]
Fix a PostgreSQL and Apple Remote Desktop conflict
Authored by: silverdr on Dec 03, '06 09:05:06AM
Well, I definitely have a conflict between ARD and PostgreSQL (7.4.11). My Postgres installation does not start upon boot but when I have ARD activated in the sharing preferences, Postgres refuses to start and says:

FATAL: could not create shared memory segment: Cannot allocate memory
DETAIL: Failed system call was shmget(key=5432001, size=3809280, 03600).
HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space. To reduce the request size (currently 3809280 bytes), reduce PostgreSQL's shared_buffers parameter (currently 300) and/or its max_connections parameter (currently 50).
The PostgreSQL documentation contains more information about shared memory configuration.


When I turn ARD off, start postgres and then turn ARD back on - seems to work fine.

[ Reply to This | # ]