FTP won't start/buggy start

    • OMV 5.x (beta)
    • Yes very frustrating FTP is one of the things I liked about this system.

      Here is a workaround

      make a file in /bin named monitor

      Shell-Script

      1. #!/bin/bash
      2. service=$@
      3. /bin/systemctl -q is-active "$service.service"
      4. status=$?
      5. if [ "$status" == 0 ]; then
      6. echo "OK"
      7. else
      8. /bin/systemctl start "$service.service"
      9. fi

      set permissions

      Source Code

      1. chmod 755 monitor
      run it with cron command monitor proftpd

      I did

      crontab -e

      Source Code

      1. * * * * * monitor proftpd >/dev/null 2>&1
      There is already a cron running that checks the services already a simple code change would restart any enabled services that are not running. This should be part of the of the package anyways. Maybe someone can contact the developers and suggest this.

      Hope this helps

      The post was edited 1 time, last by Kronus ().

    • Kronus wrote:

      Yes very frustrating FTP is one of the things I liked about this system.

      Here is a workaround

      make a file in /bin named monitor

      Shell-Script

      1. #!/bin/bash
      2. service=$@
      3. /bin/systemctl -q is-active "$service.service"
      4. status=$?
      5. if [ "$status" == 0 ]; then
      6. echo "OK"
      7. else
      8. /bin/systemctl start "$service.service"
      9. fi
      set permissions

      Source Code

      1. chmod 755 monitor
      run it with cron command monitor proftpd

      I did

      crontab -e

      Source Code

      1. * * * * * monitor proftpd
      There is already a cron running that checks the services already a simple code change would restart any enabled services that are not running. This should be part of the of the package anyways. Maybe someone can contact the developers and suggest this.

      Hope this helps
      Thank you dude it worked =)
    • What about using monit to restart the daemon if it crashes or is not started after a specified delay?
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Kronus wrote:

      Yes very frustrating FTP is one of the things I liked about this system.

      Here is a workaround

      make a file in /bin named monitor

      Shell-Script

      1. #!/bin/bash
      2. service=$@
      3. /bin/systemctl -q is-active "$service.service"
      4. status=$?
      5. if [ "$status" == 0 ]; then
      6. echo "OK"
      7. else
      8. /bin/systemctl start "$service.service"
      9. fi
      set permissions

      Source Code

      1. chmod 755 monitor
      run it with cron command monitor proftpd

      I did

      crontab -e

      Source Code

      1. * * * * * monitor proftpd
      There is already a cron running that checks the services already a simple code change would restart any enabled services that are not running. This should be part of the of the package anyways. Maybe someone can contact the developers and suggest this.

      Hope this helps
      The file has to have no ending like "monitor.xxx" just "monitor"?

      How do I run it with cron command? :huh: What times do I need to set? I googled that but all the tutorials are different.

      Is there any way to stop the script after like 10 retrys to start the server? I don't want my FTP stuck in an endless bootloop when I screw up the configuration again. :D
    • TheBadFrag wrote:

      The file has to have no ending like "monitor.xxx" just "monitor"?
      Yes, file extensions are a windows thing.

      TheBadFrag wrote:

      How do I run it with cron command? What times do I need to set? I googled that but all the tutorials are different.
      That is explicitly shown in the crontab -e command. Just execute it and put exactly what is in the source code box under it.

      TheBadFrag wrote:

      Is there any way to stop the script after like 10 retrys to start the server?
      Not without making the script smarter.
      omv 5.2.3 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.1
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • TheBadFrag wrote:

      Is there any way to stop the script after like 10 retrys to start the server?
      Yes, use Monit or a systemd unit file.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Hello.

      using monit work well !
      create in /etc/monit/conf.d
      thanks

      Source Code: openmediavault-proftpd.conf

      1. # FTP
      2. check process proftpd with pidfile /var/run/proftpd.pid
      3. start program = "/etc/init.d/proftpd restart"
      4. stop program = "/etc/init.d/proftpd stop"
      5. if failed port 21 protocol ftp then restart
      6. if 5 restarts within 5 cycles then timeout
    • Does anyone else realize that proftpd is not stopped when using systemctl stop proftpd. IMO the systemd integration is very bad. Hopefully the Debian package maintainers will fix that soonish.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • votdev wrote:

      Does anyone else realize that proftpd is not stopped when using systemctl stop proftpd. IMO the systemd integration is very bad. Hopefully the Debian package maintainers will fix that soonish.
      I think upstream they want the service to start via socket activation, the same approach can be used at the moment with ssh. Maybe you should adopt the package distribution via omv repos
      New wiki
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server