Conflicts With (N/A) 500 Internal server error

640 views
Skip to first unread message

Ashwini T R

unread,
Jun 12, 2017, 1:45:52 AM6/12/17
to Repo and Gerrit Discussion
Hi,

We are facing issue as  "Conflicts With (N/A) 500 Internal server error" in multiple changes created in Gerrit for two different repositories.
Our gerrit server is running on version 2.13.2. 

Below is the stack trace output captured for one of the change having the above mentioned error. Please suggest how to resolve this issue.


[2017-06-09 15:56:28,552] [HTTP-645647] ERROR com.google.gerrit.httpd.restapi.RestApiServlet : Error in GET /changes/?q=status:open+is:mergeable+conflicts:117489&O=a
java.lang.NullPointerException: change 503 not found in ReviewDb
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:251)
        at com.google.gerrit.server.notedb.ChangeNotes$Factory.loadChangeFromDb(ChangeNotes.java:157)
        at com.google.gerrit.server.notedb.ChangeNotes$Factory.create(ChangeNotes.java:170)
        at com.google.gerrit.server.query.change.ChangeData.notes(ChangeData.java:759)
        at com.google.gerrit.server.query.change.ChangeData.reviewers(ChangeData.java:932)
        at com.google.gerrit.server.project.ChangeControl.isReviewer(ChangeControl.java:364)
        at com.google.gerrit.server.project.ChangeControl.isDraftVisible(ChangeControl.java:445)
        at com.google.gerrit.server.project.ChangeControl.isVisible(ChangeControl.java:211)
        at com.google.gerrit.server.query.change.ChangeIsVisibleToPredicate.match(ChangeIsVisibleToPredicate.java:67)
        at com.google.gerrit.server.query.change.ChangeIsVisibleToPredicate.match(ChangeIsVisibleToPredicate.java:27)
        at com.google.gerrit.server.query.AndSource.match(AndSource.java:147)
        at com.google.gerrit.server.query.AndSource.readImpl(AndSource.java:101)
        at com.google.gerrit.server.query.AndSource.read(AndSource.java:85)
        at com.google.gerrit.server.query.QueryProcessor.query(QueryProcessor.java:191)
        at com.google.gerrit.server.query.QueryProcessor.query(QueryProcessor.java:139)
        at com.google.gerrit.server.query.change.QueryChanges.query(QueryChanges.java:123)
        at com.google.gerrit.server.query.change.QueryChanges.apply(QueryChanges.java:94)
        at com.google.gerrit.server.query.change.QueryChanges.apply(QueryChanges.java:38)
        at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:334)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181)
        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.gerrit.httpd.RequireSslFilter.doFilter(RequireSslFilter.java:77)
        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:122)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.gerrit.httpd.RequestMetricsFilter.doFilter(RequestMetricsFilter.java:60)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:136)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:201)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:178)
        at com.googlesource.gerrit.plugins.javamelody.GerritMonitoringFilter.doFilter(GerritMonitoringFilter.java:65)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:132)
        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:120)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135)
        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.handler.RequestLogHandler.handle(RequestLogHandler.java:95)
        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:311)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
        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(Unknown Source)

Thanks
Ashwini

Ashwini T R

unread,
Jun 12, 2017, 7:23:06 AM6/12/17
to Repo and Gerrit Discussion
Hi Team,

Could some one suggest to resolve the issue ? The error shows as :

[2017-06-09 15:56:28,552] [HTTP-645647] ERROR com.google.gerrit.httpd.restapi.RestApiServlet : Error in GET /changes/?q=status:open+is:mergeable+conflicts:117489&O=a
java.lang.NullPointerException: change 503 not found in ReviewDb

But when the same is checked in reviewdb the review exists.

Regards
Ashwini

Matthew Webber

unread,
Jun 12, 2017, 7:50:58 AM6/12/17
to Repo and Gerrit Discussion
I think this might be partially fixed in 2.14 - see https://bugs.chromium.org/p/gerrit/issues/detail?id=4796

In particular, look at my Comment 4 , which mentions that the problem can be related to changes which are not visible (eg Draft changes)

Hope that helps
Matthew

Ashwini T R

unread,
Jun 13, 2017, 1:51:41 AM6/13/17
to Repo and Gerrit Discussion
Hi Matthew,

Could you please suggest any work around to get rid of that error : (: ( .
We are blocked with our development work
:(:(

Regards,
Ashwini

Ashwini T R

unread,
Jun 19, 2017, 4:41:46 AM6/19/17
to Repo and Gerrit Discussion
Hi,

Could someone suggest workaround for the issue "Conflicts With (N/A) 500 Internal server error" 
and below is the detailed log for the Changes which are having the issue.

[2017-06-19 09:22:35,539] [HTTP-119807] ERROR com.google.gerrit.httpd.restapi.RestApiServlet : Error in GET /changes/?q=status:open+is:mergeable+conflicts:153821&O=a
Regards,
Ashwini

Remy Bohmer

unread,
Jun 19, 2017, 1:31:28 PM6/19/17
to Ashwini T R, Repo and Gerrit Discussion
Hi,

I know about this error with partially deleted changes. Then either the change in the ReviewDb does not exist partially or not at all. It is still there in the secondary index. I did put together a plugin a couple of weeks ago to remove it from the secondary index which removes it from the UI as well (in case it does not exist in the ReviewDb).

In these cases a new reindex via the restapi of this failing change does not help solving the issue, but should be tried first.

Kind regards,

Remy

Op 19 jun. 2017 10:41 schreef "Ashwini T R" <ashu.r...@gmail.com>:
--
--
To unsubscribe, email repo-discuss+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ashwini T R

unread,
Jun 20, 2017, 12:49:51 AM6/20/17
to Repo and Gerrit Discussion, ashu.r...@gmail.com, li...@bohmer.net
Hi Remy,

Thanks a lot for providing the information. It would be helpful if you could share the plugin details to remove from the secondary index. 
Meantime, Is this the API https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#index-change for new reindex can be tried for  failing changes ?

Thanks,
Ashwini
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.

Ashwini T R

unread,
Jun 27, 2017, 3:41:47 AM6/27/17
to Repo and Gerrit Discussion, ashu.r...@gmail.com, li...@bohmer.net
Hi Team,

We could also capture the UI console output errors for the changes with "Conflicts With (N/A) 500 Internal server error". Please find the attachment with the below errors:

"Failed to load resource: the server responded with the status of 404 (Not found) "

"Failed to load resource: the server responded a status of 500 (server error)"

Please suggest to resolve the issue.

Regards,
Ashwini
UI_error.PNG

Matthew Webber

unread,
Jun 27, 2017, 10:14:32 AM6/27/17
to Repo and Gerrit Discussion
Did you look at the comment I mentioned in my original reply, and do you think that the problem in your case is related to changes that are not visible?
Or do you think it is come other case?
Reply all
Reply to author
Forward
0 new messages