I am not able to access rest service port if I am not using localhost. When I try to access it from another computer I get connection refused to that port. What am I doing wrong? I built the job and deployed it in the container. I tried using port 8040 but I always get an error that it is in use so I went back to using port 8088. I have turned off all firewalls.
Hi If you access the webservices from another machine, you should use the IP address instead of localhost in the url. You can test whether you are able to access that machine with the below command in a command prompt:
D:/>telnet IP port
Best regards Shong
---------------------------------------------------------- Talend | Data Agility for Modern Business
hi Chris Can you include a snapshot showing your REST endpoint configuration in Studio as well as the job as a whole. Am I correct that this is a data service published in Integration perspective, or is it a route created in Mediation perspective? Also, please include a little bit more detail on exactly how you are testing it. I am assuming that you are just using a browser and basic get, or perhaps you are doing a post with a tool like Postman also from a browser. What is the exact value that you are using for the REST Endpoint property of the tRESTrequest in each your test configurations? I am assuming that if your service is called myService then the value of the REST Endpoint property in Studio is just "/myService" and that by default it being published (when run from Studio) on http://localhost:8090/myService. Note that the 8090 port is determine in this case by the Preferences under Talend->ESB->Service-REST where the default value shows http://127.0.0.1:8090. So in general you should not be specifying the port for your REST service in the integration route itself unless you are trying to avoid a conflict with other services you are running at the same time from Studio. If you deploy this same route to the actual container (either through Publish to Nexus or just hot-deploy of an OSGI bundle for ESB) it will be available on port 8040. This setting is controlled by the ESB configuration in the etc/org.ops4j.pax.web.cfg. So with the same "/myService" example, when you deploy it to the runtime it will be available on localhost:8040/services/myService. Note that not only has the port changed to 8040, but the path has changed as well to have services element. You can see all services deployed on your runtime by browsing localhost:8040/services. you should see your service there. When you say you get an error that says that the port is in use, where and when do you get that error? Is it when you deploy to the container or when you test it. Are you deploying to Nexus via Publish from the Studio, or just deploying via Build Route to the hot deploy folder?