Drools GIT cloning on Websphere

112 views
Skip to first unread message

rs65...@gmail.com

unread,
Aug 11, 2016, 8:28:12 AM8/11/16
to Drools Setup
Hi,

We have deployed Drools 6.3 on Websphere. While doing a clone of the GIT repository using the ssh url, we get a jsch exception :

com.jcraft.jsch.JSchException: verify: false

We tried following the steps mentioned in the following link by adding a shared library of bouncy castle and setting the property
org.apache.sshd.registerBouncyCastle to true, but does not work.


Please help. This works fine on Jboss and Weblogic.

Thanks,
Rekha

Maciej Swiderski

unread,
Aug 19, 2016, 5:03:41 AM8/19/16
to Drools Setup
you need to define the shared library with bouncy castle lib and assign that into the web application (workbench). Make sure you also define the security domain (JAAS login module you use for authentication) via org.uberfire.domain system property. 

That's all that is needed for git server to respond properly 

Maciej

rs65...@gmail.com

unread,
Aug 21, 2016, 2:59:09 AM8/21/16
to Drools Setup
Hi Maciej,


Thanks for the response.
We have mapped the bouncy castle shared library to our drools workbench application and also set the properties for the bouncy castle use and JAAS login. Still get the Invalid remote error. We are using Jgit (tried also with the latest version)  to clone the repository and using user name/ password credentials for connection.

org.eclipse.jgit.api.errors.InvalidRemoteException: Invalid remote: origin
    at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:136)
    at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:193)
    at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:133)
    at OpenSSHConfig.cloneRepository(OpenSSHConfig.java:180)
    at OpenSSHConfig.testPush(OpenSSHConfig.java:162)
    at OpenSSHConfig.main(OpenSSHConfig.java:86)
Caused by: org.eclipse.jgit.errors.NoRemoteRepositoryException: ssh://gsource@indev04:8001/uf-playground: not found.
    at org.eclipse.jgit.transport.BasePackConnection.noRepository(BasePackConnection.java:265)
    at org.eclipse.jgit.transport.BasePackConnection.readAdvertisedRefsImpl(BasePackConnection.java:200)
    at org.eclipse.jgit.transport.BasePackConnection.readAdvertisedRefs(BasePackConnection.java:178)
    at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:283)
    at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161)
    at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
    at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
    at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)
    at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)

Are we missing something?
Please suggest

Regards,
Rekha

rs65...@gmail.com

unread,
Aug 22, 2016, 12:58:17 AM8/22/16
to Drools Setup
Hi Maciej,

We wrote a sample program to open an ssh session on the host and port configured for git ssh and then opened the channel and executed the command git-upload-pack '/uf-playground' but the channel does not return back contents of the repository and reports no error too. When we pass a wrong repository name, error 'Can't resolve repository name' is reported. So seems like the repository is found but unable to pass back contents.
Please suggest what might be wrong here.

Thanks
rekha



On Thursday, 11 August 2016 17:58:12 UTC+5:30, rs65...@gmail.com wrote:

Maciej Swiderski

unread,
Aug 22, 2016, 3:39:34 AM8/22/16
to drools...@googlegroups.com
check if you haven't assigned any roles to your repository and the user you use to connect to clone is not member of that role.

Maciej

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/cf7c250b-3045-42bd-9f63-8e604b46cdaf%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

rs65...@gmail.com

unread,
Aug 22, 2016, 4:44:48 AM8/22/16
to Drools Setup


On Thursday, 11 August 2016 17:58:12 UTC+5:30, rs65...@gmail.com wrote:

rs65...@gmail.com

unread,
Aug 22, 2016, 4:45:13 AM8/22/16
to Drools Setup


On Thursday, 11 August 2016 17:58:12 UTC+5:30, rs65...@gmail.com wrote:

rs65...@gmail.com

unread,
Aug 22, 2016, 4:47:00 AM8/22/16
to Drools Setup
Hi Maciej,

How do we know if there are any roles assigned to the repository. We had only modified the war to add the rest-all role because we wanted to make rest calls. The rest-all role was not there by default.
The user that we map has all these 3 roles configured and we use the ssh url with the same user.

Regards,
Rekha


On Thursday, 11 August 2016 17:58:12 UTC+5:30, rs65...@gmail.com wrote:

rs65...@gmail.com

unread,
Aug 22, 2016, 10:50:34 AM8/22/16
to Drools Setup
HI Maciej,

We followed all the steps to configure Drools WB on Websphere and found your blog too and followed exactly the same.

http://mswiderski.blogspot.in/2014/04/jbpm-6-on-websphere-installation-notes.html

Still we do not get anything on the channel that executes git-upload-pack on the repository.
Please let us know if we can call you and if so please can your share your contact number and we could also share our screen so that you could verify if we are missing something. We are badly stuck because of this .

Thanks

Rekha

On Thursday, 11 August 2016 17:58:12 UTC+5:30, rs65...@gmail.com wrote:

rs65...@gmail.com

unread,
Aug 23, 2016, 9:25:15 AM8/23/16
to Drools Setup
Hi Maciej,

On modifying the BaseGitCommand class of uberfire jgit library to report an exception,  we found the following exception being raised:

[8/23/16 18:04:10:504 IST] 000000a2 SystemErr     R javax.enterprise.context.ContextNotActiveException: WebBeans context with scope type annotation @ApplicationScoped does not exist within current thread
[8/23/16 18:04:10:504 IST] 000000a2 SystemErr     R     at org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:360)
[8/23/16 18:04:10:505 IST] 000000a2 SystemErr     R     at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:125)
[8/23/16 18:04:10:505 IST] 000000a2 SystemErr     R     at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:96)
[8/23/16 18:04:10:505 IST] 000000a2 SystemErr     R     at org.kie.workbench.common.services.backend.security.KieFileSystemAuthorizationManager_$$_javassist_166.authorize(KieFileSystemAuthorizationManager_$$_javassist_166.java)
[8/23/16 18:04:10:505 IST] 000000a2 SystemErr     R     at org.uberfire.backend.server.security.IOServiceSecuritySetup$1.authorize(IOServiceSecuritySetup.java:72)
[8/23/16 18:04:10:505 IST] 000000a2 SystemErr     R     at org.uberfire.java.nio.fs.jgit.daemon.ssh.BaseGitCommand.run(BaseGitCommand.java:126)
[8/23/16 18:04:10:505 IST] 000000a2 SystemErr     R     at org.uberfire.java.nio.fs.jgit.daemon.ssh.BaseGitCommand$1.run(BaseGitCommand.java:114)
[8/23/16 18:04:10:505 IST] 000000a2 SystemErr     R     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:522)
[8/23/16 18:04:10:506 IST] 000000a2 SystemErr     R     at java.util.concurrent.FutureTask.run(FutureTask.java:277)
[8/23/16 18:04:10:506 IST] 000000a2 SystemErr     R     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
[8/23/16 18:04:10:506 IST] 000000a2 SystemErr     R     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[8/23/16 18:04:10:506 IST] 000000a2 SystemErr     R     at java.lang.Thread.run(Thread.java:785)

For a workaround, when we commented this authorize call, the clone ran successfully. Would be having an idea on what could have caused this?


Thanks
Rekha

On Thursday, 11 August 2016 17:58:12 UTC+5:30, rs65...@gmail.com wrote:

Maciej Swiderski

unread,
Aug 24, 2016, 1:29:18 AM8/24/16
to drools...@googlegroups.com
then it seems to be a bug (another one from the sort of WAS background tasks with CDI) could you please open jira in UF project in jira - https://issues.jboss.org/projects/UF

Maciej

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.

rs65...@gmail.com

unread,
Aug 24, 2016, 1:45:05 AM8/24/16
to Drools Setup
Hi Maciej,

Yes, will do the same.
Thanks for all the help.

Regards,

Rekha

On Thursday, 11 August 2016 17:58:12 UTC+5:30, rs65...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages