{"id":2656,"date":"2014-05-14T22:07:25","date_gmt":"2014-05-14T13:07:25","guid":{"rendered":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/?p=2656"},"modified":"2014-05-14T22:07:25","modified_gmt":"2014-05-14T13:07:25","slug":"os-x-server-3-1-%e3%81%ae-caldavd","status":"publish","type":"post","link":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/2014\/2656","title":{"rendered":"OS X Server 3.1 \u306e caldavd"},"content":{"rendered":"<p>OS X Server \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3092\u3057\u305f\u3089\u4f8b\u306b\u3088\u3063\u3066 caldavd \u304c\u52d5\u304b\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002\u3082\u3046\u304a\u7d04\u675f\u904e\u304e\u3066\u7a81\u3063\u8fbc\u3080\u6c17\u306b\u3082\u306a\u308c\u307e\u305b\u3093\u304c\u3001\u76f4\u3057\u305f\u306e\u3067\u30e1\u30e2\u3002\u66f8\u304f\u306e\u3092\u30b5\u30dc\u3063\u3066\u308b\u3046\u3061\u306b\u5927\u5206\u6642\u9593\u304c\u904e\u304e\u3066\u3057\u307e\u3063\u305f\u2026\u3002<\/p>\n<p>\u3068\u3044\u3063\u3066\u3082\u3001\u3044\u3064\u3082\u306e\u3088\u3046\u306b(?) caldavd \u7528\u306e PostgreSQL \u304c\u52d5\u3044\u3066\u306a\u3044\u3060\u3051\u3063\u307d\u3044\u3067\u3059\u304c\u3002<\/p>\n<p><!--more--><\/p>\n<p><a title=\"caldavd \u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\" href=\"http:\/\/borg4.vdomains.jp\/~goro\/diary\/2013\/2479\">\u4ee5\u524d\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u308b\u3088\u3046\u306b\u3057\u305f<\/a>\u3068\u304d\u306b\u3044\u308d\u3044\u308d\u8abf\u3079\u305f\u306e\u3067\u3001\u305d\u308c\u3092\u30d9\u30fc\u30b9\u306b\u3001\u3068\u601d\u3063\u305f\u3089\u305d\u3082\u305d\u3082\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3082\u5931\u6557\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c(\u7b11)\u3001\u8abf\u67fb\u3059\u308b\u306b\u306f\u5f79\u7acb\u3061\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305a\u306f\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u306b\u5931\u6557\u3057\u3066\u308b\u7406\u7531\u3092\u63a2\u308c\u3001\u3068\u3044\u3046\u3053\u3068\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4e00\u884c\u305a\u3064\u5b9f\u884c\u3057\u305f\u3068\u3053\u308d<\/p>\n<pre>caldav_datadir=`ls -d \/var\/run\/caldavd\/*\/`<\/pre>\n<p>\u3067\u30b3\u30b1\u3066\u3044\u308b\u307f\u305f\u3044\u3002 3 \u306e\u6642\u306f\u30bd\u30b1\u30c3\u30c8\u304c \/var\/run\/caldavd\/ccs_postgres_XXXXXXXXXXXXXXXXXXXXXX\/ \u3068\u3044\u3046\u611f\u3058\u3067\u958b\u304b\u308c\u3066\u305f\u306e\u3067\u3001\u305d\u308c\u306b\u5bfe\u5fdc\u3059\u3079\u304f\u3053\u3093\u306a\u30b3\u30fc\u30c9\u306b\u3057\u3066\u305f\u3093\u3060\u3051\u3069\u306a\u3001\u3068\u304b\u601d\u3044\u306a\u304c\u3089 \/var\/run\/caldavd \u3092\u8997\u3044\u3066\u307f\u308b\u3068 \/var\/run\/caldavd\/PostgresSocket\/ \u3068\u3044\u3046\u306e\u304c\u751f\u3048\u3066\u307e\u3057\u305f\u3002\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u7684\u306b\u3053\u3063\u3061\u306b\u79fb\u884c\u3057\u305f\u3088\u3046\u3067\u3059\u3002\u306a\u306e\u3067\u3053\u3053\u3092\u6307\u5b9a\u3059\u3079\u304f<\/p>\n<pre>goro@flora:~$ sudo \/Applications\/Server.app\/Contents\/ServerRoot\/usr\/bin\/psql -U _calendar -h \/var\/run\/caldavd\/PostgresSocket\/ caldav<\/pre>\n<p>\u3068\u304b\u3084\u308b\u3068 PostgreSQL \u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3057\u305f\u3002\u3068\u306a\u308b\u3068\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306b\u5931\u6557\u3057\u305f\u306e\u30ab\u30ca? \u3068 \/var\/log\/caldavd\/migration.log \u3092\u773a\u3081\u3066\u307f\u308b\u3068<\/p>\n<pre>2014-03-18 19:03:03+0900 Beginning database schema check.\r\n2014-03-18 19:03:03+0900 Required database key VERSION: 28.\r\n2014-03-18 19:03:03+0900 Actual database key VERSION: 24.\r\n2014-03-18 19:03:03+0900 Starting schema upgrade from version 24 to 28.\r\n2014-03-18 19:03:03+0900 Applying schema upgrade: upgrade_from_24_to_25.sql\r\n2014-03-18 19:03:03+0900 Applying schema upgrade: upgrade_from_25_to_26.sql\r\n2014-03-18 19:03:04+0900 Applying schema upgrade: upgrade_from_26_to_27.sql\r\n2014-03-18 19:03:04+0900 Unable to format event {'log_namespace': 'twext.enterprise.adbapi2', 'log_level': &lt;LogLevel=error&gt;, 'logLevel': 40, 'message': (), 'time': 1395136984.306081, 'log_source': None, 'system': '-', 'why': 'Exception from execute() on first statement in transaction.\u00a0 Possibly caused by a database server restart.\u00a0 Automatically reconnecting now.', 'failure': &lt;twisted.python.failure.Failure &lt;class 'pg.ProgrammingError'&gt;&gt;, 'log_logger': &lt;Logger 'twext.enterprise.adbapi2'&gt;, 'log_format': None, 'log_time': 1395136984.305996, 'isError': 1}:\r\nNo log format provided\r\n2014-03-18 19:03:04+0900 Step failure\r\n2014-03-18 19:03:04+0900 Step failure\r\n2014-03-18 19:03:04+0900 Step failure\r\n2014-03-18 19:03:04+0900 Step failure\r\n2014-03-18 19:03:04+0900 Step failure\r\n2014-03-18 19:03:04+0900 Step failure\r\nFailed to start service.\r\n2014-03-18 19:03:06+0900 postgres process ended with status 0<\/pre>\n<p>\u3053\u308c\u3067\u3082\u304b\u3001\u3068\u8a00\u308f\u3093\u3070\u304b\u308a\u306b\u5931\u6557\u3057\u3066\u307e\u3059\u306d(\u5931\u7b11\u3002\u3067\u3042\u308c\u3070\u518d\u5ea6\u624b\u52d5\u3067\u8a66\u305b\u3070\u3044\u3044\u306e\u304b\u306a\u3001\u3068 upgrade_from_26_to_27.sql \u3092\u63a2\u3057\u307e\u3059\u3002<\/p>\n<pre>goro@flora:~$ mdfind upgrade_from_26_to_27.sql\r\ngoro@flora:~$<\/pre>\n<p>\u2026\u898b\u3064\u304b\u3089\u306a\u3044\u3002\u3051\u3069\u3001\u304d\u3063\u3068 \/Applications\/Server.app \u306e\u4e0b\u306b\u3042\u308b\u306b\u306f\u9593\u9055\u3044\u306a\u3044<\/p>\n<pre>goro@flora:~$ find \/Applications\/Server.app -name upgrade_from_26_to_27.sql\r\n\/Applications\/Server.app\/Contents\/ServerRoot\/usr\/share\/caldavd\/lib\/python\/txdav\/common\/datastore\/sql_schema\/upgrades\/oracle-dialect\/upgrade_from_26_to_27.sql\r\n\/Applications\/Server.app\/Contents\/ServerRoot\/usr\/share\/caldavd\/lib\/python\/txdav\/common\/datastore\/sql_schema\/upgrades\/postgres-dialect\/upgrade_from_26_to_27.sql\r\ngoro@flora:$\r\n<\/pre>\n<p>\u307b\u3089\u3001\u898b\u3064\u304b\u3063\u305f\u3002 oracle \u306e\u6587\u8a00\u306b\u82e5\u5e72\u30d3\u30d3\u308b\u3082\u306e\u306e\u3001\u5bfe\u8c61\u306f PostgreSQL \u3060\u3057\u30fc\u3001\u3068\u3044\u3046\u3053\u3068\u3067<\/p>\n<pre>goro@flora:~$ sudo \/Applications\/Server.app\/Contents\/ServerRoot\/usr\/bin\/psql -U _calendar -h \/var\/run\/caldavd\/PostgresSocket\/ caldav &lt; \/Applications\/Server.app\/Contents\/ServerRoot\/usr\/share\/caldavd\/lib\/python\/txdav\/common\/datastore\/sql_schema\/upgrades\/postgres-dialect\/upgrade_from_26_to_27.sql\r\ngoro@flora:$ sudo \/Applications\/Server.app\/Contents\/ServerRoot\/usr\/bin\/psql -U _calendar -h \/var\/run\/caldavd\/PostgresSocket\/ caldav &lt; \/Applications\/Server.app\/Contents\/ServerRoot\/usr\/share\/caldavd\/lib\/python\/txdav\/common\/datastore\/sql_schema\/upgrades\/postgres-dialect\/upgrade_from_27_to_28.sql\r\n<\/pre>\n<p>\u2026\u3042\u3063\u3055\u308a\u6210\u529f\u3057\u305f\u3057\u3002<\/p>\n<pre>goro@flora:~$ sudo \/Applications\/Server.app\/Contents\/ServerRoot\/usr\/bin\/psql -U _calendar -h \/var\/run\/caldavd\/PostgresSocket\/ caldav\r\nPassword:\r\npsql (9.2.4)\r\nType \"help\" for help.\r\n\r\ncaldav=# select * from CALENDARSERVER WHERE name='VERSION';\u00a0\r\n\u00a0 name\u00a0\u00a0 | value\r\n---------+-------\r\n\u00a0VERSION | 28\r\n(1 row)\r\n\r\ncaldav=#<\/pre>\n<p>\u554f\u984c\u306a\u3044\u3063\u307d\u3044\u3057\u3002<\/p>\n<pre>goro@flora:~$ sudo \/Applications\/Server.app\/Contents\/ServerRoot\/usr\/sbin\/serveradmin start calendar\r\ncalendar:readWriteSettingsVersion = 1\r\ncalendar:setStateVersion = 1\r\ncalendar:state = \"RUNNING\"\r\ncalendar:contactsState = \"RUNNING\"\r\ncalendar:calendarState = \"RUNNING\"\r\ngoro@flora:~$<\/pre>\n<p>\u3080\u3057\u308d\u3069\u3053\u3067\u5931\u6557\u3057\u305f\u304b\u554f\u3044\u8a70\u3081\u305f\u304f\u306a\u308b\u30ec\u30d9\u30eb(\u7b11)\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u518d\u3073\u7121\u4e8b\u306b\u30ab\u30ec\u30f3\u30c0\u30fc\u304c\u52d5\u304f\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OS X Server \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3092\u3057\u305f\u3089\u4f8b\u306b\u3088\u3063\u3066 caldavd \u304c\u52d5\u304b\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002\u3082\u3046\u304a\u7d04\u675f\u904e\u304e\u3066\u7a81\u3063\u8fbc\u3080\u6c17\u306b\u3082\u306a\u308c\u307e\u305b\u3093\u304c\u3001\u76f4\u3057\u305f\u306e\u3067\u30e1\u30e2\u3002\u66f8\u304f\u306e\u3092\u30b5\u30dc\u3063\u3066\u308b\u3046\u3061\u306b\u5927\u5206\u6642\u9593\u304c\u904e\u304e\u3066\u3057\u307e\u3063\u305f\u2026\u3002 \u3068\u3044\u3063 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[77,62,23],"class_list":["post-2656","post","type-post","status-publish","format-standard","hentry","category-mac","tag-mac","tag-os-x-server","tag-software"],"_links":{"self":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts\/2656","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/comments?post=2656"}],"version-history":[{"count":3,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts\/2656\/revisions"}],"predecessor-version":[{"id":2679,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts\/2656\/revisions\/2679"}],"wp:attachment":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/media?parent=2656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/categories?post=2656"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/tags?post=2656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}