Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey guys,
I've ran into a problem with the Talend commandline tool. Here is my current setup:
TALEND
Version: 7.2.1
Build id: 20190909_1200_patch
TAC
AWS - Europe
SERVER
Ubuntu 18.04 LTS
Its a clean talend studio install. Running the commandline-linux.sh script prompted me to enter the adminUrl, my username and password to retrieve the license. I entered these credentials and they worked. I used "https://tmc.eu.cloud.talend.com/studio_cloud_connection" here as my adminUrl. I used this same url in to connect Talend Open Studio and all seems to work fine there as well.
But then i try to initialize my repository using the "initRemote" command and specify the same information [adminUrl, username, password] and get the following error:
java.lang.IllegalStateException: org.talend.utils.json.JSONException: A JSONObject text must begin with '{' at character 1
at org.talend.commandline.cli.CommandLineHandler.computeCommand(CommandLineHandler.java:369)
at org.talend.commandline.cli.CommandLineHandler.process(CommandLineHandler.java:266)
at org.talend.commandline.cli.CommandLineHandler.execute(CommandLineHandler.java:218)
at org.talend.commandline.cli.CommandLineHandler.execute(CommandLineHandler.java:205)
at org.talend.commandline.mode.NormalCommandLine.start(NormalCommandLine.java:32)
at org.talend.commandline.CommandLineApplication.start(CommandLineApplication.java:291)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
at org.eclipse.equinox.launcher.Main.run(Main.java:1501)
at org.eclipse.equinox.launcher.Main.main(Main.java:1474)
java.lang.IllegalStateException: org.talend.utils.json.JSONException: A JSONObject text must begin with '{' at character 1
at org.talend.commandline.cli.CommandLineHandler.computeCommand(CommandLineHandler.java:369)
at org.talend.commandline.cli.CommandLineHandler.process(CommandLineHandler.java:266)
at org.talend.commandline.cli.CommandLineHandler.execute(CommandLineHandler.java:218)
at org.talend.commandline.cli.CommandLineHandler.execute(CommandLineHandler.java:205)
at org.talend.commandline.mode.NormalCommandLine.start(NormalCommandLine.java:32)
at org.talend.commandline.CommandLineApplication.start(CommandLineApplication.java:291)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
at org.eclipse.equinox.launcher.Main.run(Main.java:1501)
at org.eclipse.equinox.launcher.Main.main(Main.java:1474)
Seems like something's not being parsed correctly internally but I really don't get what's going wrong. Hope someone can help me out with this.
What i've already tried:
- Changing the "adminUrl" to something else just for debugging purposes. When changing the url to point to
the AWS - Asia Pacific or AWS - US West urls it gave me the same error. Only when changing the url to a location that didn't exist it would say that it couldn't connect.
- Preconfiguring using Talend Studio and then running the command line tool. Problem here is that i'm developing on a Macbook. The command line tool isn't mac os compatible so whenever i move my preconfigured Talend Studio installation to my Ubuntu 18.04 LTS Server and try to run commands it's giving me all kinds of java mac compatibility issues. This doesn't work.
- Using an Ubuntu 18.04 VM and preconfiguring the Talend Studio in there and then starting the commandline tool. Even after logging into the repository and opening a project from the Talend Studio, it still asks me to log into the repository. Whenever i then try to use the initRemote command i get the same JSON Object error.
- Using the 7.1.1 Talend Studio version. The commandline tool in this version, unconfigured, spits out even more errors...
Hello,
Could you please create a support case on talend support portal? In this way, our colleagues from support team will give you a remote assistance through support cycle with priority.
Best regards
Sabrina
Hello,
I have a similar issue while using the initRemote command within the commandline tool.
I tried this command:
initRemote https://tmc.eu.cloud.talend.com -ul "xxx@xxx" -up "xxx"
And got this error:
java.lang.IllegalStateException: Unable to access to url : https://tmc.eu.cloud.talend.com
Same issue with the URL https://tmc.eu.cloud.talend.com/studio_cloud_connection
Talend version: 7.3.1
Thanks in advance for your help,
Alex
Hello,
We have replied to your another topic about: https://community.talend.com/s/question/0D55b00006MpdG3CAJ/error-when-using-initremote-command-with-...
Could you please have a look at it?
Best regards
Sabrina
Hi @Xiaodi Shi i would love to - but your link points only this post 🙂
and what about using talend studio v8.0.1.20230315_1127-patch
Hello,
It seems that only below commands are supported with cloud:
publishAction actionName publish action into cloud |
| workspace (deprecated) |
| -v (--version) version action publishing version |
| -u (--username) username cloud user login name |
| -p (--password) password cloud user password |
| -r (--url) url inventory service URL |
| -i (--image) publish action with |
| screenshot |
| -na (--not_accelerate) don't accelerate the publish |
| -w (--workspace) workspace target workspace |
| listCloudWorkspaces list all available workspaces |
| for user (and action) |
| (deprecated) |
| -u (--username) username cloud user login name |
| -p (--password) password cloud user password |
| -r (--url) url inventory service URL |
| -n (--name) name action name
You will find the list of commands in the below document:
https://help.talend.com/r/en-US/8.0/studio-user-guide/cmdl-api
Unfortunately, Commandline is not supported to connect to TMC using initRemote or any other commands.
The only way to connect to TMC would be through studio or CI builder.
Feel free to post your issue here.
Best regards
Sabrina
Great! thanks for that you made my day 🙂
Means that there is no way for publishing jobs via command line:
if i try
publishAction jobname -v 2.0 -u XXXXX@XXXXX.YYY -p ZZZZZZZZZ -r https://tmc.eu.cloud.talend.com/inventory
!ENTRY org.talend.commandline 1 0 2023-07-28 07:03:04.581
!MESSAGE publishAction
!ENTRY org.talend.commandline 1 0 2023-07-28 07:03:04.581
!MESSAGE FAILED at Fri Jul 28 07:03:04 CEST 2023
exception : org.talend.commandline.client.command.CommandStatusWrapException: java.lang.RuntimeException: java.lang.IllegalStateException: should be logged on a repository
at org.talend.commandline.command.ExtensionCommandSwitch.caseExtensionServerCommand(ExtensionCommandSwitch.java:191)
at org.talend.commandline.client.command.extension.AbstractExtensionCommandSwitch.doSwitch(AbstractExtensionCommandSwitch.java:31)
at org.talend.commandline.command.CommandProcessorSwitch.caseExtensionCommand(CommandProcessorSwitch.java:179)
at org.talend.commandline.client.util.CommandAbstractSwitch.doSwitch(CommandAbstractSwitch.java:70)
at org.talend.commandline.command.CommandConsumer.executeCommand(CommandConsumer.java:57)
at org.talend.commandline.command.CommandConsumer.execute(CommandConsumer.java:35)
at org.talend.commandline.cli.CommandLineHandler.process(CommandLineHandler.java:289)
at org.talend.commandline.cli.CommandLineHandler.execute(CommandLineHandler.java:219)
at org.talend.commandline.cli.CommandLineHandler.execute(CommandLineHandler.java:194)
at org.talend.commandline.mode.ShellServerHandler.start(ShellServerHandler.java:51)
at org.talend.commandline.mode.ShellCommandLine.start(ShellCommandLine.java:24)
at org.talend.commandline.cli.CommandLineHandler.executeClientCommand(CommandLineHandler.java:689)
at org.talend.commandline.cli.CommandLineHandler.process(CommandLineHandler.java:268)
at org.talend.commandline.cli.CommandLineHandler.execute(CommandLineHandler.java:219)
at org.talend.commandline.cli.CommandLineHandler.execute(CommandLineHandler.java:206)
at org.talend.commandline.mode.NormalCommandLine.start(NormalCommandLine.java:32)
at org.talend.commandline.CommandLineApplication.start(CommandLineApplication.java:407)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
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:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:654)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1462)
at org.eclipse.equinox.launcher.Main.main(Main.java:1435)
Caused by: java.lang.IllegalStateException: should be logged on a repository
at org.talend.commandline.command.execute.AbstractExecuteCommand.checkLogged(AbstractExecuteCommand.java:125)
at org.talend.designer.publish.cloud.commandline.commands.IPaasPublishExecuteCommand.execute(IPaasPublishExecuteCommand.java:61)
at org.talend.commandline.command.ExtensionCommandSwitch.caseExtensionServerCommand(ExtensionCommandSwitch.java:189)
... 29 more
Hello,
I usually use Talend Studio via “Publish to Cloud” on each Job (It takes a lot of time) and regarding how to automate/accelerate the tasks Cloud publication, I would say the best way is to use CI builder, please see
https://help.talend.com/r/en-US/8.0/software-dev-lifecycle-best-practices-guide/ci-build
Best regards
Sabrina