Offline activation fails with console command through SSH

@devalex88 @ThanhTo

I’m trying a new setup using an Offline KRE license on a virtual machine. Command line execution works perfectly fine if I’m logged into the machine, and execute the console command from there:

However, if I attempt the exact same command through an SSH connection (via Jenkins, my local SSH client, etc.), offline activation fails:

image

Any suggestions on how to resolve this?

Thank you in advance!

Bump @devalex88 @ThanhTo

Gonna call out some others, as I’m getting no response on this:

@duyluong @huynguyen @Jass @sang @Hanh_Tran

1 Like

I think they’re on a break, looking at some of their visit-stats.

1 Like

Had the same thought, was hoping 2 weeks was enough :expressionless:

Hi @Brandon_Hein,
Please provide us the email and .log file.
For the .log file, please find the location containing the .log file in your log as the screenshot below

Hi @Loan_Tran, thank you for responding :slight_smile:

I’ve sent you a DM with the requested info.

Thank you for your time.

Can you provide us which OS KRE run on?
It looks like KRE cannot locate the ‘find’ utility from your window VM.
Can you run find from the cmd?
If not, please check if find.exe exists in the System32 directory and make sure you have added it to the PATH environment variable that KRE can call.

@quile

My KRE instance is on a Windows 10 virtual machine.

Yes:

image

As you can see here, I have two find utilities, one through a cygwin server (which I am using for the SSH connection) and the system find. I can successfully run the find command from either the VM itself, or through SSH.

From the error though, it doesn’t seem (at least to me) that it couldn’t run find.exe, but rather that find.exe couldn’t find some directory:

java.lang.NumberFormatException: For input string: "find: ‘/i’: No such file or directory"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.valueOf(Integer.java:766)
	at com.kms.katalon.application.utils.ProcessUtil.countKatalonCRunningSession(ProcessUtil.java:37)
	at com.kms.katalon.application.utils.ProcessUtil.countKatalonRunningSession(ProcessUtil.java:20)
	at com.kms.katalon.application.utils.ActivationInfoCollector.activateOfflineForEngine(ActivationInfoCollector.java:506)
	at com.kms.katalon.execution.console.ConsoleMain.launch(ConsoleMain.java:188)
	at com.kms.katalon.console.application.Application.runConsole(Application.java:71)
	at com.kms.katalon.core.application.Application.runConsole(Application.java:98)
	at com.kms.katalon.core.application.Application.start(Application.java:73)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

@Brandon_Hein
I think the problem is that the “find” utility in Cygwin has a higher priority than the “find” utility in System32.
Make the “find” utility in System32 has a higher priority than the “find” utility in Cygwin (putting “find” utility in System32 in your path before “find” utility in Cygwin) and try again.

@quile i think basic functionalities should be OS agnostic, therefore independent on particular third party tools (find.exe from windows vs linux compiled tool with same name).
Therefore i would consider such issue as a serious bug.
Activation mechanism may have to be reconsidered, since it is the main gate between buying the product and actually using it.
just saying …
cc @Russ_Thomas

I agree.

There’s a “Missing Manual” waiting to be written around TestOps and Activation that would explain in clear terms what is actually going on and what the software is expecting. I’m looking at an invitation email right now and TestOps flat out refuses to cooperate. I can guess why, the machine where I’m reading the email is already activated/registered with “another me”. Driving me crazy. I should be able to create N users in TestOPs such that they will be recognized as valid users when they attempt to (re)Activate a Katalon instance. Damned if I can figure out how to do it. (Annoying - I did this once but I forgot the hoops I jumped through and didn’t write them down - didn’t imagine I’d need THREE of me :roll_eyes:)

@Russ_Thomas therefore, let’s move this to bug reports.
perhaps this will help in tracking it

^^^ this is an workaround, not a solution.

2 Likes

Ok, I’ve set the priority in the path, and it reflects correctly in the machine’s terminal:

image

However, through the SSH connection, it is still prioritizing the Cygwin find:

image

I don’t know that there’s any way to change this.

Could this be an issue with linux vs. windows, as @bionel mentioned? I’d really rather not change my ssh server on that machine (assuming that would even help), as it’s being used by a lot of other machines in our network.

I decided to install an OpenSSH server to test whether it was a problem with Cygwin or something else. I was able to get it to work using that server, so I think I’ll go with this for now, and see if those that were able using Cygwin on that machine are ok with the change, as we need to get KRE running ASAP.

That being said, I think this should still be investigated, as I’m sure it will come up from other users.

Thanks for everyone’s input :slightly_smiling_face:

2 Likes