I have set up aosp mirror in gerrit server. After repo snyc, I can not repo upload to gerrit server correctly. Further details: I repo init via ssh: repo init -u gerrit2@git:mirrors/platform/manifest then repo sync
In .repo/manifest.xml I changed the review to be http://git:8080 Finally After making changes - repo upload The problem is the project I am working on is frameworks/base and in repo upload it is uploading to platform/frameworks/base So I change the project name in .repo/manifest.xml to frameworks/base and now upload works but this of course breaks repo sync
On Tuesday, April 24, 2012 at 02:35 EDT, Asi Mugrabi <a...@nubosoftware.com> wrote:
> I have set up aosp mirror in gerrit server. After repo snyc, I can not > repo upload to gerrit server correctly. > Further details: I repo init via ssh: > repo init -u gerrit2@git:mirrors/platform/manifest > then repo sync
Why are you fetching as gerrit2?
> In .repo/manifest.xml I changed the review to be http://git:8080 > Finally After making changes - repo upload > The problem is the project I am working on is frameworks/base and in > repo upload it is uploading to platform/frameworks/base
Yes, this is expected. The name of that project (i.e. the relative git path) is platform/frameworks/base, but the workspace path is frameworks/base. The platform/ prefix is used for nearly all AOSP gits.
Why does the upload to platform/frameworks/base fail? It shouldn't. What's the git structure on the server? It should coincide with the structure used for fetching the data.
Any reason to fetch via SSH yet upload via HTTP?
> So I change the project name in .repo/manifest.xml to frameworks/base > and now upload works but this of course breaks repo sync
On Mon, Apr 23, 2012 at 11:35 PM, Asi Mugrabi <a...@nubosoftware.com> wrote: > I have set up aosp mirror in gerrit server. After repo snyc, I can not repo > upload to gerrit server correctly. > Further details: I repo init via ssh: > repo init -u gerrit2@git:mirrors/platform/manifest > then repo sync
> In .repo/manifest.xml I changed the review to be http://git:8080 > Finally After making changes - repo upload > The problem is the project I am working on is frameworks/base and in repo > upload it is uploading to platform/frameworks/base > So I change the project name in .repo/manifest.xml to frameworks/base and > now upload works but this of course breaks repo sync
Magnus and JBQ thank you for your replies. @ JBQ - This is mirror
1. *Why are you fetching as gerrit2?* I am fetching as gerrit because trying via repo init -u http://git/mirrors/platform/manifest results with messages: http://git/mirrors/platform/manifest/info/refs not found: did you run git update-server-info on the server? I ran git update-server-info on 1. mirrors 2. mirrors/platform 3. mirrors/platform/manifest.git but either one did not help. I checked the path http://git/mirrors/platform/ in a browser to make sure and I can reach it and manifest.git is there. Any advice on this issue? I can not find an answer on the web.
2. *Any reason to fetch via SSH yet upload via HTTP?* Well I hope I can solve the problem above soon. HTTP is the preferred fetch. Another important thing is in gerrit.config I set the basePath = /home/gerrit2/mirrors/platform/ Is this the correct path? If I set it to basePath = /home/gerrit2/mirrors/ gerrit can not set the projects (internal error) in http://git:8080/ Admin->Projects
On Tuesday, April 24, 2012 9:35:52 AM UTC+3, Asi Mugrabi wrote:
> I have set up aosp mirror in gerrit server. After repo snyc, I can not > repo upload to gerrit server correctly. > Further details: I repo init via ssh: > repo init -u gerrit2@git:mirrors/platform/manifest > then repo sync
> In .repo/manifest.xml I changed the review to be http://git:8080 > Finally After making changes - repo upload > The problem is the project I am working on is frameworks/base and in repo > upload it is uploading to platform/frameworks/base > So I change the project name in .repo/manifest.xml to frameworks/base and > now upload works but this of course breaks repo sync
What's listening on git:80, Gerrit or something else? You're pushing to port 8080 which presumably is Gerrit, so you should probably be fetching from the same port.
This particular error message indicates that you're running Git 1.6.5 or older since it's trying the old HTTP protocol (on the other hand, with such an old Git I'm surprised you were able to fetch the AOSP code). Or, you do have a sufficiently new Git, but your server hasn't been enabled to serve the smart HTTP protocol so the client falls back to the legacy protocol. The smart protocol is explained in more detail below.
But again, strive for a symmetric setup where you fetch and push against the same service.
[...]
> 2. *Any reason to fetch via SSH yet upload via HTTP?* > Well I hope I can solve the problem above soon. HTTP is the preferred > fetch. Another important thing is in gerrit.config I set the > basePath = /home/gerrit2/mirrors/platform/ > Is this the correct path?
Which path is the correct one depends on what's in these directories. If the contents of /home/gerrit2/mirrors is
Magnus thank you so much for your aid. I was starting to lose any hope. I believe this is helpful for many others also.
1. Gerrit is listening on 8080 ( basePath = /home/gerrit2/mirrors/platform/ - I understand that i not correct). Port 80 is just a redirection to /home/gerrit2
I will read smart protocol as soon as I am able.
git version on server is 1.7.2.5 and on client is 1.7.0.4
2. The contents of /home/gerrit2/mirrors is a bit different:
platform/frameworks/base.git
platform/manifest.git
device/samsung
....
When I change basePath to be /home/gerrit2/mirrors this is the error I receive in gerrit error_log.
[2012-04-25 10:27:26,740] ERROR com.google.gerrit.ehcache.PopulatingCache : Cannot lookup com.google.gerrit.server.project.ProjectCacheImpl$ListKey@757f98e7 in "project_list"
net.sf.ehcache.CacheException: Could not fetch object for cache entry with key "com.google.gerrit.server.project.ProjectCacheImpl$ListKey@757f98e7".
at net.sf.ehcache.constructs.blocking.SelfPopulatingCache.get(SelfPopulatingCa che.java:88)
at com.google.gerrit.ehcache.PopulatingCache.get(PopulatingCache.java:84)
at com.google.gerrit.server.cache.ProxyCache.get(ProxyCache.java:26)
at com.google.gerrit.server.project.ProjectCacheImpl.all(ProjectCacheImpl.java :132)
at com.google.gerrit.httpd.rpc.project.VisibleProjects.getProjects(VisibleProj ects.java:58)
at com.google.gerrit.httpd.rpc.project.VisibleProjects.call(VisibleProjects.ja va:51)
at com.google.gerrit.httpd.rpc.project.VisibleProjects.call(VisibleProjects.ja va:31)
at com.google.gerrit.httpd.rpc.Handler.to(Handler.java:65)
at com.google.gerrit.httpd.rpc.project.ProjectAdminServiceImpl.visibleProjects (ProjectAdminServiceImpl.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwtjsonrpc.server.MethodHandle.invoke(MethodHandle.java:91)
at com.google.gwtjsonrpc.server.JsonServlet.doService(JsonServlet.java:382)
at com.google.gwtjsonrpc.server.JsonServlet.service(JsonServlet.java:268)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.jav a:216)
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java: 141)
at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipe line.java:93)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocat ion.java:63)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:1 34)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocat ion.java:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:1 34)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocat ion.java:59)
at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.j ava:76)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:1 29)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocat ion.java:59)
at com.google.gerrit.httpd.RequestCleanupFilter.doFilter(RequestCleanupFilter. java:54)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:1 29)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocat ion.java:59)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:1 34)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocat ion.java:59)
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipel ine.java:122)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:110)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandle r.java:1322)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:473)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.jav a:921)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java :856)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:11 7)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java: 114)
at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler .java:59)
at com.google.gerrit.pgm.http.jetty.JettyServer$1.handle(JettyServer.java:139)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java: 114)
at org.eclipse.jetty.server.Server.handle(Server.java:352)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:5 96)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnecti on.java:1069)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint .java:510)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndP oint.java:34)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint. java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java: 450)
at java.lang.Thread.run(Thread.java:662)
> What's listening on git:80, Gerrit or something else? You're pushing to
> port 8080 which presumably is Gerrit, so you should probably be fetching
> from the same port.
> This particular error message indicates that you're running Git 1.6.5 or
> older since it's trying the old HTTP protocol (on the other hand, with
> such an old Git I'm surprised you were able to fetch the AOSP code). Or,
> you do have a sufficiently new Git, but your server hasn't been enabled
> to serve the smart HTTP protocol so the client falls back to the legacy
> protocol. The smart protocol is explained in more detail below.
> But again, strive for a symmetric setup where you fetch and push against
> the same service.
> [...]
> > 2. *Any reason to fetch via SSH yet upload via HTTP?*
> > Well I hope I can solve the problem above soon. HTTP is the preferred
> > fetch. Another important thing is in gerrit.config I set the
> > basePath = /home/gerrit2/mirrors/platform/
> > Is this the correct path?
> Which path is the correct one depends on what's in these directories. If
> the contents of /home/gerrit2/mirrors is
On Wednesday, April 25, 2012 at 10:37 EDT,
Asi Mugrabi <a...@nubosoftware.com> wrote:
> Magnus thank you so much for your aid. I was starting to lose any hope.
> I believe this is helpful for many others also.
> 1. Gerrit is listening on 8080 ( basePath =
> /home/gerrit2/mirrors/platform/ - I understand that i not correct).
> Port 80 is just a redirection to /home/gerrit2
Your webserver speaks HTTP on port 8080, not HTTPS. Either switch back
to HTTP, use the default HTTPS port (i.e. drop the :port part of the
URL), or specify another port to use for HTTPS traffic.
> I will read smart protocol as soon as I am able.
> git version on server is 1.7.2.5 and on client is 1.7.0.4
> 2. The contents of /home/gerrit2/mirrors is a bit different:
> platform/frameworks/base.git
> platform/manifest.git
> device/samsung
> ....
That's fine. I forgot about the .git extension to the directories.
> When I change basePath to be /home/gerrit2/mirrors this is the error
> I receive in gerrit error_log.
> [2012-04-25 10:27:26,740] ERROR
> com.google.gerrit.ehcache.PopulatingCache : Cannot lookup
> com.google.gerrit.server.project.ProjectCacheImpl$ListKey@757f98e7 in
> "project_list"
> net.sf.ehcache.CacheException: Could not fetch object for cache entry with
> key "com.google.gerrit.server.project.ProjectCacheImpl$ListKey@757f98e7".
Hmm, it looks like a stale project cache entry is causing this, but I
thought the project cache wasn't persistent across Gerrit restarts.
Hopefully someone else can explain this one.