{"action":"closed","issue":{"url":"https://api.github.com/repos/sunspot/sunspot/issues/561","labels_url":"https://api.github.com/repos/sunspot/sunspot/issues/561/labels{/name}","comments_url":"https://api.github.com/repos/sunspot/sunspot/issues/561/comments","events_url":"https://api.github.com/repos/sunspot/sunspot/issues/561/events","html_url":"https://github.com/sunspot/sunspot/issues/561","id":29694643,"number":561,"title":"Cannot start Sunspot: java.lang.IllegalArgumentException: Bad temp directory","user":{"login":"starrychloe","id":1039276,"avatar_url":"https://avatars.githubusercontent.com/u/1039276?v=3","gravatar_id":"","url":"https://api.github.com/users/starrychloe","html_url":"https://github.com/starrychloe","followers_url":"https://api.github.com/users/starrychloe/followers","following_url":"https://api.github.com/users/starrychloe/following{/other_user}","gists_url":"https://api.github.com/users/starrychloe/gists{/gist_id}","starred_url":"https://api.github.com/users/starrychloe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starrychloe/subscriptions","organizations_url":"https://api.github.com/users/starrychloe/orgs","repos_url":"https://api.github.com/users/starrychloe/repos","events_url":"https://api.github.com/users/starrychloe/events{/privacy}","received_events_url":"https://api.github.com/users/starrychloe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-03-18T23:22:56Z","updated_at":"2015-11-11T15:40:47Z","closed_at":"2015-11-11T15:40:47Z","body":"When trying to start Sunspot, it complains about an invalid temp directory. This is because the Jetty configuration is using the gem's current directory for its temporary directory, and without write permissions (which is normal if you are not root), it will fail. There is no way to specify the jetty.home property when starting, either.\r\n\r\n> java.lang.IllegalArgumentException: Bad temp directory: /usr/local/rvm/gems/ruby-2.0.0-p247@bk_development/gems/sunspot_solr-2.1.0/solr/solr-webapp\r\n\r\nThe problem file is \r\n\r\nsunspot_solr-2.1.0/bin/contexts/solr.xml\r\n\r\n```\r\n[vagrant@localhost solr]$ cat contexts/solr.xml\r\n<?xml version=\"1.0\"?>\r\n<!DOCTYPE Configure PUBLIC \"-//Jetty//Configure//EN\" \"http://www.eclipse.org/jetty/configure.dtd\">\r\n<Configure class=\"org.eclipse.jetty.webapp.WebAppContext\">\r\n  <Set name=\"contextPath\"><SystemProperty name=\"hostContext\" default=\"/solr\"/></Set>\r\n  <Set name=\"war\"><SystemProperty name=\"jetty.home\"/>/webapps/solr.war</Set>\r\n  <Set name=\"defaultsDescriptor\"><SystemProperty name=\"jetty.home\"/>/etc/webdefault.xml</Set>\r\n  <Set name=\"tempDirectory\"><Property name=\"jetty.home\" default=\".\"/>/solr-webapp</Set>\r\n</Configure>\r\n```\r\n\r\nRake doesn't help either.\r\n    \r\n    [vagrant@localhost BK-Development]$ RAILS_ENV=development rake sunspot:solr:run\r\n\r\n\r\n```\r\n[vagrant@localhost sunspot_solr-2.1.0]$ sunspot-solr run\r\nfatal: Not a git repository (or any of the parent directories): .git\r\nfatal: Not a git repository (or any of the parent directories): .git\r\nfatal: Not a git repository (or any of the parent directories): .git\r\n2014-03-19 00:12:19.623:INFO:oejs.Server:jetty-8.1.8.v20121106\r\n2014-03-19 00:12:19.637:INFO:oejdp.ScanningAppProvider:Deployment monitor /usr/local/rvm/gems/ruby-2.0.0-p247@bk_development/gems/sunspot_solr-2.1.0/solr/contexts at interval 0\r\n2014-03-19 00:12:19.641:INFO:oejd.DeploymentManager:Deployable added: /usr/local/rvm/gems/ruby-2.0.0-p247@bk_development/gems/sunspot_solr-2.1.0/solr/contexts/solr.xml\r\n2014-03-19 00:12:19.696:WARN:oejx.XmlConfiguration:Config error at <Set name=\"tempDirectory\"><Property name=\"jetty.home\" default=\".\"/>/solr-webapp</Set> java.lang.reflect.InvocationTargetException\r\n2014-03-19 00:12:19.696:WARN:oejd.DeploymentManager:Unable to reach node goal: started\r\njava.lang.reflect.InvocationTargetException\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:616)\r\n        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:568)\r\n        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:391)\r\n        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:350)\r\n        at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:303)\r\n        at org.eclipse.jetty.deploy.providers.ContextProvider.createContextHandler(ContextProvider.java:87)\r\n        at org.eclipse.jetty.deploy.App.getContextHandler(App.java:100)\r\n        at org.eclipse.jetty.deploy.bindings.StandardDeployer.processBinding(StandardDeployer.java:36)\r\n        at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)\r\n        at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)\r\n        at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)\r\n        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)\r\n        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)\r\n        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:609)\r\n        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)\r\n        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)\r\n        at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)\r\n        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)\r\n        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)\r\n        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)\r\n        at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)\r\n        at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)\r\n        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)\r\n        at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)\r\n        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)\r\n        at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)\r\n        at org.eclipse.jetty.server.Server.doStart(Server.java:277)\r\n        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)\r\n        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1266)\r\n        at java.security.AccessController.doPrivileged(Native Method)\r\n        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1189)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:616)\r\n        at org.eclipse.jetty.start.Main.invokeMain(Main.java:472)\r\n        at org.eclipse.jetty.start.Main.start(Main.java:620)\r\n        at org.eclipse.jetty.start.Main.main(Main.java:95)\r\nCaused by:\r\njava.lang.IllegalArgumentException: Bad temp directory: /usr/local/rvm/gems/ruby-2.0.0-p247@bk_development/gems/sunspot_solr-2.1.0/solr/solr-webapp\r\n        at org.eclipse.jetty.webapp.WebAppContext.setTempDirectory(WebAppContext.java:1127)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:616)\r\n        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:568)\r\n        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:391)\r\n        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:350)\r\n        at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:303)\r\n        at org.eclipse.jetty.deploy.providers.ContextProvider.createContextHandler(ContextProvider.java:87)\r\n        at org.eclipse.jetty.deploy.App.getContextHandler(App.java:100)\r\n        at org.eclipse.jetty.deploy.bindings.StandardDeployer.processBinding(StandardDeployer.java:36)\r\n        at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)\r\n        at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)\r\n        at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)\r\n        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)\r\n        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)\r\n        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:609)\r\n        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)\r\n        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)\r\n        at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)\r\n        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)\r\n        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)\r\n        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)\r\n        at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)\r\n        at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)\r\n        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)\r\n        at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)\r\n        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)\r\n        at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)\r\n        at org.eclipse.jetty.server.Server.doStart(Server.java:277)\r\n        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)\r\n        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1266)\r\n        at java.security.AccessController.doPrivileged(Native Method)\r\n        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1189)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:616)\r\n        at org.eclipse.jetty.start.Main.invokeMain(Main.java:472)\r\n        at org.eclipse.jetty.start.Main.start(Main.java:620)\r\n        at org.eclipse.jetty.start.Main.main(Main.java:95)\r\n2014-03-19 00:12:19.716:INFO:oejs.AbstractConnector:Started SocketConnector@0.0.0.0:8983\r\n```\r\n\r\n\r\nAlso the other directories are a problem too.\r\n"}}