You are not logged in.

Unanswered posts



Important! This site has been replaced. All content here is read-only. Please visit our brand-new community at https://community.talend.com/. We look forward to hearing from you there!



#1 2016-06-10 14:46:04

userTalend123
Member
4 posts

userTalend123 said:

Problem associated with Service Locator.

Tags: [development]

I use Service Locator in tRESTRequest component. I placed a screenshot in the annex.



Logs indicate that the  has been registered

13:28:26,962 | INFO  | pool-35-thread-1 | locator.monitor.LocatorMonitor$1  158 | 263 - locator-monitor - 6.1.1 | Endpoint for Service {}TEST_SERVICE with Address  is alive since Jun 10, 2016 1:28:18 PM
13:28:26,962 | INFO  | pool-35-thread-1 | locator.monitor.LocatorMonitor$1  171 | 263 - locator-monitor - 6.1.1 | 1 endpoints are registered for service {}TEST_SERVICE
13:28:26,963 | INFO  | pool-35-thread-1 | locator.monitor.LocatorMonitor$1  175 | 263 - locator-monitor - 6.1.1 | 1 endpoints are active for service {}TEST_SERVICE
13:28:26,963 | INFO  | pool-35-thread-1 | locator.monitor.LocatorMonitor$1  183 | 263 - locator-monitor - 6.1.1 | 0 endpoints are offline for service {}TEST_SERVICE


but, when I execute the following query using Postman:

<soapenv:Envelope xmlns:soapenv="" xmlns:ns="">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:lookupEndpoints>
         <ns:serviceName xmlns="">TEST_SERVICE</ns:serviceName>
         <!--Optional:-->
         <ns:matcherData>
            <!--Zero or more repetitions:-->
            <ns:Entry key="?">
               <ns:Value>?</ns:Value>
            </ns:Entry>
         </ns:matcherData>
      </ns:lookupEndpoints>
   </soapenv:Body>
</soapenv:Envelope>

I receive the following reply:

<soap:Envelope xmlns:soap="">
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>Can not find Endpoint</faultstring>
            <detail>
                <ServiceLocatorFaultDetail xmlns:ns2="" xmlns="">
                    <LocatorFaultDetail>lookup Endpoint for {}TEST_SERVICE failed, service is not known.</LocatorFaultDetail>
                </ServiceLocatorFaultDetail>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>


and in logs:

13:31:43,056 | INFO  | pool-35-thread-1 | locator.monitor.LocatorMonitor$1  208 | 263 - locator-monitor - 6.1.1 | 23 endpoints are registered at the ServiceLocator
13:31:43,056 | INFO  | pool-35-thread-1 | locator.monitor.LocatorMonitor$1  212 | 263 - locator-monitor - 6.1.1 | 23 endpoints are available and currently registeredat the ServiceLocator
13:31:43,056 | INFO  | pool-35-thread-1 | locator.monitor.LocatorMonitor$1  216 | 263 - locator-monitor - 6.1.1 | 0 endpoints are currently registered at the ServiceLocator but are not available
13:31:48,662 | WARN  | tp1433601954-391 | r.service.LocatorSoapServiceImpl  384 | 266 - locator-soap-service - 6.1.1 | lookup Endpoints for {}TEST_SERVICE failed, service is not known.
13:31:48,663 | INFO  | tp1433601954-391 | ache.cxf.common.logging.LogUtils  449 | 86 - org.apache.cxf.cxf-core - 3.1.4 | Application {}ServiceLocatorProvider#{}lookupEndpoints has thrown exception, unwinding now: org.talend.services.esb.locator.v1.ServiceLocatorFault: Can not find Endpoint

Offline

#2 2016-06-17 08:00:50

xdshi
Talend Team


xdshi said:

Re: Problem associated with Service Locator.

Hi,
Could you please post your tRESTRequest component setting screenshot into forum? What does your job look like?
Best regards
Sabrina


What we can do is to make sure that Talend will be your best choice!

Offline

#3 2016-06-22 15:49:51

kszewczyk
Member
1 post

kszewczyk said:

Re: Problem associated with Service Locator.

Hi,
I have similar problem in Talend 6.1.1 and build-in zookeeper.

I have service as in below image:
talend1.png.png
Works fine - returns what has been sent.

After deploy on server I have logs:

15:32:53,172 | INFO  | ntainer1//deploy | t.jmx.InstrumentationManagerImpl  330 | 115 - org.apache.cxf.cxf-rt-management - 3.1.4 | registering MBean org.apache.cxf:bus.id=project.TestJob-cxf223828038,type=Bus.Service.Endpoint,service="{http://www.talend.org/rest/}TestJob",port="TestJob",instance.id=1653883311: org.apache.cxf.endpoint.ManagedEndpoint@2a1efbb3
15:32:53,175 | INFO  | ntainer1//deploy | t.jmx.InstrumentationManagerImpl  330 | 115 - org.apache.cxf.cxf-rt-management - 3.1.4 | registering MBean org.apache.cxf:bus.id=project.TestJob-cxf223828038,type=Bus.Service.Endpoint,service="{http://www.talend.org/rest/}TestJob",port="TestJob",instance.id=1653883311: javax.management.modelmbean.RequiredModelMBean@11d53697
15:32:53,281 | WARN  | ntainer1//deploy | y.server.handler.AbstractHandler   60 | 208 - org.eclipse.jetty.util - 9.2.10.v20150310 | No Server set for org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine$1@75f6a74a
15:32:53,315 | WARN  | ntainer1//deploy | ty.server.handler.ContextHandler 1350 | 208 - org.eclipse.jetty.util - 9.2.10.v20150310 | Empty contextPath
15:32:53,327 | INFO  | ntainer1//deploy | r.internal.JobTracker$Customizer  106 | 241 - org.talend.esb.job.controller - 6.1.1 | Service with reference {routines.system.api.TalendJob}={osgi.service.blueprint.compname=job, name=TestJob, type=job, service.id=377, service.bundleid=331, service.scope=bundle} added
15:32:53,327 | INFO  | ntainer1//deploy | troller.internal.JobLauncherImpl  149 | 241 - org.talend.esb.job.controller - 6.1.1 | Adding job TestJob.
15:32:53,349 | INFO  | ool-36-thread-13 | internal.SimpleJobTask$JobRunner   69 | 241 - org.talend.esb.job.controller - 6.1.1 | Starting job TestJob
15:32:53,355 | INFO  | ntainer1//deploy | ?                                   ? | 8 - org.apache.felix.fileinstall - 3.5.0 | Started bundle: file:/home/talend/Runtime_ESBSE_6.1/container1/deploy/TestJob-0.1-112.jar
15:32:58,201 | INFO  | pool-35-thread-1 | locator.monitor.LocatorMonitor$1  158 | 282 - locator-monitor - 6.1.1 | Endpoint for Service {http://www.talend.org/rest/}TestJob with Address http://192.168.128.112:8061/ is alive since Jun 22, 2016 3:32:53 PM
15:32:58,201 | INFO  | pool-35-thread-1 | locator.monitor.LocatorMonitor$1  171 | 282 - locator-monitor - 6.1.1 | 1 endpoints are registered for service {http://www.talend.org/rest/}TestJob
15:32:58,201 | INFO  | pool-35-thread-1 | locator.monitor.LocatorMonitor$1  175 | 282 - locator-monitor - 6.1.1 | 1 endpoints are active for service {http://www.talend.org/rest/}TestJob
15:32:58,201 | INFO  | pool-35-thread-1 | locator.monitor.LocatorMonitor$1  183 | 282 - locator-monitor - 6.1.1 | 0 endpoints are offline for service {http://www.talend.org/rest/}TestJob

So in service locator has been registered service {http://www.talend.org/rest/}TestJob.
But when I ask about service:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://talend.org/schemas/esb/locator/2011/11">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:lookupEndpoints>
         <ns:serviceName xmlns:ns4="http://www.talend.org/rest/">ns4:TestJob</ns:serviceName>
         <!--Optional:-->
         <ns:matcherData>
            <!--Zero or more repetitions:-->
            <ns:Entry key="?">
               <ns:Value>?</ns:Value>
            </ns:Entry>
         </ns:matcherData>
      </ns:lookupEndpoints>
   </soapenv:Body>
</soapenv:Envelope>

Response is:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>Can not find Endpoint</faultstring>
            <detail>
                <ServiceLocatorFaultDetail xmlns:ns2="http://www.w3.org/2005/08/addressing" xmlns="http://talend.org/schemas/esb/locator/2011/11">
                    <LocatorFaultDetail>lookup Endpoint for {http://www.talend.org/rest/}TestJob failed, service is not known.</LocatorFaultDetail>
                </ServiceLocatorFaultDetail>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

And in logs I have:

15:38:24,943 | WARN  | tp1904227616-116 | r.service.LocatorSoapServiceImpl  384 | 284 - locator-soap-service - 6.1.1 | lookup Endpoints for {http://www.talend.org/rest/}TestJob failed, service is not known.
15:38:24,944 | INFO  | tp1904227616-116 | ache.cxf.common.logging.LogUtils  449 | 97 - org.apache.cxf.cxf-core - 3.1.4 | Application {http://services.talend.org/ServiceLocatorService}ServiceLocatorProvider#{http://www.talend.org/services/esb/locator/v1}lookupEndpoints has thrown exception, unwinding now: org.talend.services.esb.locator.v1.ServiceLocatorFault: Can not find Endpoint

What am I doing wrong?

Below screen from Postman:
talend2.png_20160622-0810.png
However I've tried call it xml:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://talend.org/schemas/esb/locator/2011/11">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:lookupEndpoints>
         <ns:serviceName xmlns="http://www.talend.org/rest/">TestJob</ns:serviceName>
         <!--Optional:-->
         <ns:matcherData>
            <!--Zero or more repetitions:-->
            <ns:Entry key="?">
               <ns:Value>?</ns:Value>
            </ns:Entry>
         </ns:matcherData>
      </ns:lookupEndpoints>
   </soapenv:Body>
</soapenv:Envelope>

But response is the same.

Last edited by kszewczyk (2016-06-22 16:23:22)

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy