Project Restore

33 views
Skip to first unread message

eric....@gmail.com

unread,
Nov 22, 2022, 1:04:26ā€ÆPM11/22/22
to rundeck-discuss
Thought I'd start a new thread because the old one is going in too many directions.Ā  I'm running rundeck 3.4.9 with rundeck-cli 1.3.4.Ā  I capture the project on the old machine with:
rd projects archives export -p ProjectName --file ProjectName.zip

Then I try to import the project with:

rd projects archives import -p ProjectName --file ./ProjectName.zip


The output (and error) is:

[root@myMachine tmp]# rd projects archives import -p ProjectName --file ./ProjectName.zip
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by retrofit2.Platform (file:/var/lib/rundeck-cli/rd-cli-tool-shadow-1.3.4/lib/rundeck-cli-1.3.4-all.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of retrofit2.Platform
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.net.SocketTimeoutException: timeout
Ā  Ā  Ā  Ā  at okio.Okio$4.newTimeoutException(Okio.java:232)
Ā  Ā  Ā  Ā  at okio.AsyncTimeout.exit(AsyncTimeout.java:286)
Ā  Ā  Ā  Ā  at okio.AsyncTimeout$1.write(AsyncTimeout.java:184)
Ā  Ā  Ā  Ā  at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:179)
Ā  Ā  Ā  Ā  at okio.RealBufferedSink.write(RealBufferedSink.java:42)
Ā  Ā  Ā  Ā  at okhttp3.internal.http1.Http1ExchangeCodec$KnownLengthSink.write(Http1ExchangeCodec.java:324)
Ā  Ā  Ā  Ā  at okio.ForwardingSink.write(ForwardingSink.java:35)
Ā  Ā  Ā  Ā  at okhttp3.internal.connection.Exchange$RequestBodySink.write(Exchange.java:231)
Ā  Ā  Ā  Ā  at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:179)
Ā  Ā  Ā  Ā  at okio.RealBufferedSink.writeAll(RealBufferedSink.java:107)
Ā  Ā  Ā  Ā  at okhttp3.RequestBody$3.writeTo(RequestBody.java:171)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:69)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
Ā  Ā  Ā  Ā  at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:43)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
Ā  Ā  Ā  Ā  at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
Ā  Ā  Ā  Ā  at org.rundeck.client.util.StaticHeaderInterceptor.intercept(StaticHeaderInterceptor.java:38)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
Ā  Ā  Ā  Ā  at org.rundeck.client.util.FormAuthInterceptor.intercept(FormAuthInterceptor.java:62)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
Ā  Ā  Ā  Ā  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
Ā  Ā  Ā  Ā  at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229)
Ā  Ā  Ā  Ā  at okhttp3.RealCall.execute(RealCall.java:81)
Ā  Ā  Ā  Ā  at retrofit2.OkHttpCall.execute(OkHttpCall.java:204)
Ā  Ā  Ā  Ā  at org.rundeck.client.util.Client.checkErrorDowngradable(Client.java:166)
Ā  Ā  Ā  Ā  at org.rundeck.client.util.Client.apiCallDowngradable(Client.java:606)
Ā  Ā  Ā  Ā  at org.rundeck.client.tool.commands.AppCommand.apiCallDowngradable(AppCommand.java:103)
Ā  Ā  Ā  Ā  at org.rundeck.client.tool.commands.AppCommand.apiCall(AppCommand.java:74)
Ā  Ā  Ā  Ā  at org.rundeck.client.tool.commands.projects.Archives.importArchive(Archives.java:94)
Ā  Ā  Ā  Ā  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Ā  Ā  Ā  Ā  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Ā  Ā  Ā  Ā  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Ā  Ā  Ā  Ā  at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Ā  Ā  Ā  Ā  at org.rundeck.toolbelt.ToolBelt$MethodInvoker.run(ToolBelt.java:1030)
Ā  Ā  Ā  Ā  at org.rundeck.toolbelt.ToolBelt$CommandSet.runCommand(ToolBelt.java:619)
Ā  Ā  Ā  Ā  at org.rundeck.toolbelt.ToolBelt$CommandSet.run(ToolBelt.java:471)
Ā  Ā  Ā  Ā  at org.rundeck.toolbelt.ToolBelt$CommandSet.runCommand(ToolBelt.java:619)
Ā  Ā  Ā  Ā  at org.rundeck.toolbelt.ToolBelt$CommandSet.run(ToolBelt.java:471)
Ā  Ā  Ā  Ā  at org.rundeck.toolbelt.ToolBelt$CommandSet.runCommand(ToolBelt.java:619)
Ā  Ā  Ā  Ā  at org.rundeck.toolbelt.ToolBelt$CommandSet.run(ToolBelt.java:471)
Ā  Ā  Ā  Ā  at org.rundeck.toolbelt.ToolBelt$CommandSet.runMain(ToolBelt.java:428)
Ā  Ā  Ā  Ā  at org.rundeck.client.tool.Main.main(Main.java:74)
Caused by: java.net.SocketException: Socket closed
Ā  Ā  Ā  Ā  at java.base/java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
Ā  Ā  Ā  Ā  at java.base/java.net.SocketOutputStream.write(SocketOutputStream.java:150)
Ā  Ā  Ā  Ā  at okio.Okio$1.write(Okio.java:79)
Ā  Ā  Ā  Ā  at okio.AsyncTimeout$1.write(AsyncTimeout.java:180)


Anyone have a clue what is going wront?

Thanks,
Eric

rac...@rundeck.com

unread,
Nov 22, 2022, 1:44:19ā€ÆPM11/22/22
to rundeck-discuss
Try exporting your project without executions. Then import to the new instance.

Another way to avoid that (if you wan to keep the executions) is to increase the RD CLI timeout, check this.

Regards!

eric....@gmail.com

unread,
Nov 22, 2022, 2:23:29ā€ÆPM11/22/22
to rundeck-discuss
So I have to admit that I don't know how to export without executions or even what executions are.Ā  Is that like history on jobs that have been run?Ā  How would I export without them?Ā  As we speak I'm trying the RD_HTTP_TIMEOUT=300.

Thanks,
Eric

eric....@gmail.com

unread,
Nov 22, 2022, 2:26:39ā€ÆPM11/22/22
to rundeck-discuss
Crashed at 300, trying 600 before figuring out how to not import executions...

eric....@gmail.com

unread,
Nov 22, 2022, 2:31:00ā€ÆPM11/22/22
to rundeck-discuss
OK 600 gave a server error:


WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by retrofit2.Platform (file:/var/lib/rundeck-cli/rd-cli-tool-shadow-1.3.4/lib/rundeck-cli-1.3.4-all.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of retrofit2.Platform
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Error: (no message)

Request failed: 500 Server Error



So I need to figure out what I lose if I don't get executions.Ā  I found the options:

[--include -i value...] : List of archive contents to include. [all,jobs,executions,configs,readmes,acls,scm]

So I would add --include jobs,configs,readmes,acls,scm

What exactly are executions?

Thanks,
Eric

rac...@rundeck.com

unread,
Nov 22, 2022, 2:37:00ā€ÆPM11/22/22
to rundeck-discuss

By default, RD CLI exports including all, you can ā€œlimitā€ that in the following way:

rd projects archives export -f myproject.jar -p ProjectEXAMPLE -i jobs -i configs -i acls -i readmes -i scm

This example includes: jobs, config, acls, readme content and scm config (excludes executions).

To learn more, just execute: rd projects archive export help.

Greetings.

ā€‹

rac...@rundeck.com

unread,
Nov 22, 2022, 2:38:06ā€ÆPM11/22/22
to rundeck-discuss
Executions are the "logs" of your jobs activity, please read this.

Greetings.

eric....@gmail.com

unread,
Nov 22, 2022, 2:46:02ā€ÆPM11/22/22
to rundeck-discuss
So my command failed:

rd projects archives export -p MyProject --include jobs,configs,readmes,acls,scm --file MyProject2.zip

Seems like my command line is wrong.Ā  Here's the output:

Input error for [rd projects archives export]: Invalid value (No enum constant org.rundeck.client.tool.commands.projects.Archives.Flags.jobs,configs,readmes,acls,scm): [--include -i value...] : List of archive contents to include. [all,jobs,executions,configs,readmes,acls,scm]. Default: all. (API v19 required for other options).
Invalid value (No enum constant org.rundeck.client.tool.commands.projects.Archives.Flags.jobs,configs,readmes,acls,scm): [--include -i value...] : List of archive contents to include. [all,jobs,executions,configs,readmes,acls,scm]. Default: all. (API v19 required for other options).
You can use: "rd projects archives export help" to get help.

Thanks,
Eric

rac...@rundeck.com

unread,
Nov 22, 2022, 2:53:48ā€ÆPM11/22/22
to rundeck-discuss
Check this answer, it works in that way.

Regards.
Reply all
Reply to author
Forward
0 new messages