F20 but general question.
I test both upstream and Fedora Azureus (Vuze) use openjdk for both.
I created an azvuze.service to automate restarts (during the night)
Sometimes openjdk stays, sometimes crashes out. If it stays, it prevents restart. by either service file, manually typing # azureus.
How can I automate "killall -SIGHUP java", only when azureus || vuze is refusing to start with: journalctl | grep azureus StartSocket: passing startup args to already-running Azureus java process listening on [127.0.0.1: NNNN] azureus[2297]: StartServer ERROR: unable to bind to 127.0.0.1:NNNN listening for passed torrent info: Address already in use
Both fedora-azureus and upstream-vuze are similar but for paths
azvuze.service ============
# restart azureus #
[Unit] Description=Vuze (Upstream) DefaultDependencies=no Requires=lightdm.service After=graphical.target
[Service] User=makeyup Type=forking Restart=always RestartSec=180 RemainAfterExit=no TimeoutStartSec=0 Environment=DISPLAY=:0 # ExecStartPre=/usr/bin/killall -SIGHUP java ## not a good idea here. ExecStartPre=/usr/local/scripts/ulimit ExecStart=/home/makeyup/Upstream_Vuze/azureus
[Install] WantedBy=graphical.target ========================
On 11 October 2013 12:10, Frank Murphy frankly3d@gmail.com wrote:
F20 but general question.
I test both upstream and Fedora Azureus (Vuze) use openjdk for both.
I created an azvuze.service to automate restarts (during the night)
Sometimes openjdk stays, sometimes crashes out. If it stays, it prevents restart. by either service file, manually typing # azureus.
How can I automate "killall -SIGHUP java", only when azureus || vuze is refusing to start with: journalctl | grep azureus StartSocket: passing startup args to already-running Azureus java process listening on [127.0.0.1: NNNN] azureus[2297]: StartServer ERROR: unable to bind to 127.0.0.1:NNNN
For example: journalctl | grep azureus | grep "ERROR: unable to bind" > /dev/null && killall -SIGHUP java
More elegant to be able to detect this failure at the attempt to start the azureus client, do the kill and then retry the start (while checking for loops). But that mightn't be possible depending on how it reacts to your attempt to restart it.
On Fri, 11 Oct 2013 12:30:25 +0100 Ian Malone ibmalone@gmail.com wrote:
On 11 October 2013 12:10, Frank Murphy frankly3d@gmail.com wrote:
For example: journalctl | grep azureus | grep "ERROR: unable to bind" > /dev/null && killall -SIGHUP java
Thanks Ian,
More elegant to be able to detect this failure at the attempt to start the azureus client, do the kill and then retry the start (while checking for loops). But that mightn't be possible depending on how it reacts to your attempt to restart it.
That could work as a script in "ExecStartPre=/above example as script" Will give it a spin.