PermissionDenied error trying to view a change

139 views
Skip to first unread message

Dan Alvizu

unread,
Feb 22, 2016, 2:50:47 AM2/22/16
to Repo and Gerrit Discussion
Hi,

I have a developer reporting that they can't see the changelist they just submitted. I can see it when I search for their name, but when I go to the review I get a "Not Found or Permission Denied" error, and this appears in the logs:


[2016-02-19 10:49:55,547] [HTTP-36128] WARN  com.google.gerrit.server.patch.PatchListLoader : Error computing PatchListKey[BASE..52b68ff2a694589b360da024cca1101dafd4ecd7 IGNORE_NONE]
java.util.concurrent.ExecutionException: java.io.IOException: Permission denied
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:472)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:431)
	at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:74)
	at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:143)
	at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2352)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2324)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2286)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3953)
	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4790)
	at com.google.gerrit.server.cache.h2.H2CacheImpl.get(H2CacheImpl.java:134)
	at com.google.gerrit.server.patch.PatchListCacheImpl.get(PatchListCacheImpl.java:89)
	at com.google.gerrit.server.change.FileInfoJson.toFileInfoMap(FileInfoJson.java:57)
	at com.google.gerrit.server.change.Files$ListFiles.apply(Files.java:150)
	at com.google.gerrit.server.change.Files$ListFiles.apply(Files.java:93)
	at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:322)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:287)
	at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:277)
	at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:182)
	at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
	at com.google.gerrit.httpd.GetUserFilter.doFilter(GetUserFilter.java:82)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:73)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.gerrit.httpd.RunAsFilter.doFilter(RunAsFilter.java:117)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:136)
	at com.google.gerrit.httpd.AllRequestFilter$FilterProxy.doFilter(AllRequestFilter.java:105)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.gerrit.httpd.RequestContextFilter.doFilter(RequestContextFilter.java:75)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119)
	at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
	at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
	at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
	at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Permission denied
	at java.io.UnixFileSystem.createFileExclusively(Native Method)
	at java.io.File.createNewFile(File.java:1012)
	at org.eclipse.jgit.internal.storage.file.LockFile.lock(LockFile.java:159)
	at org.eclipse.jgit.internal.storage.file.RefDirectoryUpdate.tryLock(RefDirectoryUpdate.java:83)
	at org.eclipse.jgit.lib.RefUpdate.updateImpl(RefUpdate.java:630)
	at org.eclipse.jgit.lib.RefUpdate.update(RefUpdate.java:512)
	at org.eclipse.jgit.lib.RefUpdate.update(RefUpdate.java:493)
	at org.eclipse.jgit.lib.RefUpdate.forceUpdate(RefUpdate.java:473)
	at com.google.gerrit.server.patch.PatchListLoader.automerge(PatchListLoader.java:494)
	at com.google.gerrit.server.patch.PatchListLoader.automerge(PatchListLoader.java:363)
	at com.google.gerrit.server.patch.PatchListLoader.aFor(PatchListLoader.java:354)
	at com.google.gerrit.server.patch.PatchListLoader.readPatchList(PatchListLoader.java:154)
	at com.google.gerrit.server.patch.PatchListLoader.call(PatchListLoader.java:126)
	at com.google.gerrit.server.patch.PatchListLoader.call(PatchListLoader.java:86)
	at com.google.gerrit.server.cache.h2.H2CacheImpl$LoadingCallable.call(H2CacheImpl.java:278)
	at com.google.gerrit.server.cache.h2.H2CacheImpl$LoadingCallable.call(H2CacheImpl.java:260)
	at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4793)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3542)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2323)
	... 48 more


It looks to be a permission issue, but I have no idea what file that could be. The repository being used looks to all be owned by the gerrit user. Any suggestions / ideas?


Shawn Pearce

unread,
Feb 22, 2016, 11:00:16 AM2/22/16
to Dan Alvizu, Repo and Gerrit Discussion
Its trying to create a file under ${SITE_PATH}/git/${project}.git/refs/cache-automerge/../

My guess is the cache-automerge directory or one of its shard subdirectories is write protected or has the wrong UNIX permissions and is not allowing the server process to create new files there.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan Alvizu

unread,
Feb 22, 2016, 11:34:25 AM2/22/16
to Shawn Pearce, Repo and Gerrit Discussion
Ah, yeah that was it - some files were owned by root user, not by the gerrit user. Not sure how that happened
--
Ping Identity logo
Dan Alvizu
Sr. Development Engineer
Ping Identity
@ dal...@pingidentity.com
phone +1 720.317.2060
twitter @pingidentity
Connect with us!
pingidentity.com
twitter logo twitter logo youtube logo LinkedIn logo Facebook logo Google+ logo slideshare logo rss feed icon

CIS 2016
Reply all
Reply to author
Forward
0 new messages