Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1304: fix the saga example to use default ports #1315

Merged
merged 2 commits into from Mar 17, 2020

Conversation

nicolaferraro
Copy link
Member

Fix #1304

I've changed the saga example to use default ports and unified kube and oc configuration. I've managed to run it with this config.

cc: @sobkowiak

Release Note

NONE

@sobkowiak
Copy link
Member

@nicolaferraro great!!! I'll check it in the evening

@sobkowiak
Copy link
Member

sobkowiak commented Mar 2, 2020

I have following error in the saga integration

[1] 2020-03-02 22:33:41.629 INFO  [default-workqueue-2] route1 - Executing saga #1                                                                                                                                                                                              
[1] 2020-03-02 22:33:41.671 ERROR [XNIO-1 I/O-1] DefaultErrorHandler - Failed delivery for (MessageId: ID-saga-59465cb6c5-vc7tp-1583188421428-0-2 on ExchangeId: ID-saga-59465cb6c5-vc7tp-1583188421428-0-1). Exhausted after delivery attempt: 1 caught: org.apache.camel.http.
common.HttpOperationFailedException: HTTP operation failed invoking http://train/api/train/buy/seat with statusCode: 404                                                                                                                                                        
[1]                                                                                                                                                                                                                                                                             
[1] Message History                                                 
[1] ---------------------------------------------------------------------------------------------------------------------------------------                                                                                                                                     
[1] RouteId              ProcessorId          Processor                                                                        Elapsed (ms)                                                                                                                                     
[1] [route1            ] [route1            ] [from[timer://clock?period=5s]                                                 ] [       244]                                                                                                                                     
[1] [route1            ] [output1           ] [saga                                                                          ] [         0]                                                                                                                                     
[1] [route1            ] [setHeader1        ] [setHeader[id]                                                                 ] [         1]                                                                                                                                     
[1] [route1            ] [setHeader2        ] [setHeader[CamelHttpMethod]                                                    ] [         0]                                                                                                                                     
[1] [route1            ] [log1              ] [log                                                                           ] [         0]                                                                                                                                     
[1] [route1            ] [to1               ] [undertow:http://train/api/train/buy/seat                                      ] [         0]                                                                                                                                     
[1]                                                                 
[1] Stacktrace                                                      
[1] ---------------------------------------------------------------------------------------------------------------------------------------                                                                                                                                     
[1] org.apache.camel.http.common.HttpOperationFailedException: HTTP operation failed invoking http://train/api/train/buy/seat with statusCode: 404                                                                                                                              
[1]     at org.apache.camel.component.undertow.UndertowClientCallback.lambda$setupResponseListener$2(UndertowClientCallback.java:235) ~[org.apache.camel.camel-undertow-3.0.1.jar:3.0.1]
[1]     at org.apache.camel.component.undertow.UndertowClientCallback$ErrorHandlingClientCallback.completed(UndertowClientCallback.java:85) [org.apache.camel.camel-undertow-3.0.1.jar:3.0.1]
[1]     at io.undertow.client.http.HttpClientExchange.setResponse(HttpClientExchange.java:125) [io.undertow.undertow-core-2.0.28.Final.jar:2.0.28.Final]
[1]     at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:650) [io.undertow.undertow-core-2.0.28.Final.jar:2.0.28.Final]
[1]     at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:516) [io.undertow.undertow-core-2.0.28.Final.jar:2.0.28.Final]
[1]     at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [org.jboss.xnio.xnio-api-3.3.8.Final.jar:3.3.8.Final]                                                                                                                                      
[1]     at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) [org.jboss.xnio.xnio-api-3.3.8.Final.jar:3.3.8.Final]
[1]     at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88) [org.jboss.xnio.xnio-nio-3.3.8.Final.jar:3.3.8.Final]                                                                                                                                            
[1]     at org.xnio.nio.WorkerThread.run(WorkerThread.java:561) [org.jboss.xnio.xnio-nio-3.3.8.Final.jar:3.3.8.Final]                                                                                                                                                           
[1] 2020-03-02 22:33:41.718 WARN  [default-workqueue-3] TimerConsumer - Error processing exchange. Exchange[ID-saga-59465cb6c5-vc7tp-1583188421428-0-1]. Caused by: [org.apache.camel.http.common.HttpOperationFailedException - HTTP operation failed invoking http://train/api
/train/buy/seat with statusCode: 404]

I think something can be wrong with the Istio cluster-local-gateway. The train service is an external name of the local gateway service. Saga can connect the service but it can't find the rest service. Maybe the local gateway doesn't pass through the request to the train pod. Trying to call the train service with curl from the saga pod end with 404 too.

@nicolaferraro
Copy link
Member Author

Improved it to work on OpenShift, but definitely not able to run it on a Knative installation.

The promise of Istio is to allow services to communicate transparently, but this does not seem to be the case.

I'd merge it, but it requires changes to run on Knative.

@sobkowiak
Copy link
Member

It seems to be a problem in Istio local gateway. I think I saw another post in camel-k gitter about problem with communicating knative service via the local gateway.

@nicolaferraro nicolaferraro merged commit 8594c91 into apache:master Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to run saga sample
3 participants