签名过程中的SocketTimeoutException [英] SocketTimeoutException during signing process

查看:90
本文介绍了签名过程中的SocketTimeoutException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在自动化的Maven构建过程中遇到了一些麻烦.有时会因install4j的签名过程而破坏构建.有时效果很好,有时我们会遇到以下异常:

We have some trouble with our automated maven build process. From time to time the build is broken by the signing process of install4j. Sometimes it works very well sometimes we get the following exception:

...
[15:51:29] :         [myapp] [INFO]     Compiling launcher 'Standalone updater':
[15:51:29] :         [myapp] [INFO]       replaced variable 'launcher.name' with 'MyApp' in string '${compiler:launcher.name} Update'
[15:51:29] :         [myapp] [INFO]       using icon file D:\BuildAgent7\work\1c0ed506bc73bcb4\target\install4j\resource\updater.ico
[15:51:29] :         [myapp] [INFO]       replaced variable 'sys.fullName' with 'My Application' in string 'Starts the ${compiler:sys.fullName} update'
[15:51:29] :         [myapp] [INFO]       Creating GUI mode application.
[15:51:29] :         [myapp] [INFO]       Signing executable
[15:51:37] :         [myapp] [INFO]   Creating media file: 
[15:51:37] :         [myapp] [INFO]     replaced variable 'launcher.name' with 'MyApp' in string '${compiler:launcher.name} Uninstall'
[15:51:37] :         [myapp] [INFO]     output file is D:\BuildAgent7\temp\buildTmp\install4j374202026546155444_dir\set1\launcheruninstaller\app.ico
[15:51:37] :         [myapp] [INFO]     replaced variable 'sys.fullName' with 'My Application' in string 'Remove the ${compiler:sys.fullName} installation'
[15:51:37] :         [myapp] [INFO]     Creating GUI mode application.
[15:51:37] :         [myapp] [INFO]     Signing executable
[15:51:47] :         [myapp] [INFO] com.a.a.d: error during counter signing
[15:51:47] :         [myapp] [INFO]     at com.install4j.c.b.d.a(ejt:137)
[15:51:47] :         [myapp] [INFO]     at com.install4j.c.b.d.a(ejt:94)
[15:51:47] :         [myapp] [INFO]     at com.install4j.c.b.g.a(ejt:68)
[15:51:47] :         [myapp] [INFO]     at com.install4j.b.g.c.a(ejt:189)
[15:51:47] :         [myapp] [INFO]     at com.install4j.b.g.c.a(ejt:82)
[15:51:47] :         [myapp] [INFO]     at com.install4j.b.g.g.a(ejt:60)
[15:51:47] :         [myapp] [INFO]     at com.install4j.b.b.d(ejt:392)
[15:51:47] :         [myapp] [INFO]     at com.install4j.b.b.c(ejt:360)
[15:51:47] :         [myapp] [INFO]     at com.install4j.b.b.a(ejt:135)
[15:51:47] :         [myapp] [INFO]     at com.install4j.b.h.a(ejt:440)
[15:51:47] :         [myapp] [INFO]     at com.install4j.b.h.a(ejt:214)
[15:51:47] :         [myapp] [INFO]     at com.install4j.b.h.d(ejt:106)
[15:51:47] :         [myapp] [INFO]     at com.install4j.Install4JApplication.c(ejt:436)
[15:51:47] :         [myapp] [INFO]     at com.a.a.a(ejt:286)
[15:51:47] :         [myapp] [INFO]     at com.install4j.Install4JApplication.main(ejt:93)
[15:51:47] :         [myapp] [INFO]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[15:51:47] :         [myapp] [INFO]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at java.lang.reflect.Method.invoke(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at com.exe4j.runtime.WinLauncher.main(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)
[15:51:47] :         [myapp] [INFO] Caused by: java.io.IOException: Read timed out
[15:51:47] :         [myapp] [INFO] You can set a different timestamp signing service by setting the VM parameter -Dinstall4j.timestampUrl=http://... in bin/install4j.vmoptions
[15:51:47] :         [myapp] [INFO]     at com.install4j.c.b.d.b(ejt:174)
[15:51:47] :         [myapp] [INFO]     at com.install4j.c.b.d.a(ejt:110)
[15:51:47] :         [myapp] [INFO]     ... 21 more
[15:51:47] :         [myapp] [INFO] Caused by: java.net.SocketTimeoutException: Read timed out
[15:51:47] :         [myapp] [INFO]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[15:51:47] :         [myapp] [INFO]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at java.lang.reflect.Constructor.newInstance(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at java.security.AccessController.doPrivileged(Native Method)
[15:51:47] :         [myapp] [INFO]     at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at com.install4j.runtime.installer.helper.content.Downloader.connect(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at com.install4j.c.b.d.b(ejt:156)
[15:51:47] :         [myapp] [INFO]     ... 22 more
[15:51:47] :         [myapp] [INFO] Caused by: java.net.SocketTimeoutException: Read timed out
[15:51:47] :         [myapp] [INFO]     at java.net.SocketInputStream.socketRead0(Native Method)
[15:51:47] :         [myapp] [INFO]     at java.net.SocketInputStream.read(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at java.net.SocketInputStream.read(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at java.io.BufferedInputStream.fill(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at java.io.BufferedInputStream.read1(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at java.io.BufferedInputStream.read(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at java.net.URLConnection.getHeaderFieldLong(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at java.net.URLConnection.getContentLengthLong(Unknown Source)
[15:51:47] :         [myapp] [INFO]     at java.net.URLConnection.getContentLength(Unknown Source)
[15:51:47] :         [myapp] [INFO]     ... 24 more
[15:51:47] :         [myapp] [INFO] install4j: compilation failed. Reason: error during counter signing
[15:51:47] :         [myapp] [Maven Watcher] 
[15:51:47]E:         [myapp] Failed to execute goal org.sonatype.install4j:install4j-maven-plugin:1.0.5:compile (build-installer) on project myapp: null returned: 1
...

稳定我们的持续构建是一个问题. SocketTimeoutException导致我得出与Verisign服务器的连接丢失的结论.但是对于更新程序,签名执行期间已经存在连接.现在,我不确定这是否是我们的构建环境或install4j本身的签名过程的问题.什么值设置为连接超时的默认值?是否可以覆盖此值?

That's a problem to stabilize our continuous build. The SocketTimeoutException leads me to the conclusion of a missing connection to the verisign server. But for the updater there was already a connection during signing execution. Now I am not sure if this may be a problem of our build environment or the signing process of install4j itself. What value is set as the default for the connection timeout? Is it possible to override this value?

对于签名,我们使用的是 pfx 文件和版本为5.1.12的install4j.

For the signing we are using a pfx-file and install4j with version 5.1.12.

推荐答案

默认情况下,读取超时设置为10000毫秒.您可以通过添加行来增加它

The read timeout is set to 10000 milliseconds by default. You can increase it by adding the line

-Dinstall4j.readTimeout=20000

到install4j安装中的bin/install4j.vmoptions文件.

to the file bin/install4j.vmoptions in your install4j installation.

仅供参考,连接超时也有类似的VM参数install4j.connectTimeout,默认值为10000 ms.

Just for reference, there is a similar VM parameter install4j.connectTimeout for the connect timeout, also with a default value of 10000 ms.

更新(2014-11-20):

从install4j 6.0开始,失败的计数器签名重试10次,暂停3秒.可以使用VM参数

Since install4j 6.0, a failed counter signature is retried 10 times with a pause of 3 seconds. The maximum number of retries can be increased with the VM parameter

-Dinstall4j.counterSignRetry=20

这篇关于签名过程中的SocketTimeoutException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆