0

I am attempting to connect to Artifactory to read a Java zip file with the admin user. The call is made through Talend Restful API interface (described below).

Expected result: To read the file stored in Artifact repository and copy it to a server To see a record of the access in the access.log file

Actual: There is a line in the request.log with the HTTP code 200 , but there is nothing recorded in the access.log. How do I find out what the issue is?

About Talend Restful API: Talend has a way to call its Java based jobs through its Talend Administrator Console (TAC), a web based interface by creating an object called a task. The task refers to a Java zipped file stored in Artifactory, connects to Artifactory and copies it to the machine where TAC runs and executes it. When this action is done through TAC itself, it works. But when it is called through Talend Restful API, we get the error "{"error":"nexus.error.wrongstatus","returnCode":181}"

The Restful call (calling from TAC server): ./MetaServletCaller.sh --tac-url http://... -json '{"actionName": "associatePreGeneratedJob", "active": true, "artifactoryArtifactId": "job_showMsg2", "artifactoryGroupId": "test.job", "artifactoryRepository": "snapshot", "artifactoryVersion": "0.1.0", "authPass": "xxx", "authUser": "xxx", "contextName": "Default", "description": "test_jb1 description", "executionServerName": "jbsrv", "importType": "Artifactory", "logLevel": "Info", "onUnknownStateJob": "WAIT", "pauseOnError": false, "taskName": "job_test", "taskType": "Artifact","targetConductor":"JOBCONDUCTOR", "timeout": 3600}'

st_usr
  • 1
  • 1
  • From the response, it looks like the error you get is from Nexus and not from Artifactory. Are you sure this is a REST to Artifactory? – yahavi Dec 02 '20 at 15:48
  • Yes, the Restful API also has parameters for Nexus. I added those in as well to test. We don't have Nexus setup and because of that it complains about not being able to access it. – st_usr Dec 02 '20 at 16:06
  • Which REST API are you using? is it documented in the Talend documentation? – Dror Bereznitsky Dec 06 '20 at 12:46
  • Yes, the documentation link is here. I am using "associatePreGeneratedJob" https://help.talend.com/r/aeDZep12n8jauRUZ8TEq3g/qQ6napPfF0LLwsXvZMOAXA – st_usr Dec 14 '20 at 19:25

0 Answers0