1 2 Previous Next 23 Replies Latest reply: Jan 8, 2013 11:42 AM by kristin119 Go to original post
  • 15. Re: Upgrading to OS X Server 2.2 Results in Errors
    joel2931 Level 1 Level 1 (15 points)

    This is a very good point and could result in failed database migration when updating to Server 2.2.  For now I would recommend shutting down any 3rd-party PostgreSQL service that is using the localhost TCP port 5432 while updating to Server 2.2, and you should be able to then re-enable it after the update with no problem.

  • 16. Re: Upgrading to OS X Server 2.2 Results in Errors
    Joel Hedden Level 1 Level 1 (15 points)

    Hi Jon: The missing "_devicemgr" role is interesting and would likely indicate that the postgres database migration failed.  If that occurred then you should have seen an error message while updating to Server 2.2.  The role is not a user account and will only show up when querying the postgres database.  You can do this by running:

    sudo /Applications/Server.app/Contents/ServerRoot/usr/bin/psql -U _postgres postgres -h /Library/Server/PostgreSQL\ For\ Server\ Services/Socket -c "\dg;"

     

    Could you check the contents of /Library/Logs/ServerSetup.log, and maybe dump them here?  There should be the execution of a "58_postgres_setup.rb" followed by a "RESULT CODE: 0" indicating success but it may have failed.

  • 17. Re: Upgrading to OS X Server 2.2 Results in Errors
    Miggl Level 1 Level 1 (75 points)

    I want to second what Joel said. On Server App 2.1 I was running Postrgres App 1.0 which was running on port 5432. Prior to Server App 2.2 I don't think that OS X Server was listening on port 5432, but instead used the socket to let the services connect directly to the database. It seems that Server App 2.2 has changed that now and actually works on port 5432, thus the upgrade process would have conflicted with the running instance of Postgres on port 5432.

     

    I have restored from a time machine backup, turned off the 3rd party Postgres instance, performed the upgrade, then installed the 3rd party Postgres instance to run on port 5433. Everything is working perfectly now. I have been running successfully now for 3 days without incident -- sorry for it posting this solution sooner, I just didn't have the time.

     

    Thanks!

    ~Mike

  • 18. Re: Upgrading to OS X Server 2.2 Results in Errors
    Jon G. Hall Level 1 Level 1 (0 points)

    Here a partial logfile dump around the 58_postgres_setup.rb:

     

    10:01:07.095 Setup extra succeeded:

    path: /Applications/Server.app/Contents/ServerRoot/System/Library/ServerSetup/Promoti onExtras/50-EventMonitor.sh

    RESULT CODE: 0

    STDOUT: EventMonitorPromotion: Adding the new rules path to emond.plist

    EventMonitorPromotion: Cycle emond

     

     

    STDERR: com.apple.emond: Already loaded

     

     

     

     

    10:01:07.101 Setup extra succeeded:

    path: /Applications/Server.app/Contents/ServerRoot/System/Library/ServerSetup/Promoti onExtras/51-ServerPerfLogAndEmond.sh

    RESULT CODE: 0

    STDOUT: start ServerPerfLog

    start Emond

     

     

    STDERR:

     

     

    I, [2012-12-07T10:01:07.321273 #80425]  INFO -- : *** PostgreSQL Promotion start ***

    I, [2012-12-07T10:01:07.321781 #80425]  INFO -- : Creating Service Directory for server database

    I, [2012-12-07T10:01:07.324238 #80425]  INFO -- : Creating Socket Directory for server database

    I, [2012-12-07T10:01:07.324443 #80425]  INFO -- : Creating Config Directory for server database cluster

    I, [2012-12-07T10:01:07.324608 #80425]  INFO -- : Copying template postgres config files for server database cluster for data location key migration

    I, [2012-12-07T10:01:07.360418 #80425]  INFO -- : Copying template postgres config files for customer database cluster

    I, [2012-12-07T10:01:07.392961 #80425]  INFO -- : Moving previous database directory aside to : /Library/Server/PostgreSQL/Data.2012-12-07 10:01.before_upgrade_to_postgres_9.2

    I, [2012-12-07T10:01:07.393393 #80425]  INFO -- : Initializing the target customer-specific database cluster

    I, [2012-12-07T10:01:10.339670 #80425]  INFO -- : Running pg_upgrade...

    I, [2012-12-07T10:01:25.052854 #80425]  INFO -- : Restarting customer-specific postgres with new settings, to check for successful initialization

    I, [2012-12-07T10:01:25.646171 #80425]  INFO -- : Initializing the server-specific database cluster

    I, [2012-12-07T10:01:27.859248 #80425]  INFO -- : Restarting server-specific postgres with new settings, to check for successful initialization

    W, [2012-12-07T10:01:31.942964 #80425]  WARN -- : Postgres is not responding after upgrade: {"state"=>"RUNNING", "dataDirExists"=>true, "setStateVersion"=>1, "postgresIsResponding"=>false, "dataDir"=>"/Library/Server/PostgreSQL For Server Services/Data", "PGserverVersion"=>0, "dataDirIsDirectory"=>true, "PG_VERSION"=>"9.2.1", "dataDirHasBeenInitialized"=>true}

    E, [2012-12-07T10:01:31.943070 #80425] ERROR -- : Wiki, Profile Manager, and other services will not be available.

    I, [2012-12-07T10:01:31.943109 #80425]  INFO -- : *** PostgreSQL Promotion end ***

    10:01:31.946 Setup extra failed:

    path: /Applications/Server.app/Contents/ServerRoot/System/Library/ServerSetup/Promoti onExtras/58_postgres_setup.rb

    RESULT CODE: 2

    STDOUT:

    STDERR:

    WARNING: enabling "trust" authentication for local connections

    You can change this by editing pg_hba.conf or using the option -A, or

    --auth-local and --auth-host, the next time you run initdb.

    WARNING:  invalid value for parameter "default_text_search_config": "english_nostop"

    WARNING:  invalid value for parameter "default_text_search_config": "english_nostop"

     

     

    WARNING: enabling "trust" authentication for local connections

    You can change this by editing pg_hba.conf or using the option -A, or

    --auth-local and --auth-host, the next time you run initdb.

     

     

     

     

    10:01:32.009 Setup extra succeeded:

    path: /Applications/Server.app/Contents/ServerRoot/System/Library/ServerSetup/Promoti onExtras/59_calendarpromotion.py

    RESULT CODE: 0

    STDOUT:

    STDERR:

     

  • 19. Re: Upgrading to OS X Server 2.2 Results in Errors
    HenryS Level 2 Level 2 (295 points)

    Is there any correlation to my problem with Wiki Server (errors) on OS X Server 2.2.x? Have a look, see this post...

  • 20. Re: Upgrading to OS X Server 2.2 Results in Errors
    badm0j0 Level 1 Level 1 (0 points)

    I found I had to remote into the server, open Server app locally to upgrades services, then I was able to connect correctly from Server 2.2 app on remote mac.

  • 21. Re: Upgrading to OS X Server 2.2 Results in Errors
    Jon G. Hall Level 1 Level 1 (0 points)

    Got it working but don't know how:

     

    * deleted the server

    * Installed Postgres.app from http://postgresapp.com

    * ran it once

    * ran sudo port uninstall postgres

    * reinstalled the server

     

    and it worked. I don't know why, but it's back up and running.

     

    Thanks to all!

     

    Jon

  • 22. Re: Upgrading to OS X Server 2.2 Results in Errors
    Miggl Level 1 Level 1 (75 points)

    I think the following is happening here:

    • Uninstalling doesn't remove postgres from the server, it just removes the server functionality contained in the server app, so Postgres is actually still running on port 5432, even though server app is uninstalled.
    • Installing PostgresApp detected that the server was already listening on port 5432 and most likely switched to 5433 or a similar port.
    • Uninstalling your 3rd-party version of postgres removed the conflict on port 5432.
    • Reinstalling Server App ran fine, because there were no conflicting postgres servers listening both on the same port, but each had their own port now.

     

    If you're installing an an actual server, not a workstation or laptop, I would recommend the official Postgres installer that you can find here: http://www.enterprisedb.com/products/pgdownload.do#osx

     

    PostgresApp requires that a user be logged on, and that it is launched as an app within the userspace. The official postgres server actually runs as a service in its own userspace and starts up when the machine is fired up, not when the user logs on.

     

    PostgresApp is a great little tool for dev machines, but I prefer the full monte for the server.

     

    Glad to hear you got things going again -- I just wanted to offer an explanation that may help others in their trouble-shooting process.

     

    Good luck!

    ~Mike

  • 23. Re: Upgrading to OS X Server 2.2 Results in Errors
    kristin119 Level 1 Level 1 (15 points)

    Is anyone having s second layer of problems after getting Server 2.2 to run cleanly?

     

    I had similar startup errors after installing the 2.2 upgrade, with constant reports that the Wiki server didn't intialize properly (I wasn't running a Wiki server), but I had an nfs mount problem going on at the same time and shunted the 2.2 problems aside. Solving my nfs problem involved restoring the entire server from backup and running the Server 2.2 update from scratch, which seems to have done much the same thing as the recommended fix. After that everything seemed fine. - I was not running any third party postgres software before or after the upgrade.

     

    However, I am continue to see some flakiness with user logins; the syslog shows problems with LDAP and kerberos. AND I can't do any network user editing from the Server App; everything has to be done from Workgroup Manager. Editing local users works fine. I've seen only one reference to this in discussions which suggests rebuilidng the Open Directory - not a happy option.

     

    The kerberos errors looks like this:

    1/2/13 12:18:32.308 AM ruby[8525]: CFPreferences: user home directory for user kCFPreferencesCurrentUser at /var/teamsserver is unavailable. User domains will be volatile.

    and

    Jan  8 10:36:34 localdomain kdc[68]: Got a canonicalize request for a LKDC realm from 10.0.1.4:49801

    Jan  8 10:36:34 localdomain kdc[68]: Asked for LKDC, but there is none

    and

    Jan  8 10:36:45 localdomain kdc[68]: AS-REQ 9C8E5B86F88F64EAE35ECA902B32773233EA18BE@localdomain from 10.0.1.4:49807 for krbtgt/localdomain@localdomain

    Jan  8 10:36:45 localdomain kdc[68]: UNKNOWN -- 9C8E5B86F88F64EAE35ECA902B32773233EA18BE@localdomain: no such entry found in hdb

     


     

    The LDAP errors looks like this:

    1/2/13 1:17:35.101 AM serveradmin[8742]: servermgr_accounts: got error 5000 trying to auth to local LDAP node

    and

    1/8/13 9:12:21.591 AM opendirectoryd[26]: GSSAPI Error:  Miscellaneous failure (see text (Server (ldap/localdomain@localdomain) unknown while looking up 'ldap/localdomain@localdomain' (cached result, timeout in 1200 sec) (negative cache))

    and (from var/log/opendirectoryd.log)

    2013-01-08 09:55:49.551091 PST - 66763.248938 - Client: odproxyd, UID: 0, EUID: 0, GID: 0, EGID: 0

    2013-01-08 09:55:49.551091 PST - 66763.248938, Node: /LDAPv3/localdomain, Module: AppleODClientPWS - pws_get_policy: parameter named "account_id_str" is NULL


    FWIW, I was having kerberos and NetAuth errors prior to the upgrade; I was NOT having LDAP errrors.

1 2 Previous Next