我们的自动化maven构建过程遇到了一些问题。 install4j的签名过程有时会破坏构建。有时它很有效我们有时会遇到以下异常:
...
[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本身的签名过程的问题。将什么值设置为连接超时的默认值?是否可以覆盖此值?
对于签名,我们使用的是 pfx -file和install4j,版本为5.1.12。
答案 0 :(得分:2)
默认情况下,读取超时设置为10000毫秒。您可以通过添加行
来增加它-Dinstall4j.readTimeout=20000
到install4j安装中的文件bin / install4j.vmoptions。
仅供参考,连接超时有一个类似的VM参数install4j.connectTimeout
,默认值为10000毫秒。
更新(2014-11-20):
自install4j 6.0起,失败的计数器签名将重试10次,暂停时间为3秒。使用VM参数
可以增加最大重试次数-Dinstall4j.counterSignRetry=20