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 @anon46315158 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

Hi,

I got the following error when starting katalonc from a jenkins job using an offline licence.
Starting from the local command line this works fine, but starting with jenkins fails.
Any suggestions on how to resolve this?


Activating…
Start activating offline…
Search for valid offline licenses in folder: C:\Users\appium.katalon\license
**Start checking license: *.lic
***.lic is valid.
The number of valid offline licenses: 1

Fri Oct 30 14:58:43 CET 2020
Offline activation failed.
java.lang.NumberFormatException: For input string: “‘tasklist’ is not recognized as an internal or external command,”
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:569)
at java.lang.Integer.valueOf(Integer.java:766)
at com.kms.katalon.application.utils.ProcessUtil.countKatalonCRunningSession(ProcessUtil.java:38)
at com.kms.katalon.application.utils.ProcessUtil.countKatalonRunningSession(ProcessUtil.java:21)
at com.kms.katalon.application.utils.ActivationInfoCollector.activateOfflineForEngine(ActivationInfoCollector.java:551)
at com.kms.katalon.execution.console.ConsoleMain.launch(ConsoleMain.java:225)
at com.kms.katalon.console.application.ConsoleApplicationStarter.start(ConsoleApplicationStarter.java:37)
at com.kms.katalon.application.Application.runConsole(Application.java:125)
at com.kms.katalon.application.Application.start(Application.java:88)
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)

Offline activation failed.
Start activating online…
Cannot connect to Katalon TestOps server. Please check your Internet connection and try again.
All launchers terminated

I ran into this same issue. I found that it was an issue with the system Path variable not being inherited. I added all entries in the users path to the system path then removed the users path variable and everything ran just fine.

Workaround 1

  1. Manually move entries in the user variable PATH by either:
  2. Moving all the entries out of the user variable PATH into the system variable PATH or
  3. Moving all entries out of the user variable PATH into a new user variable LOCAL_PATH . Append %LOCAL_PATH% to the system variable PATH .
    1. Example: PATH=C:\Program Files\perforce;%LOCAL_PATH%
  4. Delete the user variable PATH so it no longer overwrites the system variable PATH .

Alternatively, you could do the reverse and the move contents of the system variable PATH into the user variable PATH.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.