siddhi-io/distribution

Exception occurs in the Siddhi-Editor while sending events

sahandilshan opened this issue · 0 comments

Description:
Exception throws while sending events with the siddhi editor when the editor is opened with the remote debugging mode. Some time that exception occurs even without the remote debugging mode.

Error Log:

[2019-10-31 11:21:05,600] ERROR {io.siddhi.distribution.editor.core.internal.DebuggerEventStreamService} - Error when pushing events to Siddhi debugger engine java.lang.InterruptedException: Siddhi app 'SiddhiApp' is not running, cannot send event.
	at io.siddhi.core.stream.input.InputHandler.send(InputHandler.java:80)
	at io.siddhi.distribution.editor.core.internal.DebuggerEventStreamService.pushEvent(DebuggerEventStreamService.java:74)
	at io.siddhi.distribution.event.simulator.core.internal.generator.SingleEventGenerator.sendEvent(SingleEventGenerator.java:85)
	at io.siddhi.distribution.event.simulator.core.impl.SingleApiServiceImpl.runSingleSimulation(SingleApiServiceImpl.java:20)
	at io.siddhi.distribution.event.simulator.core.api.SingleApi.runSingleSimulation(SingleApi.java:72)
	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.wso2.msf4j.internal.router.HttpMethodInfo.invokeResource(HttpMethodInfo.java:187)
	at org.wso2.msf4j.internal.router.HttpMethodInfo.invoke(HttpMethodInfo.java:143)
	at org.wso2.msf4j.internal.MSF4JHttpConnectorListener.dispatchMethod(MSF4JHttpConnectorListener.java:218)
	at org.wso2.msf4j.internal.MSF4JHttpConnectorListener.lambda$onMessage$58(MSF4JHttpConnectorListener.java:129)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Steps to reproduce:
Put debug points on following lines under siddhi-io-s3
ServiceClient.java

  • line no 108 SdkHttpClient httpClient = ApacheHttpClient.builder().build();
  • line no 119 if (config.getCredentialProviderClass() != null) {

SinkConfig.java

  • line no 79 String regionName = optionHolder.validateAndGetStaticVa...
    Run following app on siddhi editor with the remote debuging mode.
@App:name("SiddhiApp")

@App:description("Description of the plan")

-- Please refer to https://siddhi.io/en/v5.1/docs/quick-start/ on getting started with Siddhi editor. 
define window BarWindow(name string, age int) lengthBatch(3) output all events;

@source(type='http',receiver.url = 'http://localhost:8006/TempStream', @map(type='json')) 
define stream FooStream(name string, age int);

@sink(type='s3', bucket.name='test-siddhi-io-s3',object.path='bar/users',  flush.size='3',
    @map(type='json', enclosing.element='$.user', 
        @payload("""{"name": "{{name}}", "age": {{age}}}"""))) 
define stream BarStream(name string, age int);  

from FooStream insert into BarWindow;
from BarWindow select name, age insert into BarStream;