I use ReadNodeExample class to try to get node info of Kepware UA server. Everything is fine but the BuildInfo, and I get the following exception:
19:00:32.723 [main] ERROR ClientExampleRunner - Error running client example: UaException: status=Bad_NotFound, message=A requested item was not found or a search operation ended without success.
java.util.concurrent.ExecutionException: UaException: status=Bad_NotFound, message=A requested item was not found or a search operation ended without success.
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at ReadNodeExample.run(ReadNodeExample.java:52)
at ClientExampleRunner.run(ClientExampleRunner.java:88)
at ReadNodeExample.main(ReadNodeExample.java:22)
Caused by: org.eclipse.milo.opcua.stack.core.UaException: status=Bad_NotFound, description=A requested item was not found or a search operation ended without success.
at org.eclipse.milo.opcua.stack.core.util.FutureUtils.failedUaFuture(FutureUtils.java:99)
at org.eclipse.milo.opcua.stack.core.util.FutureUtils.failedUaFuture(FutureUtils.java:87)
at org.eclipse.milo.opcua.sdk.client.nodes.UaVariableNode.lambda$getTypeDefinition$6(UaVariableNode.java:114)
at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:952)
at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:926)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
at org.eclipse.milo.opcua.stack.client.UaTcpStackClient.lambda$receiveResponse$13(UaTcpStackClient.java:294)
at org.eclipse.milo.opcua.stack.core.util.ExecutionQueue$PollAndExecute.run(ExecutionQueue.java:107)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
And here's the result of full serverStatus:
19:00:31.549 [main] INFO ReadNodeExample - ServerStatus=ServerStatusDataType{StartTime=DateTime{utcTime=131455372857187500, javaDate=Wed Jul 26 18:08:05 CST 2017}, CurrentTime=DateTime{utcTime=131455404299062500, javaDate=Wed Jul 26 19:00:29 CST 2017}, State=Running, BuildInfo=BuildInfo{ProductUri=urn:WIN-S8JCN9R7PFA:Kepware.KEPServerEX.V6:UA%20Server, ManufacturerName=Kepware, ProductName=KEPServerEX, SoftwareVersion=6.2, BuildNumber=460, BuildDate=DateTime{utcTime=131433109160000000, javaDate=Fri Jun 30 23:41:56 CST 2017}}, SecondsTillShutdown=0, ShutdownReason=LocalizedText{text=null, locale=null}}
I'm not very sure whether the problem is due to Kepware or milo client itself.
It's a bit complicated, but the problem is that Kepware's BuildInfo node doesn't have its required HasTypeDefinition reference pointing to the BuildInfoType VariableType.
Related
We are reading new or updated files for every 1 minute on SFTP server using SFTP
<sftp:listener doc:name="On New or Updated File" config-ref="SFTP_Config" directory="abc/in" timeBetweenSizeCheck="2000" autoDelete="true" timeBetweenSizeCheckUnit="MILLISECONDS">
<reconnect-forever frequency="60000" />
<scheduling-strategy >
<fixed-frequency frequency="60000"/>
</scheduling-strategy>
</sftp:listener>
Sometimes when sftp server is down it is trying to reconnect, as we given reconnect forever its keep on trying. Even after SFTP server is back online again, its not able to read files.
I even tried giving reconnection attempts as 2, it was trying for 2 times and throwing error as pipe is closed. When SFTP server is online again, even though there are new files available it is not picking up.
Anyone faced this issue with Mule 4 SFTP connector (v1.3.10). Please help me out.
Below is the error message
[2020-12-04 10:04:34.662] ERROR
org.mule.extension.sftp.internal.source.SftpDirectoryListener
[_pollingSource_sd-sftp-svc-flow/executor.01]: Found exception trying
to poll directory '/ABC/xyz/In/'. Will try again on the next poll.
org.mule.runtime.api.exception.MuleRuntimeException: Found exception
trying to obtain path /ABC/xyz/In/ at
org.mule.extension.file.common.api.command.AbstractFileCommand.exception(AbstractFileCommand.java:209)
at
org.mule.extension.sftp.internal.command.SftpCommand.getFile(SftpCommand.java:92)
at
org.mule.extension.sftp.internal.command.SftpCommand.getExistingFile(SftpCommand.java:71)
at
org.mule.extension.sftp.internal.command.SftpListCommand.list(SftpListCommand.java:77)
at
org.mule.extension.file.common.api.AbstractFileSystem.list(AbstractFileSystem.java:112)
at
org.mule.extension.sftp.internal.source.SftpDirectoryListener.poll(SftpDirectoryListener.java:184)
at
org.mule.runtime.module.extension.internal.runtime.source.poll.PollingSourceWrapper.lambda$poll$3(PollingSourceWrapper.java:193)
at
org.mule.runtime.core.api.util.func.CheckedRunnable.run(CheckedRunnable.java:22)
at
org.mule.runtime.module.extension.internal.runtime.source.poll.PollingSourceWrapper.withWatermarkLock(PollingSourceWrapper.java:492)
at
org.mule.runtime.module.extension.internal.runtime.source.poll.PollingSourceWrapper.poll(PollingSourceWrapper.java:190)
at
org.mule.runtime.module.extension.internal.runtime.source.poll.PollingSourceWrapper.lambda$onStart$1(PollingSourceWrapper.java:143)
at
org.mule.runtime.module.extension.internal.runtime.source.poll.DelegateRunnable.run(DelegateRunnable.java:41)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
org.mule.service.scheduler.internal.AbstractRunnableFutureDecorator.doRun(AbstractRunnableFutureDecorator.java:111)
at
org.mule.service.scheduler.internal.RunnableRepeatableFutureDecorator.run(RunnableRepeatableFutureDecorator.java:83)
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) Caused by:
org.mule.runtime.api.exception.MuleRuntimeException: Could not obtain
attributes for path /ABC/xyz/In/ at
org.mule.extension.sftp.internal.connection.SftpClient.exception(SftpClient.java:415)
at
org.mule.extension.sftp.internal.connection.SftpClient.exception(SftpClient.java:409)
at
org.mule.extension.sftp.internal.connection.SftpClient.getAttributes(SftpClient.java:142)
at
org.mule.extension.sftp.internal.command.SftpCommand.getFile(SftpCommand.java:88)
... 17 more Caused by:
org.mule.runtime.api.connection.ConnectionException: ... 20 more
Caused by: 4: at
com.jcraft.jsch.ChannelSftp.stat(ChannelSftp.java:2204) at
org.mule.extension.sftp.internal.connection.SftpClient.getAttributes(SftpClient.java:137)
... 18 more Caused by: java.io.IOException: Pipe closed at
java.io.PipedInputStream.read(PipedInputStream.java:307) at
com.jcraft.jsch.Channel$MyPipedInputStream.updateReadSide(Channel.java:362)
at com.jcraft.jsch.ChannelSftp.stat(ChannelSftp.java:2194) ... 19
more
[2020-12-04 10:04:34.769] WARN
org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource
[_pollingSource_sd-sftp-svc-flow/executor.01]: Message source
'listener' on flow 'sd-sftp-svc-flow' threw exception. Attempting to
reconnect... org.mule.runtime.api.connection.ConnectionException: at
org.mule.extension.sftp.internal.connection.SftpClient.exception(SftpClient.java:409)
at
org.mule.extension.sftp.internal.connection.SftpClient.getAttributes(SftpClient.java:142)
at
org.mule.extension.sftp.internal.command.SftpCommand.getFile(SftpCommand.java:88)
at
org.mule.extension.sftp.internal.command.SftpCommand.getExistingFile(SftpCommand.java:71)
at
org.mule.extension.sftp.internal.command.SftpListCommand.list(SftpListCommand.java:77)
at
org.mule.extension.file.common.api.AbstractFileSystem.list(AbstractFileSystem.java:112)
at
org.mule.extension.sftp.internal.source.SftpDirectoryListener.poll(SftpDirectoryListener.java:184)
at
org.mule.runtime.module.extension.internal.runtime.source.poll.PollingSourceWrapper.lambda$poll$3(PollingSourceWrapper.java:193)
at
org.mule.runtime.core.api.util.func.CheckedRunnable.run(CheckedRunnable.java:22)
at
org.mule.runtime.module.extension.internal.runtime.source.poll.PollingSourceWrapper.withWatermarkLock(PollingSourceWrapper.java:492)
at
org.mule.runtime.module.extension.internal.runtime.source.poll.PollingSourceWrapper.poll(PollingSourceWrapper.java:190)
at
org.mule.runtime.module.extension.internal.runtime.source.poll.PollingSourceWrapper.lambda$onStart$1(PollingSourceWrapper.java:143)
at
org.mule.runtime.module.extension.internal.runtime.source.poll.DelegateRunnable.run(DelegateRunnable.java:41)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
org.mule.service.scheduler.internal.AbstractRunnableFutureDecorator.doRun(AbstractRunnableFutureDecorator.java:111)
at
org.mule.service.scheduler.internal.RunnableRepeatableFutureDecorator.run(RunnableRepeatableFutureDecorator.java:83)
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) Caused by: 4: at
com.jcraft.jsch.ChannelSftp.stat(ChannelSftp.java:2204) at
org.mule.extension.sftp.internal.connection.SftpClient.getAttributes(SftpClient.java:137)
... 18 more Caused by: java.io.IOException: Pipe closed at
java.io.PipedInputStream.read(PipedInputStream.java:307) at
com.jcraft.jsch.Channel$MyPipedInputStream.updateReadSide(Channel.java:362)
at com.jcraft.jsch.ChannelSftp.stat(ChannelSftp.java:2194) ... 19
more
[2020-12-04 10:04:34.832] ERROR
org.mule.runtime.core.api.retry.policy.ConnectNotifier
[[MuleRuntime].uber.11:
[phm-sd-prchs-ord-app-dev].uber#org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource.lambda$null$10:370
#314deb18]: Failed to connect/reconnect: Message Source Reconnection.
Root Exception was: Pipe closed. Type: class java.io.IOException
[2020-12-04 10:04:34.833] INFO
org.mule.runtime.core.internal.retry.policies.SimpleRetryPolicy
[[MuleRuntime].uber.11:
[phm-sd-prchs-ord-app-dev].uber#org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource.lambda$null$10:370
#314deb18]: Waiting for 2000ms before reconnecting. Failed attempt 1
of 2 [2020-12-04 10:04:36.846] ERROR
org.mule.runtime.core.api.retry.policy.ConnectNotifier
[[MuleRuntime].uber.11:
[phm-sd-prchs-ord-app-dev].uber#org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource.lambda$null$10:370
#314deb18]: Failed to connect/reconnect: Message Source Reconnection.
Root Exception was: Pipe closed. Type: class java.io.IOException
[2020-12-04 10:04:36.846] INFO
org.mule.runtime.core.internal.retry.policies.SimpleRetryPolicy
[[MuleRuntime].uber.11:
[phm-sd-prchs-ord-app-dev].uber#org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource.lambda$null$10:370
#314deb18]: Waiting for 2000ms before reconnecting. Failed attempt 2
of 2 [2020-12-04 10:04:38.858] ERROR
org.mule.runtime.core.api.retry.policy.ConnectNotifier
[[MuleRuntime].uber.11:
[phm-sd-prchs-ord-app-dev].uber#org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource.lambda$null$10:370
#314deb18]: Failed to connect/reconnect: Message Source Reconnection.
Root Exception was: Pipe closed. Type: class java.io.IOException
[2020-12-04 10:04:38.860] ERROR
org.mule.runtime.core.internal.retry.async.RetryWorker
[[MuleRuntime].uber.11:
[phm-sd-prchs-ord-app-dev].uber#org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource.lambda$null$10:370
#314deb18]: Error retrying work
org.mule.runtime.core.api.retry.policy.RetryPolicyExhaustedException:
at
org.mule.runtime.core.api.retry.policy.AbstractPolicyTemplate.execute(AbstractPolicyTemplate.java:78)
at
org.mule.runtime.core.internal.retry.async.RetryWorker.run(RetryWorker.java:56)
at
org.mule.runtime.core.internal.util.rx.ImmediateScheduler.execute(ImmediateScheduler.java:150)
at
org.mule.runtime.core.api.retry.async.AsynchronousRetryTemplate.execute(AsynchronousRetryTemplate.java:66)
at
org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource.startSource(ExtensionMessageSource.java:209)
at
org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource.restart(ExtensionMessageSource.java:350)
at
org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource.lambda$null$5(ExtensionMessageSource.java:316)
at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:57)
at
reactor.core.publisher.MonoPeekTerminal.subscribe(MonoPeekTerminal.java:57)
at
reactor.core.publisher.MonoPeekTerminal.subscribe(MonoPeekTerminal.java:61)
at
reactor.core.publisher.MonoPeekFuseable.subscribe(MonoPeekFuseable.java:74)
at reactor.core.publisher.Mono.subscribe(Mono.java:3858) at
reactor.core.publisher.Mono.subscribeWith(Mono.java:3964) at
reactor.core.publisher.Mono.subscribe(Mono.java:3743) at
org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource.lambda$onException$9(ExtensionMessageSource.java:327)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
org.mule.service.scheduler.internal.AbstractRunnableFutureDecorator.doRun(AbstractRunnableFutureDecorator.java:111)
at
org.mule.service.scheduler.internal.RunnableFutureDecorator.run(RunnableFutureDecorator.java:54)
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) Caused by:
org.mule.runtime.api.connection.ConnectionException: at
org.mule.extension.sftp.internal.connection.SftpClient.exception(SftpClient.java:409)
at
org.mule.extension.sftp.internal.connection.SftpClient.getAttributes(SftpClient.java:142)
at
org.mule.extension.sftp.internal.command.SftpCommand.getFile(SftpCommand.java:88)
at
org.mule.extension.sftp.internal.command.SftpCommand.getFile(SftpCommand.java:81)
at
org.mule.extension.sftp.internal.command.SftpCommand.exists(SftpCommand.java:111)
at
org.mule.extension.sftp.internal.command.SftpCommand.exists(SftpCommand.java:41)
at
org.mule.extension.file.common.api.command.AbstractFileCommand.resolveExistingPath(AbstractFileCommand.java:135)
at
org.mule.extension.sftp.internal.source.OnNewFileCommand.resolveRootPath(OnNewFileCommand.java:32)
at
org.mule.extension.sftp.internal.source.SftpDirectoryListener.resolveRootPath(SftpDirectoryListener.java:307)
at
org.mule.extension.sftp.internal.source.SftpDirectoryListener.doStart(SftpDirectoryListener.java:144)
at
org.mule.runtime.extension.api.runtime.source.PollingSource.onStart(PollingSource.java:44)
at
org.mule.runtime.module.extension.internal.runtime.source.poll.PollingSourceWrapper.onStart(PollingSourceWrapper.java:120)
at
org.mule.runtime.module.extension.internal.runtime.source.SourceAdapter.start(SourceAdapter.java:412)
at
org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource$StartSourceCallback.doWork(ExtensionMessageSource.java:548)
at
org.mule.runtime.core.api.retry.policy.AbstractPolicyTemplate.execute(AbstractPolicyTemplate.java:52)
... 21 more Caused by: 4: at
com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2235) at
com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242) at
com.jcraft.jsch.ChannelSftp.stat(ChannelSftp.java:2199) at
org.mule.extension.sftp.internal.connection.SftpClient.getAttributes(SftpClient.java:137)
... 34 more Caused by: java.io.IOException: Pipe closed at
java.io.PipedInputStream.read(PipedInputStream.java:307) at
java.io.PipedInputStream.read(PipedInputStream.java:377) at
com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2909) at
com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2935) at
com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2216) ... 37 more
[2020-12-04 10:04:38.867] WARN
org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource
[[MuleRuntime].uber.11:
[phm-sd-prchs-ord-app-dev].uber#org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource.lambda$null$10:370
#314deb18]: Message source 'listener' on flow 'sd-sftp-svc-flow'
successfully reconnected
We had the same issue with 1.3.10 version of Mule 4 SFTP connector and we raised the issue with Muelsoft and after lot of deliberation they fixed this issue in the latest 1.4.0 version of SFTP connector. Here is the official release notes and comment from Mulesoft
Engineering team has fixed the issue in SFTP connector and the official fix is included in SFTP connector v1.4.0 and has been released.
https://docs.mulesoft.com/release-notes/connector/connector-sftp#1-4-0
this error occurs due to SFTP server has been unavailable or there might be once your flow disconnected with SFTP server. Flow is not reconnecting again.
like in attached image
SFTP Reconnection setup click here
I had the same issue but with the version 1.4.0. #Sandeep Karnati told that 1.4.0 would fix the problem.
But i found in the mulesoft docs there is a new version 1.4.1 which according to MuleSoft fixes this problem.
https://docs.mulesoft.com/release-notes/connector/connector-sftp#1-4-0
I am curious if this works for me.
I am trying to run my Java Dataflow with the DataflowRunner on GCP.
Dataflow works fine with DirectRunner but when changing to DataflowRunner and running it, the console starts staging the files and I suddenly I get the following error several times:
mars 19, 2018 8:43:56 PM com.google.api.client.http.HttpRequest execute
AVERTISSEMENT: exception thrown while executing request
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:170)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
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:973)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:704)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1569)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
at com.google.api.client.http.javanet.NetHttpResponse.<init>(NetHttpResponse.java:37)
at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:94)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:981)
at com.google.api.client.googleapis.media.MediaHttpUploader.executeCurrentRequestWithoutGZip(MediaHttpUploader.java:545)
at com.google.api.client.googleapis.media.MediaHttpUploader.executeCurrentRequest(MediaHttpUploader.java:562)
at com.google.api.client.googleapis.media.MediaHttpUploader.resumableUpload(MediaHttpUploader.java:419)
at com.google.api.client.googleapis.media.MediaHttpUploader.upload(MediaHttpUploader.java:336)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:427)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
at com.google.cloud.hadoop.util.AbstractGoogleAsyncWriteChannel$UploadOperation.call(AbstractGoogleAsyncWriteChannel.java:357)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
But the staging continues (as the console still outputs some staging info) and at some point the errors pops again (may be for the 5th time) and then the following:
mars 19, 2018 8:48:13 PM org.apache.beam.runners.dataflow.util.PackageUtil stageClasspathElements
INFOS: Still staging 127 files
As the console says that it is still staging and don't understand whether this is staging issue or related to the execution of my code...
Any idea about it and how to solve this?
** EDIT **
There is another error that I didn't notice before:
mars 19, 2018 9:41:46 PM com.google.api.client.http.HttpRequest execute
AVERTISSEMENT: exception thrown while executing request
java.io.IOException: insufficient data written
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.close(HttpURLConnection.java:3540)
at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:81)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:981)
at com.google.api.client.googleapis.media.MediaHttpUploader.executeCurrentRequestWithoutGZip(MediaHttpUploader.java:545)
at com.google.api.client.googleapis.media.MediaHttpUploader.executeCurrentRequest(MediaHttpUploader.java:562)
at com.google.api.client.googleapis.media.MediaHttpUploader.resumableUpload(MediaHttpUploader.java:419)
at com.google.api.client.googleapis.media.MediaHttpUploader.upload(MediaHttpUploader.java:336)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:427)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
at com.google.cloud.hadoop.util.AbstractGoogleAsyncWriteChannel$UploadOperation.call(AbstractGoogleAsyncWriteChannel.java:357)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
This was actually a networking issue. Workaround solution is to deploy the pipeline through a Compute Engine instance. This will assure you a good network bandwidth.
When I install a jenkins-plugin like the 'git-plugin', then jenkins redirects my requests to the mirror ftp.halifax.rwth-aachen.de. But I work behind a corporate proxy that forbid requests to URL containing the word 'ftp'.
Is there a way to choose or disable the mirror when downloading plugins for jenkins? Jenkins has no problems installing plugins from sites that do not contain 'ftp'.
Here is the error from jenkins log-view:
Dez 22, 2016 3:46:54 PM INFORMATION hudson.model.UpdateCenter$DownloadJob run
Starting the installation of Git client plugin on behalf of admin-ci
Dez 22, 2016 3:46:54 PM SCHWERWIEGEND hudson.model.UpdateCenter$DownloadJob run
Failed to install Git client plugin
hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/plugins/git-client/2.1.0/git-client.hpi (redirected to: http://ftp.halifax.rwth-aachen.de/jenkins/plugins/git-client/2.1.0/git-client.hpi)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1169)
at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1666)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1864)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1640)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://ftp.halifax.rwth-aachen.de/jenkins/plugins/git-client/2.1.0/git-client.hpi
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1926)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1921)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1920)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1490)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1121)
... 7 more
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://ftp.halifax.rwth-aachen.de/jenkins/plugins/git-client/2.1.0/git-client.hpi
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2982)
at java.net.URLConnection.getHeaderFieldLong(URLConnection.java:629)
at java.net.URLConnection.getContentLengthLong(URLConnection.java:501)
at java.net.URLConnection.getContentLength(URLConnection.java:485)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1120)
... 7 more
enter code here
By default Jenkins is using http://updates.jenkins-ci.org/update-center.json as a "load balancer" url which forwards you to the closest geographical mirror json (i.e. http://ftp-nyc.osuosl.org/pub/jenkins/updates/current/update-center.json for me). What you can do is use your own json file for that purpose by installing this plugin and host json file anywhere you want (i.e. internally):
https://wiki.jenkins.io/display/JENKINS/UpdateSites+Manager+plugin
I found a workaround:
Download the plugin direct from http://mirrors.jenkins-ci.org/plugins/gitlab-plugin/latest/
Upload the hpi-file into jenkins. There is an
upload field in http://host:8080/pluginManager/advanced.
But this is only a workaround. I would like to get an answer to my question: "Is there a way to choose or disable the mirror when downloading plugins for jenkins?"
I am not sure, if this is the correct community to ask Jenkins questions - if not please feel free to move the question.
I am trying to add my local machine as a local slave to an existing job. My problem is that I cannot make the job run, as I get a remote call fails exception. As EnvInject tells me that two variables are missing just the line above I though there maybe is a connection there. But when I look into the environment variables the variables are set correctly and I have read and write access there. So what else could be the cause of the failed remote call? The Stacktrace doesn't tell me much:
C:\Temp\test_slave>exit 0
[EnvInject] - Script executed successfully.
[EnvInject] - Injecting contributions.
Building remotely on test_slave (win_test) in workspace C:\Temp\test_slave\workspace\<job>
[EnvInject] - Unset unresolved 'HOMESHARE' variable.
[EnvInject] - Unset unresolved 'pkidata' variable.
RTC : checkout...
FATAL: RTC : checkout failure: remote file operation failed: C:\Temp\test_slave\workspace\<job> at hudson.remoting.Channel#1453477:test_slave: java.io.IOException: Remote call on test_slave failed
java.io.IOException: remote file operation failed: C:\Temp\test_slave\workspace\<job> at hudson.remoting.Channel#1453477:test_slave: java.io.IOException: Remote call on test_slave failed
at hudson.FilePath.act(FilePath.java:986)
at hudson.FilePath.act(FilePath.java:968)
at com.ibm.team.build.internal.hjplugin.RTCScm.checkout(RTCScm.java:1606)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.io.IOException: Remote call on test_slave failed
at hudson.remoting.Channel.call(Channel.java:789)
at hudson.FilePath.act(FilePath.java:979)
... 11 more
Caused by: java.lang.NoClassDefFoundError: org/eclipse/core/runtime/OperationCanceledException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at com.ibm.team.build.internal.hjplugin.RTCFacadeFactory.newFacade(RTCFacadeFactory.java:240)
at com.ibm.team.build.internal.hjplugin.RTCFacadeFactory.getFacade(RTCFacadeFactory.java:71)
at com.ibm.team.build.internal.hjplugin.RTCBuildResultSetupTask.invoke(RTCBuildResultSetupTask.java:120)
at com.ibm.team.build.internal.hjplugin.RTCBuildResultSetupTask.invoke(RTCBuildResultSetupTask.java:38)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719)
at hudson.remoting.UserRequest.perform(UserRequest.java:120)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at hudson.remoting.Engine$1$1.run(Engine.java:62)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to test_slave(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
at hudson.remoting.Channel.call(Channel.java:781)
... 12 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.OperationCanceledException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at com.ibm.team.build.internal.hjplugin.RTCFacadeClassLoader.loadClass(RTCFacadeClassLoader.java:81)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at com.ibm.team.build.internal.hjplugin.RTCFacadeFactory.newFacade(RTCFacadeFactory.java:240)
at com.ibm.team.build.internal.hjplugin.RTCFacadeFactory.getFacade(RTCFacadeFactory.java:71)
at com.ibm.team.build.internal.hjplugin.RTCBuildResultSetupTask.invoke(RTCBuildResultSetupTask.java:120)
at com.ibm.team.build.internal.hjplugin.RTCBuildResultSetupTask.invoke(RTCBuildResultSetupTask.java:38)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719)
at hudson.remoting.UserRequest.perform(UserRequest.java:120)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at hudson.remoting.Engine$1$1.run(Engine.java:62)
at java.lang.Thread.run(Thread.java:745)
ERROR: RTC : checkout failure: remote file operation failed: C:\Temp\test_slave\workspace\GETRAG\GG-ECMot_AP_0160A_DEV_IFX~SlaveBuild at hudson.remoting.Channel#1453477:test_slave: java.io.IOException: Remote call on test_slave failed
Performing Post build task...
Could not match :Code generation phase : False
Logical operation result is FALSE
Additional information:
The variable EnvInject says are missing are set like the following:
HOMESHARE \\<server>\<user>$
[...]
pkidata \\<server>\<user>$
From the Slave side everything seems to be connected just fine. This is the commandline read-out.
Nov 23, 2016 10:49:29 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://<address>.com:8080/]
Nov 23, 2016 10:49:29 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Nov 23, 2016 10:49:29 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to <address>.com:49599
Nov 23, 2016 10:49:29 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP2-connect
Nov 23, 2016 10:49:29 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected
My current Jenkins build is failing when trying to deploy tests on a real android device.
I have found some people having a similar issue on Travis, but I could not find many others reporting it in Jenkins.
As you can see in the error outputed by gradle this is caused by the TimeoutException triggered when attempting to install the tests:
:library:connectedAndroidTestDebug
11:20:37 E/Device: Error during Sync: timeout.
Unable to install /Users/Shared/Jenkins/Home/jobs/WORKSPACE_PATH/build/outputs/apk/library-debug-androidTest-unaligned.apk
com.android.ddmlib.InstallException
at com.android.ddmlib.Device.installPackage(Device.java:853)
at com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:91)
at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:143)
at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:49)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.android.ddmlib.TimeoutException
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:769)
at com.android.ddmlib.SyncService.doPushFile(SyncService.java:695)
at com.android.ddmlib.SyncService.pushFile(SyncService.java:380)
at com.android.ddmlib.Device.syncPackageToDevice(Device.java:1069)
at com.android.ddmlib.Device.installPackage(Device.java:844)
... 9 more
com.android.builder.testing.ConnectedDevice > runTests[Nexus 4 - 4.4.4] [31mFAILED [0m
com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException
at com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:95)
null
com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException
at com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:95)
at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:143)
at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:49)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.android.ddmlib.InstallException
at com.android.ddmlib.Device.installPackage(Device.java:853)
at com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:91)
... 8 more
Caused by: com.android.ddmlib.TimeoutException
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:769)
at com.android.ddmlib.SyncService.doPushFile(SyncService.java:695)
at com.android.ddmlib.SyncService.pushFile(SyncService.java:380)
at com.android.ddmlib.Device.syncPackageToDevice(Device.java:1069)
at com.android.ddmlib.Device.installPackage(Device.java:844)
... 9 more
:library:connectedAndroidTestDebug FAILED
FAILURE: Build failed with an exception.
I tried invoking Gradle Wrapper which made no difference to specifying the version in the job configuration - I tried Gradle 2.5-rc-1, Gradle 2.3 and Gradle 2.2.1, this last one worked for two builds and then started returning this same timeout error.
I also tried setting up environmental variable:
export ADB_INSTALL_TIMEOUT=10
Setting in build.gradle the com.android.ddmlib.DdmPreferences.setTimeOut param:
com.android.ddmlib.DdmPreferences.setTimeOut(60000)
Also tried using the adbOption 'timeOutInMs' which neither worked.
android {
adbOptions {
timeOutInMs 60000 // set timeout to 1 minute
}
}
It looks like this is an ongoing issue in code.google.com - the following two threads seem to be connected to it:
Issue 1: com.android.builder.testing.ConnectedDevice.getDeviceConfig has a hard coded timeout value that is too low
Issue 2: Allow the user to increase the ADB timeout
Any ideas what else could I try?
Thank you!
I finally fixed it restarting the adb server and issuing any other adb command like for example requesting the list of devices.
Just run the following commands from the terminal:
adb kill-server
adb devices
I hope it helps!