0

AEM-author と Mongo レプリカ セットをインストールした後、うまく機能しているように見えました。インストールされている AEM のバージョンは 6.2 です

そこで、以下の方法で自動フェイルオーバー機能を確認してみました。1. 現在のプライマリである mongod インスタンスを停止します 2. rs.status() mongo コマンドを発行して、セカンダリがプライマリになるかどうかを確認します 3. AEM-author の logs/error.log を確認します

Mongo レプリカ セットは正しくフェールオーバーしたようです。しかし、AEM-author は次のエラーを表示して壊れていました。

/home/vagrant/mounts/author1/aem/22_crx-quickstart/logs/error__5.log:01.11.2016 12:36:06.386 *ERROR* [pool-44-thread-1] org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl cannot unregister ServiceUserMapped Mapping [serviceName=com.adobe.cq.social.cq-social-messaging, subServiceName=utility-reader, userName=communities-utility-reader]
/home/vagrant/mounts/author1/aem/22_crx-quickstart/logs/error__5.log:01.11.2016 12:36:06.386 *ERROR* [pool-44-thread-1] org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl cannot unregister ServiceUserMapped Mapping [serviceName=com.adobe.cq.social.cq-social-messaging, subServiceName=acl-manager, userName=communities-acl-manager]
/home/vagrant/mounts/author1/aem/22_crx-quickstart/logs/error__5.log:01.11.2016 12:36:06.964 *ERROR* [FelixDispatchQueue] org.apache.felix.http.jetty FrameworkEvent ERROR (org.osgi.framework.BundleException: Activator stop error in bundle org.apache.felix.http.jetty [36].)
/home/vagrant/mounts/author1/aem/22_crx-quickstart/logs/error_6.log:01.11.2016 13:27:59.516 *ERROR* [DocumentDiscoveryLiteService-BackgroundWorker-[2]] org.apache.jackrabbit.oak.plugins.document.DocumentDiscoveryLiteService doRun: got an exception: com.mongodb.MongoTimeoutException: Timed out after 10000 ms while waiting for a server that matches {serverSelectors=[ReadPreferenceServerSelector{readPreference=primary}, LatencyMinimizingServerSelector{acceptableLatencyDifference=15 ms}]}. Client view of cluster state is {type=ReplicaSet, servers=[{address=172.18.8.248:27017, type=ReplicaSetArbiter, averageLatency=1.0 ms, state=Connected}, {address=SERVW0014:27017, type=Unknown, state=Connecting, exception={com.mongodb.MongoException$Network: Exception opening the socket}, caused by {java.net.SocketException: Connection reset}}, {address=SERVW0015:27017, type=ReplicaSetSecondary, averageLatency=1.3 ms, state=Connected}]
/home/vagrant/mounts/author1/aem/22_crx-quickstart/logs/error_6.log:01.11.2016 13:29:46.343 *ERROR* [DocumentNodeStore background read thread (2)] org.apache.jackrabbit.oak.plugins.document.ClusterNodeInfo This oak instance failed to update the lease in time and can therefore no longer access this DocumentNodeStore. (leaseEndTime: 1477974601170, leaseTime: 120000, leaseFailureMargin: 20000, lease check end time (leaseEndTime-leaseFailureMargin): 1477974581170, now: 1477974585328, remaining: -4158) Need to stop oak-core/DocumentNodeStoreService.
/home/vagrant/mounts/author1/aem/22_crx-quickstart/logs/error_6.log:01.11.2016 13:29:46.343 *ERROR* [LeaseFailureHandler-Thread] org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService handleLeaseFailure: stopping oak-core...
/home/vagrant/mounts/author1/aem/22_crx-quickstart/logs/error_6.log:01.11.2016 13:29:46.422 *ERROR* [LeaseFailureHandler-Thread] org.apache.jackrabbit.oak.plugins.document.ClusterNodeInfo This oak instance failed to update the lease in time and can therefore no longer access this DocumentNodeStore.
/home/vagrant/mounts/author1/aem/22_crx-quickstart/logs/error_6.log:01.11.2016 13:29:46.422 *ERROR* [LeaseFailureHandler-Thread] org.apache.sling.discovery.oak [org.apache.sling.discovery.oak.OakDiscoveryService(256)] The updatedPropertyProvider method has thrown an exception (com.google.common.util.concurrent.ExecutionError: java.lang.AssertionError: This oak instance failed to update the lease in time and can therefore no longer access this DocumentNodeStore.)
/home/vagrant/mounts/author1/aem/22_crx-quickstart/logs/error_6.log:01.11.2016 13:29:46.453 *ERROR* [LeaseFailureHandler-Thread] org.apache.jackrabbit.oak.plugins.document.ClusterNodeInfo This oak instance failed to update the lease in time and can therefore no longer access this DocumentNodeStore.
/home/vagrant/mounts/author1/aem/22_crx-quickstart/logs/error_6.log:01.11.2016 13:29:46.453 *ERROR* [LeaseFailureHandler-Thread] com.adobe.cq.social.cq-social-scf-impl [com.adobe.cq.social.scf.impl.SocialComponentFactoryManagerImpl(2527)] The unbindFactories method has thrown an exception (com.google.common.util.concurrent.ExecutionError: java.lang.AssertionError: This oak instance failed to update the lease in time and can therefore no longer access this DocumentNodeStore.)
/home/vagrant/mounts/author1/aem/22_crx-quickstart/logs/error_6.log:01.11.2016 13:29:46.500 *ERROR* [LeaseFailureHandler-Thread] org.apache.jackrabbit.oak.plugins.document.ClusterNodeInfo This oak instance failed to update the lease in time and can therefore no longer access this DocumentNodeStore.
/home/vagrant/mounts/author1/aem/22_crx-quickstart/logs/error_6.log:01.11.2016 13:29:46.500 *ERROR* [LeaseFailureHandler-Thread] com.adobe.cq.dtm.impl.DTMJobsInitializer Could not obtain a resource resolver.
/home/vagrant/mounts/author1/aem/22_crx-quickstart/logs/error_6.log:01.11.2016 13:29:46.625 *ERROR* [LeaseFailureHandler-Thread] org.apache.jackrabbit.oak.plugins.document.ClusterNodeInfo This oak instance failed to update the lease in time and can therefore no longer access this DocumentNodeStore.
/home/vagrant/mounts/author1/aem/22_crx-quickstart/logs/error_6.log:01.11.2016 13:29:46.625 *ERROR* [LeaseFailureHandler-Thread] org.apache.sling.discovery.oak [org.apache.sling.discovery.oak.OakDiscoveryService(256)] The updatedPropertyProvider method has thrown an exception (com.google.common.util.concurrent.ExecutionError: java.lang.AssertionError: This oak instance failed to update the lease in time and can therefore no longer access this DocumentNodeStore.)

Adobeフォーラムに従って問題を解決しようとしましたが、問題を解決できませんでした。

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__r93i-hi_friends_icam.html

この問題の原因と解決方法を教えてください。

よろしく

4

2 に答える 2

0

あなたの問題は、新しいプライマリmongodbインスタンスに接続できないことです(少なくとも必要な時間ではありません)。質問はmongodbに関連しており、より多くのユーザーがいるため、質問にmongodbのタグを追加することをお勧めしますjackrabbit-oak よりも mongodb を知っている人.. 質問に戻る: jackrabbit oak インスタンスを実行しているマシンから新しいプライマリ ノードに ping を実行できますか? レプリカ セットが新しいプライマリ ノードを選択するのに必要な期間はどれくらいですか? これが 10 秒を超える場合は、mongo db 構成設定を変更する必要があります。rs.status() の結果を投稿できますか?

于 2016-11-02T07:12:29.833 に答える
0

コメントと提案をありがとうございます。

私はこの問題を自分で解決しました。私がアプローチした方法はおそらく正しいです。

この問題は、AEM で MongoDBDriver に渡された WriteConcern パラメータにあります。mongi.uri を以下のように変更したところ、この問題は解決しました。

-Doak.mongo.uri=mongodb://PrimaryHost:27017,SecondoryHost:27017/?replicaSet=rs0&readPreference=nearest
↓
-Doak.mongo.uri=mongodb://PrimaryHost:27017,SecondoryHost:27017/?replicaSet=rs0&readPreference=nearest&w=1&j=1

レプリカ セット メンバーに関する投稿を忘れていました。当社のレプリカ セットは、プライマリ、セカンダリ、アービターで構成されています。

oak.jackrabit API を確認したところ、MongoDiver のデフォルトの WriteConcern は「majority」 ですgetDefaultWriteConcern (com.mongodb.DB)

レプリカ セットの 1 つのメンバー(アービターを除く)がダウンしている場合、AEM は、書き込み操作がメンバーの大部分に伝播できないため、書き込み操作を確認できません。

WriteConcern を w=1 に変更すると、書き込み操作が認識され、AEM は引き続き正常に動作します。

このようにどう思いますか?気になることはありますか?

于 2016-11-03T08:38:11.590 に答える