Bug 1126497 - kie-config-cli: problems connecting in on-line mode [NEEDINFO]
Summary: kie-config-cli: problems connecting in on-line mode
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Configuration
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ER4
: 6.1.0
Assignee: Maciej Swiderski
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-04 15:15 UTC by jbride@redhat.com
Modified: 2015-12-07 16:47 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-07 16:47:40 UTC
Type: Bug
mbaluch: needinfo? (jbride)


Attachments (Terms of Use)

Description jbride@redhat.com 2014-08-04 15:15:27 UTC
Hi.
  In my BPM Suite 6.0.2 environment, I have a git repository that is available via the following URL:

    ssh://jboss@docker_bpms:8001/bpmsignalling

(where jboss is a user with 'admin' privledges and 'docker_bpms' is the serverIp).

With the standard git command-line utility, i execute standard git workflow:
clone, add, commit, push, pull, etc.

I'm encountering two problems in org.kie.config.cli.command.impl.CloneGitRepositoryCliCommand.java using community 6.1.0.Final :

1)  mangled URL
  - when executing kie-config-cli.sh and specifying a URL of:  ssh://docker_bpms:8001/system, the following exception occurs:

Caused by: org.eclipse.jgit.errors.NotSupportedException: URI not supported: ssh:///jboss@null:-1/system

  - seems that CloneGitRepositoryCliCommand mangles the URL on line 44.  When the conditional on line 43 is negated, then the SSH url does not get mangled and the previous error does not occur.

43  if (!gitUri.getScheme().equalsIgnoreCase("ssh")) {


2)  Auth fail
  - Caused by: com.jcraft.jsch.JSchException: Auth fail
	at com.jcraft.jsch.Session.connect(Session.java:484)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)

  - Is the CredentialsProvider on line 62 of CloneGitRepositoryCliCommand actually used somehow ?  I don't see how.



thanks.
jeff

Comment 2 jbride@redhat.com 2014-08-04 18:46:50 UTC
looks like this script works fine so long as an ip address is specified when prompted for the location of the remote git system repository:

ie:  ssh://172.17.0.2:8001/system   ..... connects and authenticates just fine.


ssh://docker_bpms:8001/system   .... bombs with the "URI not supported" exception.


Looks like the the problem is using a DNS name rather than the ip address.

Comment 3 Maciej Swiderski 2014-08-28 10:46:48 UTC
pull request created for UberFire project: https://github.com/uberfire/uberfire/pull/76

Comment 4 Maciej Swiderski 2014-08-28 11:19:47 UTC
PR was merged

uberfire
master:
https://github.com/uberfire/uberfire/commit/be859bb7cabe263f1b0cd7c526c73b5974964750

Comment 5 Pavel Kralik 2014-12-03 15:55:03 UTC
BPMS 6.1.0 ER2:
kie-config-cli.sh is not functional in ER2. Please, check this BZ when it is fixed.

Comment 6 Ryan Zhang 2014-12-17 04:19:10 UTC
(In reply to Pavel Kralik from comment #5)
> BPMS 6.1.0 ER2:
> kie-config-cli.sh is not functional in ER2. Please, check this BZ when it is
> fixed.

should this BZ  in "ASSIGNED" status?

Comment 7 Maciej Swiderski 2014-12-17 11:24:22 UTC
just confirmed it does work on master and 6.2.x so it should work as well on ER3.

Comment 8 Ryan Zhang 2014-12-18 02:12:45 UTC
(In reply to Maciej Swiderski from comment #7)
> just confirmed it does work on master and 6.2.x so it should work as well on
> ER3.

OK, Thanks for your check, Maciej!
I will move them to ON_QA for verification again.

Comment 9 Pavel Kralik 2015-01-07 15:52:12 UTC
kie-config-cli.sh does not work in BPMS 6.1.0.ER3.

Comment 10 Maciej Swiderski 2015-01-07 16:53:23 UTC
do you mind providing bit more information on what does not work there? Any errors on startup or...

Comment 11 Pavel Kralik 2015-02-06 13:47:40 UTC
(In reply to Maciej Swiderski from comment #10)
> do you mind providing bit more information on what does not work there? Any
> errors on startup or...
https://bugzilla.redhat.com/show_bug.cgi?id=1163840

Comment 12 Marek Baluch 2015-02-06 14:02:57 UTC
Maciej,

bz #1163840 referenced in comment #11 is not an issue anymore.

This issue is still relevant though:

[mbaluch@localhost bin]$ sh kie-config-cli.sh 
********************************************************

************* Welcome to Kie config CLI ****************

********************************************************

>>Please specify location of remote git system repository [ssh://localhost:8001/system]
ssh://docker_bpms:8001/bpmsignalling                                                
>>Please enter username:
jboss
>>Please enter password:

Exception in thread "main" java.lang.RuntimeException: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of fetch command
	at org.uberfire.java.nio.fs.jgit.util.JGitUtil.cloneRepository(JGitUtil.java:219)
	at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.newFileSystem(JGitFileSystemProvider.java:583)
	at org.uberfire.java.nio.file.FileSystems.newFileSystem(FileSystems.java:117)
	at org.uberfire.java.nio.file.FileSystems.newFileSystem(FileSystems.java:83)
	at org.uberfire.io.impl.AbstractIOService.newFileSystem(AbstractIOService.java:275)
	at org.kie.config.cli.command.impl.CloneGitRepositoryCliCommand.execute(CloneGitRepositoryCliCommand.java:70)
	at org.kie.config.cli.CmdMain.main(CmdMain.java:85)
Caused by: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of fetch command
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:145)
	at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:178)
	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:125)
	at org.uberfire.java.nio.fs.jgit.util.JGitUtil.cloneRepository(JGitUtil.java:198)
	... 6 more
Caused by: org.eclipse.jgit.errors.NotSupportedException: URI not supported: ssh:///jboss@null:-1/bpmsignalling
	at org.eclipse.jgit.transport.Transport.open(Transport.java:559)
	at org.eclipse.jgit.transport.Transport.open(Transport.java:433)
	at org.eclipse.jgit.transport.Transport.open(Transport.java:317)
	at org.eclipse.jgit.transport.Transport.open(Transport.java:287)
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:120)
	... 9 more

-----

One more question. Is the offline mode still supported? I'm getting connection refused if the server is no running.

Comment 13 Marek Baluch 2015-02-06 14:04:01 UTC
Tested on 6.1.0.ER4.

Comment 14 Maciej Swiderski 2015-02-09 12:22:36 UTC
Marek,

I'll look into the failing command for cloning so moving this bz to assigned.

for offline mode it is intended to be on shutdown server as it directly modifies bare git repo stored in .niogit. So the only way to use it is on same machine as the server that has direct access to .niogit folder with server being shutdown to avoid issues with wrong updates etc. Make sure that you use the offline switch and provide location of nougat folder.

Comment 15 Maciej Swiderski 2015-02-09 13:18:54 UTC
Marek,

I believe the issue here is that you specify wrong repo as for kie-config-cli there must always be a system repo used as given in the initial hint.

Could you please confirm that this is the issue?

Comment 16 Marek Baluch 2015-02-09 13:35:27 UTC
I'm forwarding the question to the reporter as I don't have access to the repository.

Jeff - could you please answer Maciej's question?

Thx.

Comment 17 Maciej Swiderski 2015-12-07 16:47:40 UTC
closing as part of bugzilla cleanup


Note You need to log in before you can comment on or make changes to this bug.