3 Replies Latest reply on Mar 24, 2015 4:52 PM by whoiskevin

    Unable to start search locally

    ben.duffin86

      I am attempting to start the search server locally, using on-premise search.  I've already been through jive.setup, but I keep getting the following exception:

       

      [WARNING]
      java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: com.jivesoftware.service.tenancy.services.jsonbacked.JsonBackedTenancyServiceDirectoryException: serviceDirectory.json not found in './var/data/directory' (c:\jive\connect-webapp\run-services\.\var\data\directory\serviceDirectory.json)
              at com.jivesoftware.service.tenancy.services.jsonbacked.JsonBackedTenancyDirectoryServiceHelper.loadServiceDirectory(JsonBackedTenancyDirectoryServiceHelper.java:43)
              at com.jivesoftware.service.tenancy.services.jsonbacked.JsonBackedTenancyServiceDirectoryInitializer.initialize(JsonBackedTenancyServiceDirectoryInitializer.java:44)
              at com.jivesoftware.service.main.Main.<init>(Main.java:134)
              at com.jivesoftware.service.main.Main.main(Main.java:57)
              ... 6 more
      


      I looked in var/data and did not see a "directory" folder.  What creates this folder and serviceDirectory.json?  I know I've modified serviceDirectory.json at some points in the past when troubleshooting search server issues, but I'm not sure what to do when the file doesn't even exist.

        • Re: Unable to start search locally
          whoiskevin

          var/data and var/data/directory is created by the setup and mvn addons that start the search server and local activity.  Not sure why you don't have that folder created.  The serviceDirectory.json is very simple you could even copy one from a running box if you have one.

          You ran a mvn init at some point during the project setup I assume?  Also try starting a local activity engine first (at least for the first run).

          2 people found this helpful
          • Re: Unable to start search locally
            div_gcet

            Sorry for pulling up old thread. I need to Map Tenent-Id to Search service as am getting below error while starting search service:

             

            [WARNING] 
            java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
              at java.lang.Thread.run(Thread.java:745)
            Caused by: com.jivesoftware.service.tenancy.services.jsonbacked.JsonBackedTenancyServiceDirectoryException: serviceTenanyMappings.json not found in /run-services/./var/data/directory/serviceTenanyMappings.json
              at com.jivesoftware.service.tenancy.services.jsonbacked.JsonBackedTenancyDirectoryServiceHelper.loadServiceTenancyMapping(JsonBackedTenancyDirectoryServiceHelper.java:134)
              at com.jivesoftware.service.tenancy.services.jsonbacked.JsonBackedTenancyServiceDirectoryInitializer.initialize(JsonBackedTenancyServiceDirectoryInitializer.java:45)
              at com.jivesoftware.service.main.Main.<init>(Main.java:134)
              at com.jivesoftware.service.main.Main.main(Main.java:57)
              ... 6 more
            


            Please suggest.


            Thanks,

            Divya Garg

              • Re: Unable to start search locally
                whoiskevin

                That file is similar.  If you copy them from a blank install or you can use the two I've listed here (just put them in the directory you see in the error.. run-services/var/data/directory.  I would also create the var/data and var/logs folders inside the var/data/directory just in case they are needed as well.

                 

                serviceTenanyMappings.json

                {
                  "tenantIdToServiceTenantId" : {
                    "tenantId" : {
                      "serviceNameToTenantId" : {
                        "searchIndexManage" : "renammpedToTenantId",
                        "rebuildSearchIndex" : "renammpedToTenantId",
                        "search" : "renammpedToTenantId",
                        "activityIngress" : "renammpedToTenantId"
                      }
                    }
                  }
                }
                

                serviceDirectory.json

                {
                    "defaultServiceDirectory" : {
                        "directory" : {
                            "host" : "0.0.0.0",
                            "port" : 30000
                        },
                        "searchIndexManage" : {
                            "host" : "0.0.0.0",
                            "port" : 30000
                        },
                        "rebuildSearchIndex" : {
                            "host" : "0.0.0.0",
                            "port" : 30000
                        },
                        "search" : {
                            "host" : "0.0.0.0",
                            "port" : 30000
                        },
                        "activityIngress" : {
                            "host" : "0.0.0.0",
                            "port" : 30000
                        }
                    },
                    "tenantSpecificServiceDirectory" : {
                        "replaceWithCustomerTenantId" : {
                            "serviceDirectory" : {
                                "directory" : {
                                    "host" : "0.0.0.0",
                                    "port" : 30000
                                },
                                "searchIndexManage" : {
                                    "host" : "0.0.0.0",
                                    "port" : 30000
                                },
                                "rebuildSearchIndex" : {
                                    "host" : "0.0.0.0",
                                    "port" : 30000
                                },
                                "search" : {
                                    "host" : "0.0.0.0",
                                    "port" : 30000
                                },
                                "activityIngress" : {
                                    "host" : "0.0.0.0",
                                    "port" : 30000
                                }
                            }
                        }
                    }
                }