Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-13876

Cant use replica set for the monitoring and blockstore dbs on-prem mms back up

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Operating System:
      ALL

      Description

      I have another bug for you. I wanted to use a replicaset for mms db and backup db and got problems. Here are my mongodb uris:

      #mongo.mongoUri=mongodb://lkisdevld007.lkis.local:27100,lkisdevld008.lkis.local:27100/
      mongo.mongoUri=mongodb://172.20.2.190:27100,172.20.2.191:27100/
      mongo.replicaSet=mmsdb

      1. ####################################
      2. The backupdb
      3. Required to enable backup

      mongo.backupdb.mongoUri=mongodb://lkisdevld009.lkis.local:27100,lkisdevld010.lkis.local:27100/
      mongo.backupdb.replicaSet=backup_blockstore_1

      That's the error I get in the mms0.log. Migrations are fine with the uris and backup https server too. Can you please urgently advice how to use replicasets in the mms server.

      The error from the mms0.log is:

      05-08-2014 12:02:44 [main] INFO  ServerMain:263 - Starting mms...
      LoginService=HashLoginService[null] identityService=org.eclipse.jetty.security.DefaultIdentityService@102ad1f0
      05-08-2014 12:02:44 [main] INFO  AppConfig:45 - Starting app for env: hosted
      05-08-2014 12:02:46 [main] WARN  WebAppContext:501 - Failed startup of context o.e.j.w.WebAppContext{/,file:/opt/mongodb/mms/tmp/mms-jetty-tmp-0/webapp/},jar:file:/opt/mongodb/mms/classes/mms.jar!/webapp-mms
      java.lang.IllegalStateException: Injector failed: Failure during replset configuration check of: Config{loadBalance=false, encryptedCredentials=false, dbName='mmsdbprovisioning', replSetName='mmsdb', uri=mongodb://172.20.2.190:27100,172.20.2.191:27100/}
              at com.xgen.svc.core.AppConfig.getInjector(AppConfig.java:55) ~[mms.jar:1.4.1.62]
              at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:45) ~[guice-servlet-3.0.jar:na]
              at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:771) ~[jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
              at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424) ~[jetty-servlet-8.1.8.v20121106.jar:8.1.8.v20121106]
              at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:763) ~[jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
              at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249) ~[jetty-servlet-8.1.8.v20121106.jar:8.1.8.v20121106]
              at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) ~[jetty-webapp-8.1.8.v20121106.jar:8.1.8.v20121106]
              at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706) ~[jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
              at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492) ~[jetty-webapp-8.1.8.v20121106.jar:8.1.8.v20121106]
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) [jetty-util-8.1.8.v20121106.jar:8.1.8.v20121106]
              at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) [jetty-util-8.1.8.v20121106.jar:8.1.8.v20121106]
              at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
              at org.eclipse.jetty.server.Server.doStart(Server.java:277) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) [jetty-util-8.1.8.v20121106.jar:8.1.8.v20121106]
              at com.xgen.svc.core.ServerMain.start(ServerMain.java:313) [mms.jar:1.4.1.62]
              at com.xgen.svc.core.ServerMain.main(ServerMain.java:224) [mms.jar:1.4.1.62]
      Caused by: java.lang.IllegalStateException: Failure during replset configuration check of: Config{loadBalance=false, encryptedCredentials=false, dbName='mmsdbprovisioning', replSetName='mmsdb', uri=mongodb://172.20.2.190:27100,172.20.2.191:27100/}
              at com.xgen.svc.mms.MmsAppInvariantUtils.assertReplicaSetConfiguration(MmsAppInvariantUtils.java:141) ~[mms.jar:1.4.1.62]
              at com.xgen.svc.mms.MmsAppConfig.initGuiceModules(MmsAppConfig.java:35) ~[mms.jar:1.4.1.62]
              at com.xgen.svc.core.AppConfig.getInjector(AppConfig.java:47) ~[mms.jar:1.4.1.62]
              ... 16 common frames omitted
      Caused by: java.lang.IllegalStateException: Invalid replica set configuration: at least 3 nodes required: mongodb://172.20.2.190:27100,172.20.2.191:27100/
              at com.xgen.svc.mms.MmsAppInvariantUtils.ensureReplicaSet(MmsAppInvariantUtils.java:167) ~[mms.jar:1.4.1.62]
              at com.xgen.svc.mms.MmsAppInvariantUtils.assertReplicaSetConfiguration(MmsAppInvariantUtils.java:138) ~[mms.jar:1.4.1.62]
              ... 18 common frames omitted
      05-08-2014 12:02:46 [main] ERROR ServerMain:239 - Cannot start mms server [FATAL-EXITING] - instance: 0  - msg: null
      java.lang.NullPointerException: null
              at com.xgen.svc.core.AppConfig.getInstance(AppConfig.java:64) ~[mms.jar:1.4.1.62]
              at com.xgen.svc.core.ServerMain.start(ServerMain.java:324) ~[mms.jar:1.4.1.62]
              at com.xgen.svc.core.ServerMain.main(ServerMain.java:224) ~[mms.jar:1.4.1.62]
      05-08-2014 12:02:50 [Thread-1] WARN  QueuedThreadPool:145 - 192 threads could not be stopped

      I switched from servernames to ips to see if thats the reason but it doesn't help.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sam.weaver Sam Weaver
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: