9 Replies Latest reply: Mar 25, 2014 7:53 PM by Robb Allan
no1tmorrow Level 1 Level 1 (10 points)

Our company wiki is down, again. This time it appears that the postgre is not running

 

When I run the following command i get the below. I have copied the log file out for clarification. Is there a way to recreate the file it says is missing?

 

Thanks

Thom

 

sudo /Applications/Server.app/Contents/ServerRoot/usr/sbin/serveradmin start postgres_server

 

 

postgres_server:error = "CANNOT_START_SERVICE_TIMEOUT_ERR"

 

 

 

12/21/12 8:57:59.938 AM sudo[6968]:  tmorrow : TTY=ttys000 ; PWD=/Users/tmorrow/Desktop/Server ; USER=root ; COMMAND=/Applications/Server.app/Contents/ServerRoot/usr/sbin/serveradmin start postgres_server

12/21/12 8:58:00.256 AM serveradmin[6969]: servermgr_postgres_server: missing postgres config file: /Library/Server/PostgreSQL For Server Services/Config/com.apple.postgres.plist

12/21/12 8:58:00.257 AM serveradmin[6969]: servermgr_postgres: Could not determine postgres host address to connect to

12/21/12 8:58:00.257 AM serveradmin[6969]: servermgr_postgres_server: waiting for postgres to respond

12/21/12 8:58:00.758 AM serveradmin[6969]: servermgr_postgres_server: missing postgres config file: /Library/Server/PostgreSQL For Server Services/Config/com.apple.postgres.plist

12/21/12 8:58:00.758 AM serveradmin[6969]: servermgr_postgres: Could not determine postgres host address to connect to

12/21/12 8:58:00.758 AM serveradmin[6969]: servermgr_postgres_server: waiting for postgres to respond

12/21/12 8:58:01.260 AM serveradmin[6969]: servermgr_postgres_server: missing postgres config file: /Library/Server/PostgreSQL For Server Services/Config/com.apple.postgres.plist

12/21/12 8:58:01.260 AM serveradmin[6969]: servermgr_postgres: Could not determine postgres host address to connect to

12/21/12 8:58:01.260 AM serveradmin[6969]: servermgr_postgres_server: waiting for postgres to respond

12/21/12 8:58:01.650 AM collabd[116]: [CSConnectionPool:152 5ab8000 +0ms] Could not open a connection to Postgres. Please make sure it is running and has the correct access.

12/21/12 8:58:01.651 AM collabd[116]: [CSServiceDispatchHTTPRouter:120 5ab8000 +0ms] Caught exception "Connection to DB failed" [CSDatabaseError] executing Request{SessionService.enterMagicalAuthRealm()}:

(

          0   CoreFoundation                      0x00007fff832740a6 __exceptionPreprocess + 198

          1   libobjc.A.dylib                     0x00007fff8dfcb3f0 objc_exception_throw + 43

          2   CSService                           0x00000001057943c1 __34-[CSConnectionPool openConnection]_block_invoke_0 + 0

          3   CSService                           0x0000000105795015 -[CSConnectionPool currentConnection] + 115

          4   CSService                           0x00000001057a8d8f -[CSSessionService unauthenticatedSession] + 68

          5   CSService                           0x00000001057a952f -[CSSessionService currentOrNewSession] + 59

          6   CSService                           0x00000001057aa8a5 -[CSSessionService enterMagicalAuthRealm] + 51

          7   CoreFoundation                      0x00007fff8326763c __invoking___ + 140

          8   CoreFoundation                      0x00007fff832674d7 -[NSInvocation invoke] + 263

          9   CSService                           0x000000010579150f -[CSServiceDispatcher executeRequest:asPartOfBatch:usingServiceImpl:] + 1507

          10  CSService                           0x00000001057919be -[CSServiceDispatcher executeRequest:] + 114

          11  collabd                             0x0000000105722383 +[CSServiceDispatchHTTPRouter routeServiceRequest:response:] + 705

          12  collabd                             0x0000000105720e27 __53-[CSRoutingHTTPConnection httpResponseForMethod:URI:]_block_invoke_0 + 73

          13  collabd                             0x000000010572385c __56-[CSHTTPBackgroundResponse initWithConnection:andBlock:]_block_invoke_0 + 185

          14  libdispatch.dylib                   0x00007fff8a01af01 _dispatch_call_block_and_release + 15

          15  libdispatch.dylib                   0x00007fff8a0170b6 _dispatch_client_callout + 8

          16  libdispatch.dylib                   0x00007fff8a0181fa _dispatch_worker_thread2 + 304

          17  libsystem_c.dylib                   0x00007fff83fc2cab _pthread_wqthread + 404

          18  libsystem_c.dylib                   0x00007fff83fad171 start_wqthread + 13

)

12/21/12 8:58:01.668 AM com.apple.launchd[1]: (com.apple.collabd.notifications[6970]) Exited with code: 1

12/21/12 8:58:01.668 AM com.apple.launchd[1]: (com.apple.collabd.notifications) Throttling respawn: Will start in 9 seconds

12/21/12 8:58:01.761 AM serveradmin[6969]: servermgr_postgres_server: missing postgres config file: /Library/Server/PostgreSQL For Server Services/Config/com.apple.postgres.plist

12/21/12 8:58:01.762 AM serveradmin[6969]: servermgr_postgres: Could not determine postgres host address to connect to

12/21/12 8:58:01.762 AM serveradmin[6969]: servermgr_postgres_server: waiting for postgres to respond

12/21/12 8:58:02.263 AM serveradmin[6969]: servermgr_postgres_server: missing postgres config file: /Library/Server/PostgreSQL For Server Services/Config/com.apple.postgres.plist

12/21/12 8:58:02.264 AM serveradmin[6969]: servermgr_postgres: Could not determine postgres host address to connect to

12/21/12 8:58:02.264 AM serveradmin[6969]: servermgr_postgres_server: waiting for postgres to respond

12/21/12 8:58:02.765 AM serveradmin[6969]: servermgr_postgres_server: missing postgres config file: /Library/Server/PostgreSQL For Server Services/Config/com.apple.postgres.plist

12/21/12 8:58:02.765 AM serveradmin[6969]: servermgr_postgres: Could not determine postgres host address to connect to

12/21/12 8:58:02.766 AM serveradmin[6969]: servermgr_postgres_server: waiting for postgres to respond

12/21/12 8:58:03.267 AM serveradmin[6969]: servermgr_postgres_server: missing postgres config file: /Library/Server/PostgreSQL For Server Services/Config/com.apple.postgres.plist

12/21/12 8:58:03.267 AM serveradmin[6969]: servermgr_postgres: Could not determine postgres host address to connect to

12/21/12 8:58:03.267 AM serveradmin[6969]: servermgr_postgres_server: waiting for postgres to respond

12/21/12 8:58:03.768 AM serveradmin[6969]: servermgr_postgres_server: missing postgres config file: /Library/Server/PostgreSQL For Server Services/Config/com.apple.postgres.plist

12/21/12 8:58:03.769 AM serveradmin[6969]: servermgr_postgres: Could not determine postgres host address to connect to

12/21/12 8:58:03.769 AM serveradmin[6969]: servermgr_postgres_server: waiting for postgres to respond

12/21/12 8:58:04.270 AM serveradmin[6969]: servermgr_postgres_server: Timed out trying to start postgres.

12/21/12 8:58:04.272 AM serveradmin[6969]: posting dist not

12/21/12 8:58:04.610 AM com.apple.launchd[1]: (org.postgresql.postgres[6976]) Exited with code: 1

12/21/12 8:58:04.610 AM com.apple.launchd[1]: (org.postgresql.postgres) Throttling respawn: Will start in 10 seconds

12/21/12 8:58:04.804 AM com.apple.launchd[1]: (com.apple.postgres[6981]) Exited with code: 1

12/21/12 8:58:04.804 AM com.apple.launchd[1]: (com.apple.postgres) Throttling respawn: Will start in 10 seconds

  • 1. Re: PostgreSQL Will not start
    no1tmorrow Level 1 Level 1 (10 points)

    When I try to find the file I get this.

    sudo find / -name "com.apple.postgres.plist"

    /Applications/Server.app/Contents/ServerRoot/Library/Preferences/com.apple.postg res.plist

    /Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons/com.ap ple.postgres.plist

    find: /dev/fd/3: Not a directory

    find: /dev/fd/4: Not a directory

  • 2. Re: PostgreSQL Will not start
    Linc Davis Level 10 Level 10 (117,990 points)

    If you have a backup of the missing file, restore it.

     

    Otherwise, back up all data.

     

    Delete Server.app and restore it from the backup. Launch and reinstate services.

  • 3. Re: PostgreSQL Will not start
    no1tmorrow Level 1 Level 1 (10 points)

    Ok. I looked in Time Machine and there was not file there. It appears the directory PostgreSQL For Server was added today during the server update. So I booted into recovery mode and restored the entire first drive from a time machine backup to get it back up and running. So I don't understand though how it happened.

     

    Thanks

  • 4. Re: PostgreSQL Will not start
    ajm_from_WA Level 1 Level 1 (10 points)

    I also have a clean install of mavericks server and see this message in my error log:

    servermgr_postgres_server: missing postgres config file: /Library/Server/PostgreSQL For Server Services/Config/com.apple.postgres.plist

     

    Haven't even setup much on the server yet, just DNS and OD

     

    Is this postgres bug something I need to fix?

  • 5. Re: PostgreSQL Will not start
    ajm_from_WA Level 1 Level 1 (10 points)

    well, I found a copy of com.apple.postgres.plist in apple's libraries:

    http://opensource.apple.com/source/PostgreSQL/PostgreSQL-97/com.apple.postgres.p list

     

    put a copy of this into /Library/Server/PostgreSQL For Server Services/Config/

    chown  to _postgres

    chmod to 740

    rebooted

     

    and so far, I am not seeing the error come back in the logs

  • 6. Re: PostgreSQL Will not start
    ajm_from_WA Level 1 Level 1 (10 points)

    Here is what I heard from apple:

     

    servermgr_postgres_server is not used in Server 3.0.2 but it still exists.  After a clean install as mentioned, that error should never show up unless you are running "sudo serveradmin start postgres_server" or if some service is indirectly enabling the plugin.  You can execute "sudo serveradmin stop postgres_server" to suppress any errors if that's the only issue.  Otherwise we need more information such as the archive that is created by running "sudo /Applications/Server.app/Contents/ServerRoot/usr/sbin/serverloggather".

     

    So, it must be something else that I installed prior to intalling server.

    The items I know I had installed included HandyPrintPro and Crashplan, but i'm not sure if either of them use PostgreSQL.  In any case, the fix I posted above has, for whatever reason, kept that error from showing up in the logs.

  • 7. Re: PostgreSQL Will not start
    jonasmn Level 1 Level 1 (0 points)

    Hi,

     

    I have the same problem. If servermgr_postgres_server is not used, why not just delete it from the harddisk?

     

     

    Regards

    Jonas

    Sweden

  • 8. Re: PostgreSQL Will not start
    Robb Allan Level 2 Level 2 (340 points)

    sudo -s

    ln -s /Library/Server/Postgres/Config /Library/Server/Postgres\ For\ Server\ Services/Config

    ln -s /Library/Server/Postgres/Data /Library/Server/Postgres\ For\ Server\ Services/Data

    serveradmin start postgres

  • 9. Re: PostgreSQL Will not start
    Robb Allan Level 2 Level 2 (340 points)

    Modify that:

     

    1. sudo -s
    2. serveradmin stop postgres
    3. cp -R /Library/Server/Postgres/Config /Library/Server/Postgres\ For\ Server\ Services/
    4. cp -R /Library/Server/Postgres/Data /Library/Server/Postgres\ For\ Server\ Services/
    5. cd /Library/Server/Postgres\ For\ Server\ Services/Config/
    6. mv org.postgresql.postgres.plist com.apple.postgres.plist
    7. edit com.apple.postgres.plist: change "/Library/Server/PostgreSQL/Data" to "/Library/Server/PostgreSQL For Server Services/Data"
    8. serveradmin start postgres