milovan_bekic
I'm new here

rsync deploy

Jump to solution

Hello all,

I want to set up secure deploy via rsync on Linux server.

When I test rsync form server which FirstSpirit is installed to server for deployment, rsync works perfect. I testing it through command line.

I downloaded rsync module for FirstSpirit but it not working. When I deploy, everything is successfully passed but no files on server.

Does someone have written script for rsync deploy to send me?

Thank you very much.

0 Kudos
1 Solution

Accepted Solutions
pavone
I'm new here

Hello Milovan,

this is interesting:

ERROR 08.03.2018 14:40:02.189 {uID=0,seID=2881,pID=13} (de.espirit.firstspirit.impl.access.ScriptContextImpl): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "rsync-Deployment": failed. cause: no preceding generation action

Is there a generation task before the deployment task?

Regards,

Tim

View solution in original post

0 Kudos
4 Replies
marro
Crownpeak employee

Hello Milovan,

do you have any logging from the rsync task that you could provide?

Regards,

Donato

0 Kudos

Hello Donato,

This I get in fs-server.log when I try to deploy with rsync module:

INFO  08.03.2018 14:36:39.802 (de.espirit.firstspirit.server.logging.LogWriter): close writer for /log/fs-server.log

INFO  08.03.2018 14:36:39.853 (de.espirit.firstspirit.server.logging.LoggingManagerImpl): Log4j properties loaded: /home/asioso/firstspirit5/conf/fs-logging.conf

INFO  08.03.2018 14:40:02.186 {uID=1,seID=2881,pID=13} (de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl): starting schedule entry 'rsync deploy' (id=2881) {started by Admin (Admin)}

INFO  08.03.2018 14:40:02.186 {uID=1,seID=2881,pID=13} (de.espirit.firstspirit.server.sessionmanagement.SessionManagerImpl): dummy session created (ID=1156044552887603903, user=ScheduleEntry 'rsync deploy' (id=2881), project 13)

INFO  08.03.2018 14:40:02.186 {uID=1,seID=2881,pID=13} (de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl): starting task 'rsync-Deployment' - schedule entry 'rsync deploy' (id=2881)

INFO  08.03.2018 14:40:02.189 {seID=2881,pID=13} (de.espirit.firstspirit.server.sessionmanagement.SessionManagerImpl): new session (ID=7039035490712956982, user=SYSTEM, userID=0, type=DUMMY) created

INFO  08.03.2018 14:40:02.189 {uID=0,seID=2881,pID=13} (de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl): starting task 'rsync-Deployment' - schedule entry 'rsync deploy' (id=2881)

ERROR 08.03.2018 14:40:02.189 {uID=0,seID=2881,pID=13} (de.espirit.firstspirit.impl.access.ScriptContextImpl): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "rsync-Deployment": failed. cause: no preceding generation action

INFO  08.03.2018 14:40:02.189 {uID=0,seID=2881,pID=13} (de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl): cancel ScheduleEntry 'rsync deploy' (id=2881), project 13

INFO  08.03.2018 14:40:02.190 {uID=0,seID=2881,pID=13} (de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl): finished task 'rsync-Deployment' - schedule entry 'rsync deploy' (id=2881)

INFO  08.03.2018 14:40:02.190 {uID=1,seID=2881,pID=13} (de.espirit.common.util.SuspendableThread): Thread[Queue[DEFAULT]:ScheduleEntry 'rsync deploy' (id=2881), project 13,5,main] interrupt flag reset

FSVersion=5.2.1714.76746#5562;JDK=1.8.0_151 64bit Oracle Corporation;OS=Linux 4.4.0-042stab127.2 amd64;Date=08.03.2018 14:40:02

java.lang.Exception: interrupt reset trace

        at de.espirit.common.util.SuspendableThread.isInterrupted(SuspendableThread.java:98)

        at de.espirit.common.util.SuspendableThread.interrupted(SuspendableThread.java:129)

        at de.espirit.common.util.BoundedExecutorService$RunnableWrapper.onResume(BoundedExecutorService.java:455)

        at de.espirit.common.util.SuspendableThread.onResume(SuspendableThread.java:73)

        at de.espirit.common.util.SuspendableExecutorService.resume(SuspendableExecutorService.java:54)

        at de.espirit.common.util.SuspendableExecutorService$SuspendableFuture.get(SuspendableExecutorService.java:187)

        at de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl$ScheduleRunnable.joinTasks(ScheduleManagerImpl.java:2230)

        at de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl$ScheduleRunnable.doRun(ScheduleManagerImpl.java:2180)

        at de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl$ScheduleRunnable.run(ScheduleManagerImpl.java:2026)

        at de.espirit.firstspirit.server.ExecutionManagerImpl$RunnableWrapper.call(ExecutionManagerImpl.java:625)

        at de.espirit.firstspirit.server.ExecutionManagerImpl$ExtendedCallable.call(ExecutionManagerImpl.java:590)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

        at de.espirit.common.util.BoundedExecutorService$RunnableWrapper.run(BoundedExecutorService.java:436)

        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)

        at de.espirit.common.util.SuspendableThread.run(SuspendableThread.java:56)

Caused by: java.lang.InterruptedException: Thread[Queue[DEFAULT]:ScheduleEntry 'rsync deploy' (id=2881), project 13,5,main] interrupted @ 08.03.2018 14:40:02.189

        at de.espirit.common.util.SuspendableThread.interrupt(SuspendableThread.java:116)

        at java.util.concurrent.FutureTask.cancel(FutureTask.java:174)

        at de.espirit.common.util.SuspendableExecutorService$SuspendableFuture.cancel(SuspendableExecutorService.java:165)

        at de.espirit.common.util.ScheduledFutureWrapper.cancel(ScheduledFutureWrapper.java:25)

        at de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl$ScheduleRunnable.cancel(ScheduleManagerImpl.java:1929)

        at de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl.stopExecution(ScheduleManagerImpl.java:1260)

        at de.espirit.firstspirit.admin.ScheduleStorageImpl.stopExecution(ScheduleStorageImpl.java:66)

        at de.espirit.firstspirit.admin.ScheduleEntryControlImpl.stopExecution(ScheduleEntryControlImpl.java:81)

        at de.espirit.firstspirit.scheduling.ScheduleTaskExecutionContextImpl$JobAgentImpl.abort(ScheduleTaskExecutionContextImpl.java:190)

        at com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor.execute(RsyncDeployExecutor.java:79)

        at com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor.execute(RsyncDeployExecutor.java:37)

        at de.espirit.firstspirit.scheduling.ConfigurableScheduleTask.execute(ConfigurableScheduleTask.java:31)

        at de.espirit.firstspirit.scheduling.ConfigurableScheduleTaskExecutor.run(ConfigurableScheduleTaskExecutor.java:14)

        at de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl$TaskCallable.executeLocal(ScheduleManagerImpl.java:2475)

        at de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl$TaskCallable.executeLocal(ScheduleManagerImpl.java:2458)

        at de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl$TaskCallable.call(ScheduleManagerImpl.java:2390)

        ... 9 more

INFO  08.03.2018 14:40:02.190 {uID=1,seID=2881,pID=13} (de.espirit.common.util.BoundedExecutorService): thread is interrupted: Thread[Queue[DEFAULT]:ScheduleEntry 'rsync deploy' (id=2881), project 13,5,main]

INFO  08.03.2018 14:40:02.190 {uID=1,seID=2881,pID=13} (de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl): cancelled - schedule entry 'rsync deploy' (id=2881) interrupted

INFO  08.03.2018 14:40:02.190 {uID=1,seID=2881,pID=13} (de.espirit.firstspirit.server.sessionmanagement.SessionManagerImpl): Session terminated (ID=7039035490712956982, user=SYSTEM(dummy)), number of sessions now 9

INFO  08.03.2018 14:40:02.190 {uID=1,seID=2881,pID=13} (de.espirit.firstspirit.server.sessionmanagement.SessionManagerImpl): close dummy session (ID=1156044552887603903, user=ScheduleEntry 'rsync deploy' (id=2881), project 13)

INFO  08.03.2018 14:40:02.191 {uID=1,seID=2881,pID=13} (de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl): finished schedule entry 'rsync deploy' (id=2881) - 0 fatal error(s), 1 error(s), 0 warning(s), duration 0:00:00.006

INFO  08.03.2018 14:40:17.395 (de.espirit.common.util.SuspendableThread): Thread[PoolThread[DEFAULT]-2,5,main] interrupt flag reset

FSVersion=5.2.1714.76746#5562;JDK=1.8.0_151 64bit Oracle Corporation;OS=Linux 4.4.0-042stab127.2 amd64;Date=08.03.2018 14:40:17

java.lang.Exception: interrupt reset trace

        at de.espirit.common.util.SuspendableThread.isInterrupted(SuspendableThread.java:98)

        at de.espirit.common.util.SuspendableThread.interrupted(SuspendableThread.java:129)

        at de.espirit.common.util.BoundedExecutorService$RunnableWrapper.run(BoundedExecutorService.java:435)

        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)

        at de.espirit.common.util.SuspendableThread.run(SuspendableThread.java:56)

Caused by: java.lang.InterruptedException: Thread[Queue[DEFAULT]:ScheduleEntry 'rsync deploy' (id=2881), project 13,5,main] interrupted @ 08.03.2018 14:40:02.190

        at de.espirit.common.util.SuspendableThread.interrupt(SuspendableThread.java:116)

        at de.espirit.common.util.BoundedExecutorService$RunnableWrapper.onResume(BoundedExecutorService.java:457)

        at de.espirit.common.util.SuspendableThread.onResume(SuspendableThread.java:73)

        at de.espirit.common.util.SuspendableExecutorService.resume(SuspendableExecutorService.java:54)

        at de.espirit.common.util.SuspendableExecutorService$SuspendableFuture.get(SuspendableExecutorService.java:187)

        at de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl$ScheduleRunnable.joinTasks(ScheduleManagerImpl.java:2230)

        at de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl$ScheduleRunnable.doRun(ScheduleManagerImpl.java:2180)

        at de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl$ScheduleRunnable.run(ScheduleManagerImpl.java:2026)

        at de.espirit.firstspirit.server.ExecutionManagerImpl$RunnableWrapper.call(ExecutionManagerImpl.java:625)

        at de.espirit.firstspirit.server.ExecutionManagerImpl$ExtendedCallable.call(ExecutionManagerImpl.java:590)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

        at de.espirit.common.util.BoundedExecutorService$RunnableWrapper.run(BoundedExecutorService.java:436)

        ... 6 more

0 Kudos
pavone
I'm new here

Hello Milovan,

this is interesting:

ERROR 08.03.2018 14:40:02.189 {uID=0,seID=2881,pID=13} (de.espirit.firstspirit.impl.access.ScriptContextImpl): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "rsync-Deployment": failed. cause: no preceding generation action

Is there a generation task before the deployment task?

Regards,

Tim

0 Kudos

Hello Tim,

No there is not generation task. I added it and after rsync deploy is successfully passed.

Thank you very much.

Kind regards.

0 Kudos