GitBlit on z/OS

64 views
Skip to first unread message

Henri Kuiper

unread,
Dec 16, 2019, 5:35:53 PM12/16/19
to gitblit
Should you wanna install GitBlit on z/OS, it's fairly easy...


Just wish GitBlit would deal with files that have a '$' in them.....

Florian Zschocke

unread,
Feb 1, 2020, 3:58:30 PM2/1/20
to gitblit
What problem do you have with files that have a '$' in them?

Henri Kuiper

unread,
Feb 1, 2020, 4:35:32 PM2/1/20
to gitblit
They don't show up in the webinterface

Florian Zschocke

unread,
Feb 2, 2020, 6:49:10 AM2/2/20
to gitblit
I'm afraid I'm not following. What is your use case here?
As far as I have tested it, the following works, at least under MacOS:
Repositories with names that have a $ in it.
Files with names that have a $ in it in repositories.
Files with text in them that contains a $, in repositories.
Markdown files that have a $ in the name in a repository, gets shown in the docs->pages tab.

Where in the web interface do you mean that what kind of files do not show up?

Henri Kuiper

unread,
Feb 2, 2020, 7:49:02 AM2/2/20
to gitblit
Florian,

I'm running it on z/OS

2020-02-02 06:42:57 [INFO ]
  _____  _  _    _      _  _  _
 |  __ \(_)| |  | |    | |(_)| |
 | |  \/ _ | |_ | |__  | | _ | |_
 | | __ | || __|| '_ \ | || || __|  http://gitblit.com
 | |_\ \| || |_ | |_) || || || |_   @gitblit
  \____/|_| \__||_.__/ |_||_| \__|  1.8.0

2020-02-02 06:42:57 [INFO ] Running on z/OS (02.03.00)

I've a repo (managed with zigi to be complete) that looks like this

Screenshot from 2020-02-02 13-47-21.png


Then when I click the '$'-folder....

Screenshot from 2020-02-02 13-47-35.png



Trace in the output:

2020-02-02 06:48:08 [ERROR] Can't instantiate page using constructor public com.gitblit.wicket.pages.TreePage(org.apache.wicket.PageParameters) and argument r = "zigitest.git" h = "master" f = "SOME$.PDS"
org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public com.gitblit.wicket.pages.TreePage(org.apache.wicket.PageParameters) and argument r = "zigitest.git" h = "master" f = "SOME$.PDS"
    at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:89)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:305)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
    at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
    at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1279)
    at org.apache.wicket.RequestCycle.step(RequestCycle.java:1358)
    at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1465)
    at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
    at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
    at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:88)
    at com.gitblit.servlet.EnforceAuthenticationFilter.doFilter(EnforceAuthenticationFilter.java:99)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:88)
    at com.gitblit.servlet.ProxyFilter$1.doFilter(ProxyFilter.java:89)
    at com.gitblit.servlet.ProxyFilter.doFilter(ProxyFilter.java:92)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:88)
    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120)
    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.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    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:812)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:83)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:437)
    at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:188)
    ... 40 more
Caused by: java.lang.NullPointerException
    at com.gitblit.utils.JGitUtils.getPathModel(JGitUtils.java:1275)
    at com.gitblit.utils.JGitUtils.getFilesInPath2(JGitUtils.java:963)
    at com.gitblit.wicket.pages.TreePage.<init>(TreePage.java:62)
    ... 45 more

Florian Zschocke

unread,
Feb 3, 2020, 1:41:15 PM2/3/20
to gitblit
Hi Henri,

I got it now, thanks.This is an issue (#999) that was fixed in version 1.9.0. You may want to try that instead. It kind of hasn't been "officially released" yet, since the gitblit.com domain needs to be changed to redirect to Gitblit's GitHub pages. But you can already download it. Either from the Download button on the Readme on the Github project page, the project releases page, or via https://gitblit.github.io/gitblit.

Henri Kuiper

unread,
Feb 4, 2020, 3:25:09 PM2/4/20
to gitblit
Florian,

Awesome!


Got the 1.9.0 version, and made it work for z/OS according to my own HOWTO at https://zdevops.tumblr.com/post/189709191450/do-you-git-it

Now it works like a charm......

Screenshot from 2020-02-04 21-24-25.png

Florian Zschocke

unread,
Feb 4, 2020, 4:36:25 PM2/4/20
to gitblit
Nice! I'm happy to hear it works for you now. :)

Florian Zschocke

unread,
May 7, 2021, 2:07:55 PM5/7/21
to gitblit
Henri,

what JVM are you running this on? There is another chap you tries to run Gitblit on z/OS, but it fails.

Henri Kuiper

unread,
May 7, 2021, 3:32:56 PM5/7/21
to git...@googlegroups.com
Hey Florian. 

That’s one of my buddies ;)
Already in contact with him. 

Unfortunately the zos I ran this on died. I think it was Java 7. I’m resetting up the new zos. It’s at same level as Lionel is using. So hope to be able to help get to the bottom of this. 

Props to you for reaching out!

#awesome. Keep you posted!!!

Sent from my wireless iPhone

On 7 May 2021, at 20:07, Florian Zschocke <f.zsc...@gmail.com> wrote:

Henri,
--
You received this message because you are subscribed to a topic in the Google Groups "gitblit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gitblit/kGrGjLNWu-4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gitblit+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gitblit/f4d53810-c7d0-49e9-a370-e4edc26cdce4n%40googlegroups.com.

Henri Kuiper

unread,
May 13, 2021, 4:14:50 PM5/13/21
to gitblit
It's working aok fine....... there's just issues with the '.lock' files and other permissions that seem out of place..
trying to post a 'status'  overview here....

2021-05-12 22:59:26 [ERROR] Failed to update user model admin!
java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: a???a?????a???a?????????
at sun.nio.fs.UnixPath.encode(UnixPath.java:162)
at sun.nio.fs.UnixPath.<init>(UnixPath.java:86)
at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:294)
at java.io.File.toPath(File.java:2245)
at org.eclipse.jgit.util.FileUtils.fileAttributes(FileUtils.java:577)
at org.eclipse.jgit.util.FS.fileAttributes(FS.java:431)
at org.eclipse.jgit.internal.storage.file.FileSnapshot.save(FileSnapshot.java:118)

and

2021-05-12 23:11:09 [ERROR] Failed to update user model admin!
org.eclipse.jgit.errors.LockFailedException: Cannot lock /prj/gitblit/gitblit-1.9.1/data/users.conf.tmp
at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:227)
at com.gitblit.ConfigUserService.write(ConfigUserService.java:848)
at com.gitblit.ConfigUserService.updateUserModel(ConfigUserService.java:314)
at com.gitblit.ConfigUserService.updateUserModel(ConfigUserService.java:208)
at com.gitblit.manager.UserManager.updateUserModel(UserManager.java:243)
at com.gitblit.manager.AuthenticationManager.upgradeStoredPassword(AuthenticationManager.java:574)
at com.gitblit.manager.AuthenticationManager.authenticateLocal(AuthenticationManager.java:544)
at com.gitblit.manager.AuthenticationManager.authenticate(AuthenticationManager.java:483)

Java Version Used:

java -version
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 8.0.6.7 - pmz6480sr6fp7-20200312_01(SR6 FP7))
IBM J9 VM (build 2.9, JRE 1.8.0 z/OS s390x-64-Bit Compressed References 20200219_440062 (JIT enabled, AOT enabled)
OpenJ9   - 3088245
OMR      - eb95a4d
IBM      - 83517b6)
JCL - 20200310_01 based on Oracle jdk8u241-b07

It's weird as I am running the GitBlit instance with IBMUSER (the z/OS equivalent of 'root' in this case)

Curious to see how gitblit tries the creation of the lockfile....

Any suggestions on what to 'log'  in a retry to help find the cause?

Matthias Sohn

unread,
May 13, 2021, 4:17:06 PM5/13/21
to git...@googlegroups.com
On Thu, May 13, 2021 at 10:14 PM Henri Kuiper <henri...@zdevops.com> wrote:
It's working aok fine....... there's just issues with the '.lock' files and other permissions that seem out of place..
trying to post a 'status'  overview here....

2021-05-12 22:59:26 [ERROR] Failed to update user model admin!
java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: a???a?????a???a?????????

Is the OS configured to use unicode ?
 
You received this message because you are subscribed to the Google Groups "gitblit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitblit+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gitblit/4ede9a0b-af6f-44f1-a6b8-45f9e5b4725fn%40googlegroups.com.

Matthias Sohn

unread,
May 13, 2021, 4:18:44 PM5/13/21
to git...@googlegroups.com
On Thu, May 13, 2021 at 10:16 PM Matthias Sohn <matthi...@gmail.com> wrote:
On Thu, May 13, 2021 at 10:14 PM Henri Kuiper <henri...@zdevops.com> wrote:
It's working aok fine....... there's just issues with the '.lock' files and other permissions that seem out of place..
trying to post a 'status'  overview here....

2021-05-12 22:59:26 [ERROR] Failed to update user model admin!
java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: a???a?????a???a?????????

Is the OS configured to use unicode ?

Henri Kuiper

unread,
May 13, 2021, 4:25:40 PM5/13/21
to gitblit

Hmmmm..

Bit of a nasty question :)

The OS runs 'EBCDIC', that being said: the output for locale yields:

(base) IBMUSER:/: >locale
LANG=C
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_SYNTAX="C"
LC_TOD="C"
LC_ALL=


And I'm running Gitblit as:

#!/bin/bash
java -Xmx1024m -Dfile.encoding=UTF-8 -cp "gitblit.jar:ext/*" com.gitblit.GitBlitServer --baseFolder dat

Henri Kuiper

unread,
May 13, 2021, 4:48:10 PM5/13/21
to gitblit
Without that file.encoding argument it kinda fails with:

2021-05-13 21:47:45 [INFO ] Loading properties files from jar:file:/prj/gitblit/gitblit-1.9.1/gitblit.jar!/com/gitblit/wicket/GitBlitWebApp.properties
2021-05-13 21:48:01 [ERROR] Failed to read default message from welcome.mkd! for anonymous
org.parboiled.errors.ParserRuntimeException: Error while parsing action 'Root/Sequence/ZeroOrMore/Sequence/Block/FirstOf/Heading/FirstOf/AtxHeading/OneOrMore/Sequence/AtxInline/Inline/Inline_Action1' at input position (line 1, pos 4):
## Welcome to Gitblit
   ^

org.pegdown.ParsingTimeoutException
    at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:366)
    at org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46)
    at org.parboiled.matchers.MemoMismatchesMatcher.match(MemoMismatchesMatcher.java:41)
    at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
    at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351)
    at org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46)

Florian Zschocke

unread,
May 15, 2021, 8:50:39 AM5/15/21
to gitblit
Locking the file is simply creating a new file. I'm not sure why it fails for you. Especially since it seems to work for other files, doesn't it? Unfortunately the original exception is not propagated but overwritten, so we can't tell what went wrong underneath. One difference could be that the lock file operation tries to create a new file exclusively. 
There is an open pull request which replaces the JGit code to save the file. I haven't merged that yet, as I am not sure that is the best solution. But we could give that a try if we don't find another way.
Reply all
Reply to author
Forward
0 new messages