Error after upgrade from 2.0.4 to 2.0.6

5 views
Skip to first unread message

Heejong Lee

unread,
Mar 11, 2009, 12:20:01 AM3/11/09
to Repo and Gerrit Discussion
Hi,
I've upgraded my Gerrit installation from 2.0.4 to 2.0.6. But after
it, I lost my administration rights.
I didn't do any special thing.
- I firstly downloaded 2.0.5 to update database schema.
- I ran 'java -jar gerrit.war --cat sql/upgrade005_006.sql | psql
reviewdb' in shell prompt and it succeeded
- I deleted 2.0.5 and downloaded 2.0.6 to replace original gerrit.war

The problem is when I log in my Gerrit site, I can't see any group,
project information. Moreover, "Unexpected Error - Internal Server
Error" pop-up came out at Contact Information and Identities tab in
Account Setting page.
I checked user and user rights database entries still exist. The jetty
error logs are below:

2009-03-11 11:15:58.118:/:WARN: Error in myExternalIds
com.google.gwtorm.client.OrmException: fetch failure on
trusted_external_ids
at com.google.gwtorm.schema.sql.SqlDialect.convertError
(SqlDialect.java:113)
at com.google.gwtorm.schema.sql.DialectPostgreSQL.convertError
(DialectPostgreSQL.java:40)
at com.google.gwtorm.jdbc.JdbcAccess.convertError
(JdbcAccess.java:243)
at com.google.gwtorm.jdbc.JdbcAccess.queryList(JdbcAccess.java:
149)
at
com.google.gerrit.client.reviewdb.TrustedExternalId_Access_trustedExternalIds_GwtOrm
$$5.all(Unknown Source)
at
com.google.gerrit.client.data.GroupCache.getTrustedExternalIds
(GroupCache.java:233)
at com.google.gerrit.server.AccountSecurityImpl$4.run
(AccountSecurityImpl.java:144)
at com.google.gerrit.server.AccountSecurityImpl$4.run
(AccountSecurityImpl.java:141)
at com.google.gerrit.client.rpc.BaseServiceImplementation.run
(BaseServiceImplementation.java:48)
at com.google.gerrit.server.AccountSecurityImpl.myExternalIds
(AccountSecurityImpl.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwtjsonrpc.server.MethodHandle.invoke
(MethodHandle.java:92)
at com.google.gwtjsonrpc.server.JsonServlet.doService
(JsonServlet.java:385)
at com.google.gwtjsonrpc.server.JsonServlet.service
(JsonServlet.java:277)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
820)
at org.mortbay.jetty.servlet.ServletHolder.handle
(ServletHolder.java:502)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1124)
at com.google.gwtexpui.server.CacheControlFilter.doFilter
(CacheControlFilter.java:76)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1115)
at com.google.gerrit.server.UrlRewriteFilter.doFilter
(UrlRewriteFilter.java:101)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1115)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:361)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle
(WebAppContext.java:417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest
(HttpConnection.java:534)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:879)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:
213)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:
403)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:522)
Caused by: org.postgresql.util.PSQLException: Error: No access
permission to trusted_external_ids relation
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse
(QueryExecutorImpl.java:1608)
at org.postgresql.core.v3.QueryExecutorImpl.processResults
(QueryExecutorImpl.java:1343)
at org.postgresql.core.v3.QueryExecutorImpl.execute
(QueryExecutorImpl.java:194)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute
(AbstractJdbc2Statement.java:451)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags
(AbstractJdbc2Statement.java:350)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery
(AbstractJdbc2Statement.java:254)
at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery
(NewProxyPreparedStatement.java:76)
at com.google.gwtorm.jdbc.JdbcAccess.queryList(JdbcAccess.java:
133)
... 36 more

Did I miss something? Does it need any additional step to fix database
permission?
Thanks in advance!

- Heejong

Heejong Lee

unread,
Mar 11, 2009, 1:06:38 AM3/11/09
to Repo and Gerrit Discussion
Answer to my question :)

Fixing ownership of trusted_external_ids table solves the problem.

Type following command at psql console:
psql# alter table trusted_external_ids owner to gerrit2;;

- Heejong

Shawn Pearce

unread,
Mar 11, 2009, 10:08:10 AM3/11/09
to repo-d...@googlegroups.com
Heh, yea.  I haven't figured out the best way to deal with schema upgrades yet.  And if you run the upgrade script as "postgres" or something other than the gerrit web user, yea, then it can't scan trusted_external_ids.  :-|

Sorry that wasn't clear in the release notes.  I'll try to put a mention of it in the next schema upgrade that involves a table creation.
Reply all
Reply to author
Forward
0 new messages