syndesisio / syndesis-project

Placeholder repository for project management
https://syndesis.io/
Apache License 2.0
6 stars 12 forks source link

How to debug failures in integration startup #90

Closed jludvice closed 6 years ago

jludvice commented 7 years ago

I just created integration from twitter to salesforce and log from integration pod oc logs -f twitter-to-salesforce-e2e-1-x57pq gives me this output

08:53:31.457 [main] INFO  o.s.b.a.e.jmx.EndpointMBeanExporter - Located managed bean 'autoConfigurationReportEndpoint': registering with JMX server as MBean [org.springframework.boot:type=Endpoint,name=autoConfigurationReportEndpoint]
08:53:31.464 [main] INFO  o.s.b.a.e.jmx.EndpointMBeanExporter - Located managed bean 'configurationPropertiesReportEndpoint': registering with JMX server as MBean [org.springframework.boot:type=Endpoint,name=configurationPropertiesReportEndpoint]
08:53:31.496 [main] INFO  i.s.i.model.SyndesisHelpers - Loading SyndesisModel flows from URL: jar:file:/deployments/project-0.1-SNAPSHOT.jar!/BOOT-INF/classes!/syndesis.yml
08:53:31.826 [main] INFO  i.s.i.runtime.SyndesisRouteBuilder - FLOW flow1() twitter-mention => atlas:mapping-step-2.json => salesforce-upsert-contact
08:53:31.827 [main] INFO  o.a.c.spring.boot.RoutesCollector - Loading additional Camel XML routes from: classpath:camel/*.xml
08:53:31.828 [main] INFO  o.a.c.spring.boot.RoutesCollector - Loading additional Camel XML rests from: classpath:camel-rest/*.xml
08:53:31.829 [main] INFO  o.a.camel.spring.SpringCamelContext - Apache Camel 2.19.0 (CamelContext: Twitter to Salesforce E2E) is starting
08:53:31.831 [main] INFO  o.a.camel.spring.SpringCamelContext - StreamCaching is enabled on CamelContext: Twitter to Salesforce E2E
08:53:31.831 [main] INFO  o.a.c.m.ManagedManagementStrategy - JMX is enabled
08:53:32.004 [main] INFO  o.a.c.i.DefaultRuntimeEndpointRegistry - Runtime endpoint registry is in extended mode gathering usage statistics of all incoming and outgoing endpoints (cache limit: 1000)
08:53:32.145 [main] INFO  i.s.c.t.TwitterMentionComponent - Connector resolved: twitter-mention -> twitter:timeline/mentions?delay=30000
08:53:32.300 [main] INFO  org.eclipse.jetty.util.log - Logging initialized @36256ms to org.eclipse.jetty.util.log.Slf4jLog
08:53:32.303 [main] INFO  o.a.c.util.jsse.SSLContextParameters - Available providers: SUN version 1.8.
08:53:32.650 [main] INFO  o.a.c.c.s.internal.SalesforceSession - Login at Salesforce loginUrl: https://login.salesforce.com/services/oauth2/token
08:53:33.580 [main] INFO  o.a.camel.spring.SpringCamelContext - Apache Camel 2.19.0 (CamelContext: Twitter to Salesforce E2E) is shutting down
08:53:33.646 [main] INFO  o.a.camel.spring.SpringCamelContext - Apache Camel 2.19.0 (CamelContext: Twitter to Salesforce E2E) uptime 1.814 seconds
08:53:33.646 [main] INFO  o.a.camel.spring.SpringCamelContext - Apache Camel 2.19.0 (CamelContext: Twitter to Salesforce E2E) is shutdown in 0.063 seconds
08:53:33.675 [main] INFO  o.s.b.a.l.AutoConfigurationReportLoggingInitializer - 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
08:53:33.706 [main] ERROR o.s.boot.SpringApplication - Application startup failed
org.apache.camel.spring.boot.CamelSpringBootInitializationException: org.apache.camel.FailedToCreateRouteException: Failed to create route flow1 at: >>> To[salesforce-upsert-contact] <<< in route: Route(flow1)[[From[twitter-mention]] -> [To[atlas:mapping-st... because of Failed to resolve endpoint: salesforce-upsert-contact due to: {errors:[{"errorCode":"invalid_client_id","message":"Login error code:[invalid_client_id] description:[client identifier invalid]"}],statusCode:400}
    at org.apache.camel.spring.boot.RoutesCollector.onApplicationEvent(RoutesCollector.java:186)
    at org.apache.camel.spring.boot.RoutesCollector.onApplicationEvent(RoutesCollector.java:50)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:144)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
    at io.syndesis.example.Application.main(Application.java:13)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route flow1 at: >>> To[salesforce-upsert-contact] <<< in route: Route(flow1)[[From[twitter-mention]] -> [To[atlas:mapping-st... because of Failed to resolve endpoint: salesforce-upsert-contact due to: {errors:[{"errorCode":"invalid_client_id","message":"Login error code:[invalid_client_id] description:[client identifier invalid]"}],statusCode:400}
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1298)
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:204)
    at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:1041)
    at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3497)
    at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3228)
    at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:201)
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3046)
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3042)
    at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3065)
    at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3042)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2980)
    at org.apache.camel.spring.boot.RoutesCollector.maybeStart(RoutesCollector.java:203)
    at org.apache.camel.spring.boot.RoutesCollector.onApplicationEvent(RoutesCollector.java:178)
    ... 23 common frames omitted
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: salesforce-upsert-contact due to: {errors:[{"errorCode":"invalid_client_id","message":"Login error code:[invalid_client_id] description:[client identifier invalid]"}],statusCode:400}
    at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:678)
    at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:80)
    at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:219)
    at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112)
    at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:118)
    at org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:62)
    at org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:56)
    at org.apache.camel.model.ProcessorDefinition.makeProcessorImpl(ProcessorDefinition.java:549)
    at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:510)
    at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:226)
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1295)
    ... 36 common frames omitted
Caused by: org.apache.camel.component.salesforce.api.SalesforceException: {errors:[{"errorCode":"invalid_client_id","message":"Login error code:[invalid_client_id] description:[client identifier invalid]"}],statusCode:400}
    at org.apache.camel.component.salesforce.internal.SalesforceSession.parseLoginResponse(SalesforceSession.java:271)
    at org.apache.camel.component.salesforce.internal.SalesforceSession.login(SalesforceSession.java:129)
    at org.apache.camel.component.salesforce.internal.SalesforceSession.start(SalesforceSession.java:347)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)
    at org.apache.camel.component.salesforce.SalesforceComponent.doStart(SalesforceComponent.java:367)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)
    at org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:1316)
    at org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:1276)
    at org.apache.camel.component.connector.DefaultConnectorComponent.createNewBaseComponent(DefaultConnectorComponent.java:311)
    at org.apache.camel.component.connector.DefaultConnectorComponent.createEndpoint(DefaultConnectorComponent.java:86)
    at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:116)
    at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:663)
    ... 46 common frames omitted
08:53:33.716 [main] INFO  o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7a46a697: startup date [Mon Sep 04 08:53:19 UTC 2017]; root of context hierarchy
08:53:33.724 [main] INFO  o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 0
08:53:33.729 [main] INFO  o.s.b.a.e.jmx.EndpointMBeanExporter - Unregistering JMX-exposed beans on shutdown
08:53:33.731 [main] INFO  o.s.b.a.e.jmx.EndpointMBeanExporter - Unregistering JMX-exposed beans
08:53:33.732 [main] INFO  o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans on shutdown

How is user supposed to find out what went wrong ? Why is token incorrect ? Which value caused invalid_client_id error? Did I fill wrong token or did I fill it properly and it just didn't get into right place ?

zregvart commented 7 years ago

How is user supposed to find out what went wrong ?

I think the idea is to use health checks see syndesisio/syndesis-project#42

Why is token incorrect ? Which value caused invalid_client_id error?

The OAuth client id also known as consumer key, one of the two values set on settings page (the other one is secret)

Did I fill wrong token or did I fill it properly and it just didn't get into right place ?

Take a look at the k8s secrets that are used in the integration, they should correspond to the value from Salesforce settings

jludvice commented 7 years ago

I'm supposed to fill those tokens as a citizen user right @zregvart ? Am I as a citizen developer expected to know what is k8s secret and be able to find stored values from there ?

zregvart commented 7 years ago

I'm supposed to fill those tokens as a citizen user right @zregvart ?

I don't think so, the Settings tab is for administrative user, we could make that clearer in Global user settings story

Am I as a citizen developer expected to know what is k8s secret and be able to find stored values from there ?

I don't think so, the health checks should alert the citizen user that the integration is not running, thereon the citizen user could verify the connectivity on the connections being used in the integration, and failing that alert the administrator.

jludvice commented 7 years ago

Actually I can't do validation, because I get HTTP 500 :( validation

chirino commented 6 years ago

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its recipients. This is a temporary error. The following address(es) deferred:

chirino@gmail.com Domain hiramchirino.com has exceeded the max emails per hour (182/150 (121%)) allowed. Message will be reattempted later

------- This is a copy of the message, including all the headers. ------ Received: from o10.sgmail.github.com ([167.89.101.201]:41158) by host313.hostmonster.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from bounces+848413-18a6-hiram=hiramchirino.com@sgmail.github.com) id 1f0Nml-0013eX-Au for hiram@hiramchirino.com; Mon, 26 Mar 2018 02:47:23 -0600 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com; h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=b3sAWB9a2ceJCXcp7iDH2TuH68U=; b=w3RuaghzIt/+2f/G k+Ztjwe+VQN6AR3WOIoJZbqwzt+5mbivjPMmTc7uiKaTMpD2JrV/Ve08Z8nErxKW sdT1ApqLoqO7asBQBRmqvwfHDi2OLGM85IC/7Yv5dAKi8BGLegv32skR+yjkxyKi NB5Bz9POl/s6nnYBlwUimRyNw7w= Received: by filter0382p1iad2.sendgrid.net with SMTP id filter0382p1iad2-12829-5AB8B390-3 2018-03-26 08:47:12.183355557 +0000 UTC Received: from smtp.github.com (out-2.smtp.github.com [192.30.252.193]) by ismtpd0002p1iad1.sendgrid.net (SG) with ESMTP id EHEB9gDRThKPagg8L1kC2A for hiram@hiramchirino.com; Mon, 26 Mar 2018 08:47:12.075 +0000 (UTC) Date: Mon, 26 Mar 2018 08:47:12 +0000 (UTC) From: Zoran Regvart notifications@github.com Reply-To: syndesisio/syndesis-project reply@reply.github.com To: syndesisio/syndesis-project syndesis-project@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Message-ID: syndesisio/syndesis-project/issue/90/issue_event/1540317574@github.com In-Reply-To: syndesisio/syndesis-project/issues/90@github.com References: syndesisio/syndesis-project/issues/90@github.com Subject: Re: [syndesisio/syndesis-project] How to debug failures in integration startup (#90) Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--==_mimepart_5ab8b38ff2d8a_19fc3f8b57bc2f3816033"; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: list X-GitHub-Sender: zregvart X-GitHub-Recipient: chirino X-GitHub-Reason: subscribed List-ID: syndesisio/syndesis-project List-Archive: https://github.com/syndesisio/syndesis-project List-Post: mailto:reply@reply.github.com List-Unsubscribe: mailto:unsub+00019357e38aa08332dc88b96356956d43150b825790ca5e92cf0000000116d0758f92a169ce0f32a471@reply.github.com, https://github.com/notifications/unsubscribe/AAGTVyRHBAdKah42P5uUpz2WyC8O6PG5ks5tiKsPgaJpZM4PLo2F X-Auto-Response-Suppress: All X-GitHub-Recipient-Address: hiram@hiramchirino.com X-SG-EID: r3yY3NeKU5c391Z9JqIJsAQ+rIWE1mJvBRhY4sfmQMtH2BghuA8qC05u5oskZTZIW05T8z+CKS1oHj uZ3OchH6TMWUKA+tSrfaKXLi/YMqzHjBXkpUFcgclwe/rPt/ib2ULQ2hsDoMy18Q6JIE6JeM1LTQ1H FwM1F/rJNBAOs1ChjTZQYlCewgsXMYNdNNPaVv19WfLfvgi3UdxYhiaXc7Mt/JCsTBYp1p/a/enWVh c=

----==_mimepart_5ab8b38ff2d8a_19fc3f8b57bc2f3816033 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit

Closed #90.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/syndesisio/syndesis-project/issues/90#event-1540317574 ----==_mimepart_5ab8b38ff2d8a_19fc3f8b57bc2f3816033 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Closed #90.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

----==_mimepart_5ab8b38ff2d8a_19fc3f8b57bc2f3816033--