Gerrit Integrated Gitweb:error Injecting constructor, Java.io.IOException:Permission denied

Source: Internet
Author: User

Use Gerrit account to install Gerrit on CentOS, then integrate Gitweb,gerrit service start failure, view log, error message is as follows:

[ -- to- the  to:Geneva: the,671] ERROR com.google.gerrit.pgm.Daemon:Unable to start daemonjava.lang.IllegalStateException:Cannot start HTTP Daemo N at Com.google.gerrit.pgm.http.jetty.jettyserver$lifecycle.start (Jettyserver.java:139) at Com.google.gerrit.lifecycle.LifecycleManager.start (Lifecyclemanager.java: About) at Com.google.gerrit.pgm.Daemon.start (Daemon.java:291) at Com.google.gerrit.pgm.Daemon.run (Daemon.java:203) at Com.google.gerrit.pgm.util.AbstractProgram.main (Abstractprogram.java: -) at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at Sun.reflect.NativeMethodAccessorImpl . Invoke (Nativemethodaccessorimpl.java: $) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (Delegatingmethodaccessorimpl.java: +) at Java.lang.reflect.Method.invoke (Method.java:606) at Com.google.gerrit.launcher.GerritLauncher.invokeProgram (Gerritlauncher.java:166) at Com.google.gerrit.launcher.GerritLauncher.mainImpl (Gerritlauncher.java: the) at Com.google.gerrit.launcher.GerritLauncher.main (Gerritlauncher.java: -) at Main.main (Main.java: -) caused by:com.google.inject.ProvisionException:Unable to provision, see the following errors:1) Error Injecting constructor, Java.io.IOException:Permission denied at Com.google.gerrit.httpd.gitweb.GitWebServlet.<init> (Gitwebservlet.java: About) at Com.google.gerrit.httpd.gitweb.GitWebServlet.class (Gitwebservlet.java: +)   whileLocating Com.google.gerrit.httpd.gitweb.GitWebServlet1error at com.google.inject.internal.injectorimpl$2. Get (Injectorimpl.java:1018) at Com.google.inject.internal.InjectorImpl.getInstance (Injectorimpl.java:1040) at Com.google.inject.servlet.ServletDefinition.init (Servletdefinition.java: the) at Com.google.inject.servlet.ManagedServletPipeline.init (Managedservletpipeline.java: the) at Com.google.inject.servlet.ManagedFilterPipeline.initPipeline (Managedfilterpipeline.java:103) at Com.google.inject.servlet.GuiceFilter.init (Guicefilter.java: -) at Org.eclipse.jetty.servlet.FilterHolder.initialize (Filterholder.java:137) at Org.eclipse.jetty.servlet.ServletHandler.initialize (Servlethandler.java:831) at Org.eclipse.jetty.servlet.ServletContextHandler.startContext (Servletcontexthandler.java: -) at Org.eclipse.jetty.server.handler.ContextHandler.doStart (Contexthandler.java:744) at Org.eclipse.jetty.util.component.AbstractLifeCycle.start (Abstractlifecycle.java: the) at Org.eclipse.jetty.util.component.ContainerLifeCycle.start (Containerlifecycle.java: the) at Org.eclipse.jetty.server.Server.start (Server.java:357) at Org.eclipse.jetty.server.Server.doStart (Server.java:324) at Org.eclipse.jetty.util.component.AbstractLifeCycle.start (Abstractlifecycle.java: the) at Com.google.gerrit.pgm.http.jetty.jettyserver$lifecycle.start (Jettyserver.java: the)        ...  A  Morecaused By:java.io.IOException:Permission denied at java.io.UnixFileSystem.createFileExclusively (Native Method ) at Java.io.File.createTempFile (File.java:2001) at Com.google.gerrit.httpd.gitweb.GitWebServlet.makeSiteConfig (Gitwebservlet.java:149) at Com.google.gerrit.httpd.gitweb.GitWebServlet.<init> (Gitwebservlet.java:126) at Sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method) at Sun.reflect.NativeConstruc Toraccessorimpl.newinstance (Nativeconstructoraccessorimpl.java: $) at Sun.reflect.DelegatingConstructorAccessorImpl.newInstance (Delegatingconstructoraccessorimpl.java: $) at Java.lang.reflect.Constructor.newInstance (Constructor.java:526) at com.google.inject.internal.defaultconstructionproxyfactory$2. newinstance (Defaultconstructionproxyfactory.java: the) at Com.google.inject.internal.ConstructorInjector.provision (Constructorinjector.java:108) at Com.google.inject.internal.ConstructorInjector.construct (Constructorinjector.java: the) at Com.google.inject.internal.constructorbindingimpl$factory.get (Constructorbindingimpl.java:269) at com.google.inject.internal.providertointernalfactoryadapter$1. Call (Providertointernalfactoryadapter.java: $) at Com.google.inject.internal.InjectorImpl.callInContext (Injectorimpl.java:1066) at Com.google.inject.internal.ProviderToInternalFactoryAdapter.get (providertointernalfactoryadapter.java:< /c2> +) at com.google.inject.scopes$1$1. Get (Scopes.java: $) at Com.google.inject.internal.InternalFactoryToProviderAdapter.get (internalfactorytoprovideradapter.java:< /c8> A) at com.google.inject.internal.injectorimpl$2$1. Call (Injectorimpl.java:1009) at Com.google.inject.internal.InjectorImpl.callInContext (Injectorimpl.java:1059) at com.google.inject.internal.injectorimpl$2. Get (Injectorimpl.java:1005)        ...  in  More

The installation path of the Gerrit is/home/gerrit/gerrit_site,

View Gerrit_site permissions and owner, may be the previous error operation, Gerrit_site directory owner is not gerrit:gerrit, but 777:gerrit.

Execute command: Chown-r gerrit:gerrit gerrit_site

After modifying the directory permissions, restart the Gerrit service and run normally.

over!

Gerrit Integrated Gitweb:error Injecting constructor, Java.io.IOException:Permission denied

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.