05-29-2020 08:31 PM
Snap was aborted
Hide Details…
Script[5d35a4b567ad1a03d5af51a6_8067c2d5-703e-432b-a5aa-3dfe73595b42 – 99f07565-a279-430f-9660-184162b1c909]
com.snaplogic.cc.snap.common.ThreadDetails: Waiting to receive data from s3.amazonaws.com/XX.XXX.XX.XX:XXX
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at com.snaplogic.instrument.TracingInputStream.read(TracingInputStream.java:88)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:940)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:161)
at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:82)
at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:276)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:294)
at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:257)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:207)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:679)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:481)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.snaplogic.util.HttpUtils.executeRequest(HttpUtils.java:67)
at com.snaplogic.common.url.protocol.sldb.SldbUrlConnection.getSlfsFile(SldbUrlConnection.java:449)
at com.snaplogic.common.url.protocol.sldb.SldbUrlConnection.lambda$getInputStream$2(SldbUrlConnection.java:438)
at com.snaplogic.common.url.protocol.sldb.SldbUrlConnection$$Lambda$176/718525149.call(Unknown Source)
at net.jodah.failsafe.SyncFailsafe.call(SyncFailsafe.java:145)
at net.jodah.failsafe.SyncFailsafe.get(SyncFailsafe.java:56)
at com.snaplogic.common.url.protocol.sldb.SldbUrlConnection.doRequest(SldbUrlConnection.java:545)
at com.snaplogic.common.url.protocol.sldb.SldbUrlConnection.getInputStream(SldbUrlConnection.java:427)
at java.net.URL.openStream(URL.java:1045)
at com.snaplogic.scripting.language.ScriptExecutorImpl.getScriptInputStream(ScriptExecutorImpl.java:149)
at com.snaplogic.scripting.language.ScriptExecutorImpl.loadHookFor(ScriptExecutorImpl.java:85)
at com.snaplogic.snaps.script.BinaryExecuteScript.createScriptHookFor(BinaryExecuteScript.java:146)
at com.snaplogic.snaps.script.CommonExecute.execute(CommonExecute.java:121)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.executeSnap(SnapRunnableImpl.java:768)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.execute(SnapRunnableImpl.java:550)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.doRun(SnapRunnableImpl.java:834)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:400)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:116)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
Error Fingerprint[0] = efp:java.net._gJ9MJ0I
01-05-2021 09:15 AM
Iam having similar issue when using script to just hold snap for sometime using below python script time.sleep:
Import the interface required by the Script snap.
from com.snaplogic.scripting.language import ScriptHook
import time
class TransformScript(ScriptHook):
def init(self, input, output, error, log):
self.input = input
self.output = output
self.error = error
self.log = log
# The "execute()" method is called once when the pipeline is started
# and allowed to process its inputs or just send data to its outputs.
def execute(self):
self.log.info("Executing Transform script")
while self.input.hasNext():
try:
# Read the next input document, store it in a new dictionary, and write this as an output document.
**time.sleep(1000)**
inDoc = self.input.next()
outDoc = {
'original' : inDoc
}
self.output.write(inDoc, outDoc)
except Exception as e:
errDoc = {
'error' : str(e)
}
self.log.error("Error in python script")
self.error.write(errDoc)
self.log.info("Script executed")
# The "cleanup()" method is called after the snap has exited the execute() method
def cleanup(self):
self.log.info("Cleaning up")
hook = TransformScript(input, output, error, log)
ERROR:
Snap was aborted
Hide Details…
Script[5b4c5f504f619d3b40a380bf_85ddd35d-6fad-4333-88f9-e99472a24362 – e36724a0-b3b6-4523-8c0a-6f325c393b16]
`com.snaplogic.cc.snap.common.ThreadDetails: prio=4 Id=38901 TIMED_WAITING
at java.base@11.0.5/java.lang.Thread.sleep(Native Method)
at org.python.modules.time.Time.sleep(Time.java:472)
at jdk.internal.reflect.GeneratedMethodAccessor247.invoke(Unknown Source)
at java.base@11.0.5/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base@11.0.5/java.lang.reflect.Method.invoke(Method.java:566)
at org.python.core.PyReflectedFunction.call(PyReflectedFunction.java:190)
at org.python.core.PyReflectedFunction.call(PyReflectedFunction.java:208)
at org.python.core.PyObject.call(PyObject.java:461)
…
at java.base@11.0.5/java.lang.Thread.sleep(Native Method)
at org.python.modules.time.Time.sleep(Time.java:472)
at jdk.internal.reflect.GeneratedMethodAccessor247.invoke(Unknown Source)
at java.base@11.0.5/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base@11.0.5/java.lang.reflect.Method.invoke(Method.java:566)
at org.python.core.PyReflectedFunction.call(PyReflectedFunction.java:190)
at org.python.core.PyReflectedFunction.call(PyReflectedFunction.java:208)
at org.python.core.PyObject.call(PyObject.java:461)
at org.python.core.PyObject.call(PyObject.java:465)
at org.python.pycode.pyx172.execute$3(:31)
at org.python.pycode.pyx172.call_function()
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyBaseCode.call(PyBaseCode.java:306)
at org.python.core.PyBaseCode.call(PyBaseCode.java:197)
at org.python.core.PyFunction.call(PyFunction.java:485)
at org.python.core.PyMethod.instancemethod___call(PyMethod.java:237)
at org.python.core.PyMethod.call(PyMethod.java:228)
at org.python.core.PyMethod.call(PyMethod.java:218)
at org.python.core.PyMethod.call(PyMethod.java:213)
at org.python.core.PyObject._jcallexc(PyObject.java:3565)
at org.python.core.PyObject._jcall(PyObject.java:3598)
at org.python.proxies.builtin$TransformScript$172.execute(Unknown Source)
at com.snaplogic.snaps.script.CommonExecute.execute(CommonExecute.java:123)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.executeSnap(SnapRunnableImpl.java:770)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.execute(SnapRunnableImpl.java:552)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.doRun(SnapRunnableImpl.java:836)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:402)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:116)
at java.base@11.0.5/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base@11.0.5/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base@11.0.5/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base@11.0.5/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base@11.0.5/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base@11.0.5/java.lang.Thread.run(Thread.java:834)
Error Fingerprint[0] = efp:java.lang.4yCCeq43`
Script[5b4c5f504f619d3b40a380bf_85ddd35d-6fad-4333-88f9-e99472a24362 – e36724a0-b3b6-4523-8c0a-6f325c393b16]
`com.snaplogic.cc.snap.common.ThreadDetails: prio=4 Id=38901 RUNNABLE
at org.python.core.PyBaseCode.getline(PyBaseCode.java:319)
at org.python.core.PyTraceback.(PyTraceback.java:29)
at org.python.core.PyException.tracebackHere(PyException.java:171)
at org.python.core.PyException.tracebackHere(PyException.java:158)
at org.python.core.Py.setException(Py.java:1619)
at org.python.pycode._pyx172.execute$3(:31)
at org.python.pycode._pyx172.call_function()
at org.python.core.PyTableCode.call(PyTableCode.java:173)
…
at org.python.core.PyBaseCode.getline(PyBaseCode.java:319)
at org.python.core.PyTraceback.(PyTraceback.java:29)
at org.python.core.PyException.tracebackHere(PyException.java:171)
at org.python.core.PyException.tracebackHere(PyException.java:158)
at org.python.core.Py.setException(Py.java:1619)
at org.python.pycode.pyx172.execute$3(:31)
at org.python.pycode.pyx172.call_function()
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyBaseCode.call(PyBaseCode.java:306)
at org.python.core.PyBaseCode.call(PyBaseCode.java:197)
at org.python.core.PyFunction.call(PyFunction.java:485)
at org.python.core.PyMethod.instancemethod___call(PyMethod.java:237)
at org.python.core.PyMethod.call(PyMethod.java:228)
at org.python.core.PyMethod.call(PyMethod.java:218)
at org.python.core.PyMethod.call(PyMethod.java:213)
at org.python.core.PyObject._jcallexc(PyObject.java:3565)
at org.python.core.PyObject._jcall(PyObject.java:3598)
at org.python.proxies.builtin$TransformScript$172.execute(Unknown Source)
at com.snaplogic.snaps.script.CommonExecute.execute(CommonExecute.java:123)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.executeSnap(SnapRunnableImpl.java:770)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.execute(SnapRunnableImpl.java:552)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.doRun(SnapRunnableImpl.java:836)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:402)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:116)
at java.base@11.0.5/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base@11.0.5/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base@11.0.5/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base@11.0.5/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base@11.0.5/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base@11.0.5/java.lang.Thread.run(Thread.java:834)
Error Fingerprint[0] = efp:org.python.core.WHDYXyoj`
01-05-2021 03:49 PM
@amar - I think in your case its timing out.
time.sleep(5) – It takes seconds as Parameter. 1000sec == 16mins. set a different parameter and check. community_2021_01_05.slp (6.1 KB)
01-05-2021 04:02 PM
Will it be an issue if i give 1000seconds because i need to wait minimum 20min to complete previous snap and move to next snap. It worked fine when i add time.sleep(500)