Six Stars

Cannot access deployed service from Runtime

I built the Employee service as found in Building a simple REST service and am able to run it in Studio.  First, when I run the job, it does not display anything about where it is being hosted, etc. -- see below:

no-hosting-info.png

 

However, using the info from the example, I can successfully access the service -- see below:

service-works.png

 

I was then able to successfully deploy the job to my runtime using Deploying the REST service, section Local deployment (Talend Open Studio for ESB) -- see below:

 

karaf@trun()> list | grep Employee

344 │ Active     80 │ 0.1                   EmployeeRestService

 

But I can't figure out by what address to access it.  The URL listed in the deployment tutorial (http://localhost:8040/services/services/employees) does not work.  I tried the same URL as used when running from Studio and that does not work.

1 ACCEPTED SOLUTION

Accepted Solutions
Six Stars

Re: Cannot access deployed service from Runtime

Well, not sure why it wasn't working yesterday as listed in the tutorial, but it is working today.  I was successful running it from port 8090 within Studio (http://localhost:8090/demo/employees) and then deploying to "container" in the Runtime and accessing the service (http://localhost:8040/services/demo/employees).

2 REPLIES
Six Stars

Re: Cannot access deployed service from Runtime

I was able to resolve this by specifying a specific URL.  By setting the endpoint to "http://localhost:8040/services" in the job and then deploying it to Runtime, I was able to then access the service from that same URL via the Runtime.

 

However, it isn't clear:

  1. Why the URL generated and used when running the job in Studio doesn't also work when deployed to Runtime, nor does the deployment indicate upon what port the job is hosted.
  2. Why Studio doesn't display the info about where it is hosted when using a generic name; e.g., "/services"
Six Stars

Re: Cannot access deployed service from Runtime

Well, not sure why it wasn't working yesterday as listed in the tutorial, but it is working today.  I was successful running it from port 8090 within Studio (http://localhost:8090/demo/employees) and then deploying to "container" in the Runtime and accessing the service (http://localhost:8040/services/demo/employees).