rrichter
Occasional Collector

[RELEASE] RsyncDeployment Module 1.3.4 --> 1.3.5

Leider ist tatsächlich ein Bug in der Version 1.3.4 gelandet, der in der Version 1.3.5 behoben ist.

Ein neues RsyncDeployment Module ist nun released, das sich im Anhang befindet.

Die Version 1.3.5 kommt zusätzlich zu ein paar kleineren Anpassungen mit der Funktionalität daher, dass es nun auch möglich ist, den rsync-Prozess auf Subfolder unterhalb des Generierungsverzeichnisses zu einzuschränken und behebt einen Bug der Version 1.3.4.

Mehr dazu in der Dokumentation.

WICHTIG: Sicherheitshalber sollte nach dem Update der Version 1.1.x auf die Version 1.3.5 des Moduls der FirstSpirit-Server neu gestartet werden, damit die Klassen sauber neu geladen werden.

Labels (1)
Tags (2)
Attachments
Comments

WICHTIG: Nach dem Update in allen rsync-Aktionen einmal "use ssh-agent" klicken, speichern, klicken, speichern, damit da nicht null drin steht, sonst hagelt es NPEs:

ERROR 19.04.2018 16:29:17.119 (de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl): error in task '***' - schedule entry '***' (id=***) - java.lang.NullPointerException

java.lang.NullPointerException

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

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

Hoffentlich habt ihr nicht so viele wie wir. Aber was tut man nicht alles für die Hoffnung, dass nun die ClassCastExceptions weg sind...

Nicht nur beim Update, auch bei einer Neuanlage eines rsync-Tasks ist die Checkbox null...

Außerdem produziert die Version 1.3.4 eine kaputten rsync-Aufruf, so dass es bei uns knallt:

INFO  19.04.2018 16:57:33.415 (de.espirit.firstspirit.impl.access.ScriptContextImpl): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "***": external command: 'rsync' '-r' '-t' '--delete' '-v' '-zp' '--exclude=/deletelist.txt' '-e' ''ssh -oBatchMode=yes -oStrictHostKeyChecking=no'' '/opt/firstspirit5/web/fs5staging/***/***/' '***@***:/***'

ERROR 19.04.2018 16:57:33.463 (de.espirit.firstspirit.agency.ProcessAgent): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "***": rsync: Failed to exec ssh -oBatchMode=yes -oStrictHostKeyChecking=no: No such file or directory (2)

ERROR 19.04.2018 16:57:33.463 (de.espirit.firstspirit.agency.ProcessAgent): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "***": rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.6]

Ich vermute, das liegt an dem doppelten '' beim ''ssh -oBatchMode=yes -oStrictHostKeyChecking=no''

Wir sind wieder auf Version 1.1.1 zurück gegangen und ich werde wohl morgen auf das rsync-Skript zurückrüsten wegen der ClassCastException.

Hallo Heiko,

wir können das leider nicht reproduzieren. Kannst du mir einmal (per E-Mail) eine Reproduktionsanleitung und den kompletten Stacktrace schicken?

Dann gehen wir der Sache umgehend nach.

Vielen Dank und Grüße,

Raphael.

Auch wir haben nach einem Update auf FS 5.2.2011 und Rsync 1.3.4 das beschrieben Problem:

INFO  23.04.2018 11:43:11.754 (de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl): starting task 'Deployment auf vlx059 INT Server' - schedule entry 'Deployment INT' (id=12806233)

INFO  23.04.2018 11:43:11.755 (de.espirit.firstspirit.impl.access.ScriptContextImpl): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "Deployment auf vlx059 INT Server": Deployment to vlx059.iv.local path: "/opt/wildfly/int-wildfly/standalone/deployments_irucontent/iru.war"

INFO  23.04.2018 11:43:11.755 (de.espirit.firstspirit.impl.access.ScriptContextImpl): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "Deployment auf vlx059 INT Server":  use ssh agent status : [false]

INFO  23.04.2018 11:43:11.755 (de.espirit.firstspirit.impl.access.ScriptContextImpl): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "Deployment auf vlx059 INT Server": external command: 'ssh' '-oBatchMode=yes' '-oStrictHostKeyChecking=no' 'xyz@vlx059.iv.local' 'echo' 'success'

INFO  23.04.2018 11:43:11.957 (de.espirit.firstspirit.agency.ProcessAgent): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "Deployment auf vlx059 INT Server": success

INFO  23.04.2018 11:43:11.957 (de.espirit.firstspirit.impl.access.ScriptContextImpl): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "Deployment auf vlx059 INT Server": command completed

INFO  23.04.2018 11:43:11.958 (de.espirit.firstspirit.impl.access.ScriptContextImpl): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "Deployment auf vlx059 INT Server": external command: 'rsync' '--exclude=WEB-INF' '-r' '-c' '-t' '--delete' '-v' '--chmod=u=rwX,og=rX' '--exclude=META-INF' '--exclude=resources' '--exclude=service' '--exclude=templates' '--exclude=img' '--exclude=/deletelist.txt' '-e' ''ssh -oBatchMode=yes -oStrictHostKeyChecking=no'' '/opt/firstspirit5/web/fs5staging/12805347/12806233/' 'xyz@vlx059.iv.local:/opt/wildfly/int-wildfly/standalone/deployments_irucontent/iru.war'

ERROR 23.04.2018 11:43:11.975 (de.espirit.firstspirit.agency.ProcessAgent): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "Deployment auf vlx059 INT Server": rsync: Failed to exec ssh -oBatchMode=yes -oStrictHostKeyChecking=no: No such file or directory (2)

ERROR 23.04.2018 11:43:11.975 (de.espirit.firstspirit.agency.ProcessAgent): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "Deployment auf vlx059 INT Server": rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.0]

ERROR 23.04.2018 11:43:11.975 (de.espirit.firstspirit.agency.ProcessAgent): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "Deployment auf vlx059 INT Server": rsync: connection unexpectedly closed (0 bytes received so far) [sender]

ERROR 23.04.2018 11:43:11.975 (de.espirit.firstspirit.agency.ProcessAgent): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "Deployment auf vlx059 INT Server": rsync error: error in IPC code (code 14) at io.c(235) [sender=3.1.0]

ERROR 23.04.2018 11:43:11.975 (de.espirit.firstspirit.impl.access.ScriptContextImpl): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "Deployment auf vlx059 INT Server": failed with exitcode 14 for external command: 'rsync' '--exclude=WEB-INF' '-r' '-c' '-t' '--delete' '-v' '--chmod=u=rwX,og=rX' '--exclude=META-INF' '--exclude=resources' '--exclude=service' '--exclude=templates' '--exclude=img' '--exclude=/deletelist.txt' '-e' ''ssh -oBatchMode=yes -oStrictHostKeyChecking=no'' '/opt/firstspirit5/web/fs5staging/12805347/12806233/' 'xyz@vlx059.iv.local:/opt/wildfly/int-wildfly/standalone/deployments_irucontent/iru.war'

ERROR 23.04.2018 11:43:11.975 (de.espirit.firstspirit.impl.access.ScriptContextImpl): com.espirit.ps.custom.rsyncdeploy.RsyncDeployExecutor action "Deployment auf vlx059 INT Server": deployment failed!

INFO  23.04.2018 11:43:11.975 (de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl): finished task 'Deployment auf vlx059 INT Server' - schedule entry 'Deployment INT' (id=12806233)

Das Vorgehen mit dem "use ssh-agent" anklicken haben wir auch gemacht. Danach kam die obige Fehlermeldung.

Bitte dringend beheben.

FS 5.2.2011 funktioniert nicht mit dem Rsync Modul 1.1.1:

ERROR 23.04.2018 11:49:11.188 (de.espirit.firstspirit.server.scheduler.ScheduleManagerImpl): error in task 'Deployment auf vlx059 INT Server' - schedule entry 'Deployment INT' (id=12806233) - java.lang.ClassCastException: com.espirit.ps.custom.rsyncdeploy.RsyncDeployData cannot be cast to com.espirit.ps.custom.rsyncdeploy.RsyncDeployData

java.lang.ClassCastException: com.espirit.ps.custom.rsyncdeploy.RsyncDeployData cannot be cast to com.espirit.ps.custom.rsyncdeploy.RsyncDeployData

    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:2509)

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

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

    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:1142)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

    at java.lang.Thread.run(Thread.java:748)

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

Guck mal hier: RsyncDeployment Modul liefert eine ClassCastException

... und probier's nach dem Neustart des FS-Servers nochmal.

Okay, ClassCastException ist weg. Das Ändern und Speichern der Aktion hat mal wieder geholfen.

Hallo zusammen,

wir haben nun die Version 1.3.5 als Bugfix an diesem Posting ausgetauscht.

Bei weiteren ClassCastExceptions schickt uns/mir doch bitte eine Liste der ansonsten auf dem Server installierten Module. Vielleicht finden wir da ja eine Abhängigkeit, die uns bei der Suche nach dem Grund für diesen Effekt (der auch bei anderen Modulen zu verzeichnen ist) weiterhilft.

Vielen Dank,

Raphael.

Hallo,

ich suche nach einer Möglichkeit für das rsync Deployment serverweite Defaults zu definieren. Also z.B. sind bei uns für alle Projekte der Zielserver, das ssh Nutzerkonto, die Parameter und ggfs. ein Pfadpräfix gleich. Geht das mit diesem Modul? Wenn nicht fände ich das eine sinnvolle Erweiterung. Wir haben über 30 Projekte, und da jedesmal das gleiche einzutragen ist fehleranfällig und mühsam, bzw. wenn sich da was ändert muss man es aufwändig überall ändern.

Weiterhin fände ich eine Option nützlich, mehrere Zielserver anzugeben. Wir haben zwei gleich konfigurierte Server hinter einem Loadbalancer, für die man sonst zwei fast exakt gleiche Tasks erstellen muss.

Habe noch ein kleines Problem gefunden.

Wenn auf dem Server MOTD (Message of the Day) aktiv ist wird das seitens RsyncDeploy als Error eingestuft und der Auftrag wirft entsprechend Fehler.

Screenshots dazu folgen. Mit dem zusätzlichen SSH Parameter „-q“ lässt sich dies unterdrücken, ist aber nicht Sinn und Zweck der Sache.

Hallo,

wird es von dem Modul eine Version geben, die im Isolated Mode läuft?

Danke,

Christian