码迷,mamicode.com
首页 > 其他好文 > 详细

gerrit: Error in POST /accounts/self/preferences

时间:2015-05-13 19:34:46      阅读:239      评论:0      收藏:0      [点我收藏+]

标签:

转载:https://code.google.com/p/gerrit/issues/detail?id=3157

1. Migrated from 2.8.6.1 to 2.10
2. In UI go to settings >> preferences
3. change something and click "Save changes"

然后,页面报错,500 internal server error

后台日志error_log报错:
[2015-02-04 15:32:03,010] ERROR com.google.gerrit.httpd.restapi.RestApiServlet : Error in POST /accounts/self/preferences
java.io.IOException: Keine Berechtigung
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(File.java:1006)
        at java.io.File.createTempFile(File.java:1989)
        at org.eclipse.jgit.internal.storage.file.ObjectDirectoryInserter.newTempFile(ObjectDirectoryInserter.java:233)
        at org.eclipse.jgit.internal.storage.file.ObjectDirectoryInserter.toTemp(ObjectDirectoryInserter.java:199)
        at org.eclipse.jgit.internal.storage.file.ObjectDirectoryInserter.insert(ObjectDirectoryInserter.java:91)
        at org.eclipse.jgit.lib.ObjectInserter.insert(ObjectInserter.java:338)
        at com.google.gerrit.server.git.VersionedMetaData.saveFile(VersionedMetaData.java:418)
        at com.google.gerrit.server.git.VersionedMetaData.saveUTF8(VersionedMetaData.java:412)
        at com.google.gerrit.server.git.VersionedMetaData.saveConfig(VersionedMetaData.java:408)
        at com.google.gerrit.server.account.VersionedAccountPreferences.onSave(VersionedAccountPreferences.java:72)
        at com.google.gerrit.server.git.VersionedMetaData$1.doSave(VersionedMetaData.java:208)
        at com.google.gerrit.server.git.VersionedMetaData$1.write(VersionedMetaData.java:221)
        at com.google.gerrit.server.git.VersionedMetaData$1.write(VersionedMetaData.java:197)
        at com.google.gerrit.server.git.VersionedMetaData.commit(VersionedMetaData.java:147)
        at com.google.gerrit.server.account.SetPreferences.apply(SetPreferences.java:177)
        at com.google.gerrit.server.account.SetPreferences.apply(SetPreferences.java:54)
        at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:304)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
        at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:279)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:269)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:180)
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
        at com.google.gerrit.pgm.http.jetty.GetUserFilter.doFilter(GetUserFilter.java:76)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:70)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.gerrit.httpd.RunAsFilter.doFilter(RunAsFilter.java:113)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:64)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy.doFilter(AllRequestFilter.java:57)
        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)

根据博文的内容,出错原因主要是迁移后,git版本库存放目录下的All-Projects.git目录的权限问题。

安装2.8.1时,使用的是root账户安装的;

安装2.10使用的gerrit账户安装的;

因此修改All-Projects.git目录的权限,改为gerrit:gerrit,问题解决。

 

gerrit: Error in POST /accounts/self/preferences

标签:

原文地址:http://www.cnblogs.com/xiaoerlang/p/4501264.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!