Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
SHH2308
Contributor
Contributor

401 unauthorized error when calling deployed REST service in ESB

Greetings,

 

I am testing the deployment of REST service built with the tRESTRequest/tRESTResponse components in TOS ESB. When running the job/service in studio I am able to make successful callouts to the service via http in POSTMan (which is running by default on port 8090). After deploying to ESB Runtime (and copying to the deploy directory), I am getting a 401 unauthorized error when making the same request in POSTMan to the service which is deployed and running on port 8040.

 

FYI-the 'Use Authentication (ESB Runtime Only) checkbox is NOT checked in the tRestRequest component.

 

I also added org.osgi.service.http.enabled to org.ops4j.pax.web to enable http support.

 

org.osgi.service.http.port=8040 in the org.ops4j.pax.web file and I am making the callout to port 8040 in POSTMan.

 

GET http://localhost:8090/{endpoint} call works in POSTMan - calling the job run from Studio

GET http://localhost:8040/{endpoint} does not work - calling the job deployed in ESB Runtime

 

Any idea what the issue could be?

Labels (3)
1 Reply
SHH2308
Contributor
Contributor
Author

Update: I believe that the issue is similar to the issue outlined in this post:

 

https://community.talend.com/s/feed/0D53p00007vCroYCAS?language=en_US

 

I can still get a response when running the job in studio, but can't after deploying to runtime. Tried with  http://localhost:8040/services/{endpoint} and got a 404 no service was found error.

 

When navigating to localhost:8040/services I don't see the service listed under available rest services.

 

I've tried using a relative URL in the tRestClient config and an absolute URL.

 

Any ideas?