Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I fix the web and wiki server - error reading settings?

Hello,


I upgraded to OS X Mountain Lion and installed the OS X Server. The Wiki pane has the error message "Error Reading Settings". The Websites pane looks fine, but when I click on "View Server Website", I get the webpage that simply says "Server Error". (I am wondering if these are interrelated, which is why I put them in the same discussion.) I will note that the admin tools must have changed since trying to follow the discussions for previous versions of the Server leads to paths that are not present. Any suggestions on what to try would be most appreciated. Many thanks!

Posted on Jul 25, 2012 2:58 PM

Reply
12 replies

Jul 25, 2012 5:49 PM in response to ToshiroOhsumi

If Server app cannot read the Wiki settings, one possible cause is a problem with the PostgreSQL database server. Can you confirm it's running and responding? Using Terminal app, do "sudo serveradmin fullstatus postgres". If that indicates it's not responding, there may be information in /var/log/system.log that could help the diagnosis.

Jul 25, 2012 6:36 PM in response to A 

Hello. Unfortunately, serveradmin is indeed one of those paths/tools that are no longer present in the new version of OS X Server. Either that, or it is renamed to something new that I am not aware of. However, doing a ps -A | grep -i postgres, I get the below. I am not sure if this really means postgres is running or not. Looking in system.log file, I am noticing a weird error (attached). Any thoughts on this would be most appreciated. Many thanks!


--------- ps -A | grep -i postgres -------


3709 ?? 0:01.67 /Applications/Server.app/Contents/ServerRoot/usr/bin/postgres_real -D /Library/Server/PostgreSQL/Data -c listen_addresses= -c log_connections=on -c log_directory=/Library/Logs/PostgreSQL -c log_filename=PostgreSQL.log -c log_lock_waits=on -c log_statement=ddl -c log_line_prefix=%t -c logging_collector=on -c unix_socket_directory=/var/pgsql_socket -c unix_socket_group=_postgres -c unix_socket_permissions=0770

3724 ?? 0:00.79 postgres: logger process

3726 ?? 0:02.08 postgres: writer process

3727 ?? 0:01.45 postgres: wal writer process

3728 ?? 0:02.25 postgres: autovacuum launcher process

3729 ?? 0:05.38 postgres: stats collector process

6591 ?? 0:00.01 postgres: caldav caldav [local] idle

20614 ttys000 0:00.00 grep -i postgres


---------- system.log postgres error? --------------


Jul 25 21:33:32 toshiro-k-ohsumis-macbook-pro.local wikiadmin[20810]: [main.m:81 73290180 +0ms] PID 2655 in /tmp/wikiadmin-is-running.pid is stale, removing

Jul 25 21:33:32 toshiro-k-ohsumis-macbook-pro.local wikiadmin[20810]: [main.m:86 73290180 +0ms] Failed to remove /tmp/wikiadmin-is-running.pid: Permission deniedJul 25 21:33:32 toshiro-k-ohsumis-macbook-pro.local wikiadmin[20810]: [main.m:99 73290180 +0ms] wikiadmin is already running (pid=2655), check /tmp/wikiadmin-is-running.pidJul 25 21:33:32 toshiro-k-ohsumis-macbook-pro.local collabd[8654]: [CSConnectionPool:141 9be8000 +162ms] Schema is STILL out of date (0 < 69) after launching wikiadmin, update failed! collabd will refuse to run until this is fixed.Jul 25 21:33:32 toshiro-k-ohsumis-macbook-pro.local collabd[8654]: [CSConnectionPool:152 9be8000 +0ms] Could not open a connection to Postgres. Please make sure it is running and has the correct access.Jul 25 21:33:32 toshiro-k-ohsumis-macbook-pro.local collabd[8654]: [PGCConnection:148 9be8000 +4ms] Error in TXN: Error executing query [INSERT INTO entity_attrs (entity_uid_fk, attrs_bin) VALUES ($1, $2)]: ERROR: bind message supplies 0 parameters, but prepared statement "" requires 2 ( 0 CoreFoundation 0x00007fff8d8ca716 __exceptionPreprocess + 198 1 libobjc.A.dylib 0x00007fff8e824470 objc_exception_throw + 43

2 PostgreSQLClient 0x00000001099929ae -[PGC

Connection checkResultOK:forSQL:] + 360

3 PostgreSQLClient 0x00000001099935bd -[PGC

Connection executeUpdate:withParams:] + 879

4 CSService 0x00000001098e9298 -[CSContentService insertEntityAttributesRow:inTable:withGUID:] + 275

5 CSService 0x00000001098ea1fc __57-[CSContentService _internalCreateEntity:asUser:withACL:]_block_invoke_0 + 586

6 PostgreSQLClient 0x00000001099925a2 -[PGCConnection transactionInBlock:onError:] + 62

7 CSService 0x00000001098e9f3f -[CSContentService _internalCreateEntity:asUser:withACL:] + 771

8 CSService 0x000000010990b3e5 __88-[CSContentService createEntitiesFromTemplate:withData:andVariables:andACL:andLanguage:]_block_inv oke_0 + 898

9 PostgreSQLClient 0x00000001099925a2 -[PGCConnection transactionInBlock:onError:] + 62

10 CSService 0x000000010990b004 -[CSContentService createEntitiesFromTemplate:withData:andVariables:andACL:andLanguage:] + 237

11 CSService 0x000000010990b5f1 -[CSContentService createEntitiesFromTemplate:withData:andVariables:andACL:] + 126

12 CSService 0x000000010990ba6b -[CSContentService createEntitiesFromTemplate:] + 124

13 CSService 0x000000010990cd84 __24-[CSContentService init]_block_invoke_02420 + 225

14 PostgreSQLClient 0x00000001099925f7 -[PGCConnection transactionInBlock:onError:] + 147

15 CSService 0x000000010990c4f4 -[CSContentService init] + 789

16 CSService 0x00000001098bb11b -[CSLocalServiceLocator allocateService:] + 191

17 CSService 0x00000001098bb1c7 -[CSLocalServiceLocator locateService:] + 108

18 CSService 0x00000001098c1cf7 -[CSServiceBase locateService:] + 70

19 CSService 0x00000001098d3f55 __42-[CSSessionService unauthenticatedSession]_block_invoke_0 + 35

20 CSService 0x00000001098c26d7 -[CSServiceBase disableRefObjsInBlock:] + 279

21 CSService 0x00000001098d3e13 -[CSSessionService unauthenticatedSession] + 200

22 CSService 0x00000001098d452f -[CSSessionService currentOrNewSession] + 59

23 CSService 0x00000001098d58a5 -[CSSessionService enterMagicalAuthRealm] + 51

24 CoreFoundation 0x00007fff8d8bdcac __invoking___ + 140

25 CoreFoundation 0x00007fff8d8bdb47 -[NSInvocation invoke] + 263

26 CSService 0x00000001098bc50f -[CSServiceDispatcher executeRequest:asPartOfBatch:usingServiceImpl:] + 1507

27 CSService 0x00000001098bc9be -[CSServiceDispatcher executeRequest:] + 114

28 collabd 0x0000000109851393 +[CSServiceDispatchHTTPRouter routeServiceRequest:response:] + 705

29 collabd 0x000000010984fe37 __53-[CSRoutingHTTPConnection httpResponseForMethod:URI:]_block_invoke_0 + 73

30 collabd 0x000000010985286c __56-[CSHTTPBackgroundResponse initWithConnection:andBlock:]_block_invoke_0 + 185

31 libdispatch.dylib 0x00007fff82b49f3d _dispatch_call_block_and_release + 15

32 libdispatch.dylib 0x00007fff82b460fa _dispatch_client_callout + 8

33 libdispatch.dylib 0x00007fff82b4723e _dispatch_worker_thread2 + 304

34 libsystem_c.dylib 0x00007fff8cc0cceb _pthread_wqthread + 404

35 libsystem_c.dylib 0x00007fff8cbf71b1 start_wqthread + 13

)

Jul 26, 2012 11:15 PM in response to ToshiroOhsumi

I also have the same problem.


i try to using Terminal app, do "sudo serveradmin fullstatus postgres"


------------

postgres:dataDirHasBeenInitialized = no

postgres:PG_VERSION = "9.1.4"

postgres:dataDir = "/Library/Server/PostgreSQL/Data"

postgres:postgresIsResponding = no

postgres:dataDirIsDirectory = no

postgres:PGserverVersion = 0

postgres:dataDirExists = no

postgres:setStateVersion = 1

postgres:state = "RUNNING"


-------------

it is running !


so how can I do ?

Jul 27, 2012 1:40 PM in response to woba

Hello. Unfortunately, the repair permssions may not be the issue for me.


I think a problem may be that I had an old version of Apple OS X Server on my machine before.


Can someone tell me what I need to do (beyond just dragging the Server to the trash) to completely eradicate all traces of the current and previous server(s)? That way, it is as starting from scratch. Many thanks!

Jun 12, 2013 1:01 PM in response to ToshiroOhsumi

I don't know if this will help, however, I just fixed a problem that I had (it looks the same as yours).

There are two postgres process running on a ML server.

One is used by the server itself, you should not play with that.

The other we can use to create our own db.

To make it work, do the following

run

sudo serveradmin stop postgres


The resst you can use terminal, but most are weary of it, so lets go the GUI way.


There is only one file on "/Library/Server/PostgresSQL/Config/" : org.postgresql.postgres.plist

Go to this folder via Finder.


Copy this file to the desktop and change the "listen_adresses" to 127.0.0.1.

Save it, close it.

Copy it back to the directory above, you will be prompted for your admin password.


Start your postgres (sudo serveradmin start postgres) and everything should be fine.

Jun 17, 2013 12:29 PM in response to deivy

https://discussions.apple.com/thread/5086952?answerId=22256237022#22256237022 has the logs.


yes, ok in terminal, no it was never working. Clean reformat of the drive to 10.8 and then copy server.app to the application folder and run. Get error messages saying "failed for weird reason".


Just trying to get server up and going. This is a lab machine thus the reformat.

How do I fix the web and wiki server - error reading settings?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.