Debian execute springboot app as service: service not found










1














I follow this doc: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#deployment-initd-service



My app repo:



└──╼ ls -l
total 67556
-rw-r--r-- 1 root root 1842 nov. 7 15:06 application.yml
-rw-r--r-- 1 root root 69169161 nov. 12 07:50 importparcoursup.jar
┌─[root@prodsb01:/var/apps/importsup]


ln creation:



ln -s /var/apps/importsup/importparcoursup.jar /etc/init.d/importparcoursup


service start error:



┌─[✗]─[root@prodsb01:/var/apps/importsup]
└──╼ service importparcoursup start
Failed to start importparcoursup.service: Unit importparcoursup.service not found.


Is there something I forgot here ?



Here is some more commands I tried:



┌─[✗]─[root@prodsb01:/var/apps/importsup]
└──╼ /etc/init.d/importparcoursup start
-bash: /etc/init.d/importparcoursup: Permission non accordée

┌─[✗]─[root@prodsb01:/var/apps/importsup]
└──╼ sudo /etc/init.d/importparcoursup start
-bash: sudo : commande introuvable


Some more try today:



┌─[root@prodsb01:/var/apps/importsup]
└──╼ ls -l /etc/init.d/
total 92
-rwxr-xr-x 1 root root 1232 avril 7 2017 console-setup.sh
-rwxr-xr-x 1 root root 3049 mai 4 2015 cron
-rwxr-xr-x 1 root root 2813 mars 2 2018 dbus
-rwxr-xr-x 1 root root 6697 avril 18 2017 fail2ban
-rwxr-xr-x 1 root root 3809 mars 22 2017 hwclock.sh
lrwxrwxrwx 1 root root 40 nov. 12 15:34 importparcoursup -> /var/apps/importsup/importparcoursup.jar
-rwxr-xr-x 1 root root 2448 déc. 31 2016 irqbalance
-rwxr-xr-x 1 root root 1479 mai 19 2016 keyboard-setup.sh
-rwxr-xr-x 1 root root 2044 déc. 26 2016 kmod
-rwxr-xr-x 1 root root 4597 sept. 17 2016 networking
-rwxr-xr-x 1 root root 1846 juil. 25 2017 open-vm-tools
-rwxr-xr-x 1 root root 3624 févr. 23 2018 postfix
-rwxr-xr-x 1 root root 1191 nov. 22 2016 procps
-rwxr-xr-x 1 root root 4355 déc. 10 2017 rsync
-rwxr-xr-x 1 root root 2868 janv. 19 2017 rsyslog
-rwxr-xr-x 1 root root 2578 juin 20 2016 snmpd
-rwxr-xr-x 1 root root 4033 mars 1 2018 ssh
-rwxr-xr-x 1 root root 6087 juil. 6 2017 udev
-rwxr-xr-x 1 root root 1391 mai 6 2017 unattended-upgrades
-rwxr-xr-x 1 root root 2757 nov. 23 2016 x11-common
┌─[root@prodsb01:/var/apps/importsup]
└──╼ service importparcoursup start
Failed to start importparcoursup.service: Unit importparcoursup.service not found.









share|improve this question




























    1














    I follow this doc: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#deployment-initd-service



    My app repo:



    └──╼ ls -l
    total 67556
    -rw-r--r-- 1 root root 1842 nov. 7 15:06 application.yml
    -rw-r--r-- 1 root root 69169161 nov. 12 07:50 importparcoursup.jar
    ┌─[root@prodsb01:/var/apps/importsup]


    ln creation:



    ln -s /var/apps/importsup/importparcoursup.jar /etc/init.d/importparcoursup


    service start error:



    ┌─[✗]─[root@prodsb01:/var/apps/importsup]
    └──╼ service importparcoursup start
    Failed to start importparcoursup.service: Unit importparcoursup.service not found.


    Is there something I forgot here ?



    Here is some more commands I tried:



    ┌─[✗]─[root@prodsb01:/var/apps/importsup]
    └──╼ /etc/init.d/importparcoursup start
    -bash: /etc/init.d/importparcoursup: Permission non accordée

    ┌─[✗]─[root@prodsb01:/var/apps/importsup]
    └──╼ sudo /etc/init.d/importparcoursup start
    -bash: sudo : commande introuvable


    Some more try today:



    ┌─[root@prodsb01:/var/apps/importsup]
    └──╼ ls -l /etc/init.d/
    total 92
    -rwxr-xr-x 1 root root 1232 avril 7 2017 console-setup.sh
    -rwxr-xr-x 1 root root 3049 mai 4 2015 cron
    -rwxr-xr-x 1 root root 2813 mars 2 2018 dbus
    -rwxr-xr-x 1 root root 6697 avril 18 2017 fail2ban
    -rwxr-xr-x 1 root root 3809 mars 22 2017 hwclock.sh
    lrwxrwxrwx 1 root root 40 nov. 12 15:34 importparcoursup -> /var/apps/importsup/importparcoursup.jar
    -rwxr-xr-x 1 root root 2448 déc. 31 2016 irqbalance
    -rwxr-xr-x 1 root root 1479 mai 19 2016 keyboard-setup.sh
    -rwxr-xr-x 1 root root 2044 déc. 26 2016 kmod
    -rwxr-xr-x 1 root root 4597 sept. 17 2016 networking
    -rwxr-xr-x 1 root root 1846 juil. 25 2017 open-vm-tools
    -rwxr-xr-x 1 root root 3624 févr. 23 2018 postfix
    -rwxr-xr-x 1 root root 1191 nov. 22 2016 procps
    -rwxr-xr-x 1 root root 4355 déc. 10 2017 rsync
    -rwxr-xr-x 1 root root 2868 janv. 19 2017 rsyslog
    -rwxr-xr-x 1 root root 2578 juin 20 2016 snmpd
    -rwxr-xr-x 1 root root 4033 mars 1 2018 ssh
    -rwxr-xr-x 1 root root 6087 juil. 6 2017 udev
    -rwxr-xr-x 1 root root 1391 mai 6 2017 unattended-upgrades
    -rwxr-xr-x 1 root root 2757 nov. 23 2016 x11-common
    ┌─[root@prodsb01:/var/apps/importsup]
    └──╼ service importparcoursup start
    Failed to start importparcoursup.service: Unit importparcoursup.service not found.









    share|improve this question


























      1












      1








      1


      1





      I follow this doc: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#deployment-initd-service



      My app repo:



      └──╼ ls -l
      total 67556
      -rw-r--r-- 1 root root 1842 nov. 7 15:06 application.yml
      -rw-r--r-- 1 root root 69169161 nov. 12 07:50 importparcoursup.jar
      ┌─[root@prodsb01:/var/apps/importsup]


      ln creation:



      ln -s /var/apps/importsup/importparcoursup.jar /etc/init.d/importparcoursup


      service start error:



      ┌─[✗]─[root@prodsb01:/var/apps/importsup]
      └──╼ service importparcoursup start
      Failed to start importparcoursup.service: Unit importparcoursup.service not found.


      Is there something I forgot here ?



      Here is some more commands I tried:



      ┌─[✗]─[root@prodsb01:/var/apps/importsup]
      └──╼ /etc/init.d/importparcoursup start
      -bash: /etc/init.d/importparcoursup: Permission non accordée

      ┌─[✗]─[root@prodsb01:/var/apps/importsup]
      └──╼ sudo /etc/init.d/importparcoursup start
      -bash: sudo : commande introuvable


      Some more try today:



      ┌─[root@prodsb01:/var/apps/importsup]
      └──╼ ls -l /etc/init.d/
      total 92
      -rwxr-xr-x 1 root root 1232 avril 7 2017 console-setup.sh
      -rwxr-xr-x 1 root root 3049 mai 4 2015 cron
      -rwxr-xr-x 1 root root 2813 mars 2 2018 dbus
      -rwxr-xr-x 1 root root 6697 avril 18 2017 fail2ban
      -rwxr-xr-x 1 root root 3809 mars 22 2017 hwclock.sh
      lrwxrwxrwx 1 root root 40 nov. 12 15:34 importparcoursup -> /var/apps/importsup/importparcoursup.jar
      -rwxr-xr-x 1 root root 2448 déc. 31 2016 irqbalance
      -rwxr-xr-x 1 root root 1479 mai 19 2016 keyboard-setup.sh
      -rwxr-xr-x 1 root root 2044 déc. 26 2016 kmod
      -rwxr-xr-x 1 root root 4597 sept. 17 2016 networking
      -rwxr-xr-x 1 root root 1846 juil. 25 2017 open-vm-tools
      -rwxr-xr-x 1 root root 3624 févr. 23 2018 postfix
      -rwxr-xr-x 1 root root 1191 nov. 22 2016 procps
      -rwxr-xr-x 1 root root 4355 déc. 10 2017 rsync
      -rwxr-xr-x 1 root root 2868 janv. 19 2017 rsyslog
      -rwxr-xr-x 1 root root 2578 juin 20 2016 snmpd
      -rwxr-xr-x 1 root root 4033 mars 1 2018 ssh
      -rwxr-xr-x 1 root root 6087 juil. 6 2017 udev
      -rwxr-xr-x 1 root root 1391 mai 6 2017 unattended-upgrades
      -rwxr-xr-x 1 root root 2757 nov. 23 2016 x11-common
      ┌─[root@prodsb01:/var/apps/importsup]
      └──╼ service importparcoursup start
      Failed to start importparcoursup.service: Unit importparcoursup.service not found.









      share|improve this question















      I follow this doc: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#deployment-initd-service



      My app repo:



      └──╼ ls -l
      total 67556
      -rw-r--r-- 1 root root 1842 nov. 7 15:06 application.yml
      -rw-r--r-- 1 root root 69169161 nov. 12 07:50 importparcoursup.jar
      ┌─[root@prodsb01:/var/apps/importsup]


      ln creation:



      ln -s /var/apps/importsup/importparcoursup.jar /etc/init.d/importparcoursup


      service start error:



      ┌─[✗]─[root@prodsb01:/var/apps/importsup]
      └──╼ service importparcoursup start
      Failed to start importparcoursup.service: Unit importparcoursup.service not found.


      Is there something I forgot here ?



      Here is some more commands I tried:



      ┌─[✗]─[root@prodsb01:/var/apps/importsup]
      └──╼ /etc/init.d/importparcoursup start
      -bash: /etc/init.d/importparcoursup: Permission non accordée

      ┌─[✗]─[root@prodsb01:/var/apps/importsup]
      └──╼ sudo /etc/init.d/importparcoursup start
      -bash: sudo : commande introuvable


      Some more try today:



      ┌─[root@prodsb01:/var/apps/importsup]
      └──╼ ls -l /etc/init.d/
      total 92
      -rwxr-xr-x 1 root root 1232 avril 7 2017 console-setup.sh
      -rwxr-xr-x 1 root root 3049 mai 4 2015 cron
      -rwxr-xr-x 1 root root 2813 mars 2 2018 dbus
      -rwxr-xr-x 1 root root 6697 avril 18 2017 fail2ban
      -rwxr-xr-x 1 root root 3809 mars 22 2017 hwclock.sh
      lrwxrwxrwx 1 root root 40 nov. 12 15:34 importparcoursup -> /var/apps/importsup/importparcoursup.jar
      -rwxr-xr-x 1 root root 2448 déc. 31 2016 irqbalance
      -rwxr-xr-x 1 root root 1479 mai 19 2016 keyboard-setup.sh
      -rwxr-xr-x 1 root root 2044 déc. 26 2016 kmod
      -rwxr-xr-x 1 root root 4597 sept. 17 2016 networking
      -rwxr-xr-x 1 root root 1846 juil. 25 2017 open-vm-tools
      -rwxr-xr-x 1 root root 3624 févr. 23 2018 postfix
      -rwxr-xr-x 1 root root 1191 nov. 22 2016 procps
      -rwxr-xr-x 1 root root 4355 déc. 10 2017 rsync
      -rwxr-xr-x 1 root root 2868 janv. 19 2017 rsyslog
      -rwxr-xr-x 1 root root 2578 juin 20 2016 snmpd
      -rwxr-xr-x 1 root root 4033 mars 1 2018 ssh
      -rwxr-xr-x 1 root root 6087 juil. 6 2017 udev
      -rwxr-xr-x 1 root root 1391 mai 6 2017 unattended-upgrades
      -rwxr-xr-x 1 root root 2757 nov. 23 2016 x11-common
      ┌─[root@prodsb01:/var/apps/importsup]
      └──╼ service importparcoursup start
      Failed to start importparcoursup.service: Unit importparcoursup.service not found.






      java linux spring-boot debian init.d






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 12 '18 at 23:23

























      asked Nov 11 '18 at 21:08









      Tyvain

      78631130




      78631130






















          2 Answers
          2






          active

          oldest

          votes


















          0














          try chmod +x /var/apps/importsup/importparcoursup.jar to make the file executable.






          share|improve this answer




















          • ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ chmod +x /var/apps/importsup/importparcoursup.jar ┌─[root@prodsb01:/var/apps/importsup] └──╼ service importparcoursup start Failed to start importparcoursup.service: Unit importparcoursup.service not found. ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ sudo /etc/init.d/importparcoursup start -bash: sudo : commande introuvable ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ /etc/init.d/importparcoursup start -bash: /etc/init.d/importparcoursup : impossible d'exécuter le fichier binaire : Erreur de format pour exec()
            – Tyvain
            Nov 12 '18 at 1:32










          • If I launch directly the jar ./importparcoursup.jar : it works, so the jar is executable
            – Tyvain
            Nov 12 '18 at 23:24


















          0














          For some reason, I needed to reboot the server. Now everything works.






          share|improve this answer




















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53253253%2fdebian-execute-springboot-app-as-service-service-not-found%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            try chmod +x /var/apps/importsup/importparcoursup.jar to make the file executable.






            share|improve this answer




















            • ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ chmod +x /var/apps/importsup/importparcoursup.jar ┌─[root@prodsb01:/var/apps/importsup] └──╼ service importparcoursup start Failed to start importparcoursup.service: Unit importparcoursup.service not found. ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ sudo /etc/init.d/importparcoursup start -bash: sudo : commande introuvable ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ /etc/init.d/importparcoursup start -bash: /etc/init.d/importparcoursup : impossible d'exécuter le fichier binaire : Erreur de format pour exec()
              – Tyvain
              Nov 12 '18 at 1:32










            • If I launch directly the jar ./importparcoursup.jar : it works, so the jar is executable
              – Tyvain
              Nov 12 '18 at 23:24















            0














            try chmod +x /var/apps/importsup/importparcoursup.jar to make the file executable.






            share|improve this answer




















            • ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ chmod +x /var/apps/importsup/importparcoursup.jar ┌─[root@prodsb01:/var/apps/importsup] └──╼ service importparcoursup start Failed to start importparcoursup.service: Unit importparcoursup.service not found. ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ sudo /etc/init.d/importparcoursup start -bash: sudo : commande introuvable ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ /etc/init.d/importparcoursup start -bash: /etc/init.d/importparcoursup : impossible d'exécuter le fichier binaire : Erreur de format pour exec()
              – Tyvain
              Nov 12 '18 at 1:32










            • If I launch directly the jar ./importparcoursup.jar : it works, so the jar is executable
              – Tyvain
              Nov 12 '18 at 23:24













            0












            0








            0






            try chmod +x /var/apps/importsup/importparcoursup.jar to make the file executable.






            share|improve this answer












            try chmod +x /var/apps/importsup/importparcoursup.jar to make the file executable.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 12 '18 at 0:37









            Uku Loskit

            30.2k86879




            30.2k86879











            • ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ chmod +x /var/apps/importsup/importparcoursup.jar ┌─[root@prodsb01:/var/apps/importsup] └──╼ service importparcoursup start Failed to start importparcoursup.service: Unit importparcoursup.service not found. ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ sudo /etc/init.d/importparcoursup start -bash: sudo : commande introuvable ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ /etc/init.d/importparcoursup start -bash: /etc/init.d/importparcoursup : impossible d'exécuter le fichier binaire : Erreur de format pour exec()
              – Tyvain
              Nov 12 '18 at 1:32










            • If I launch directly the jar ./importparcoursup.jar : it works, so the jar is executable
              – Tyvain
              Nov 12 '18 at 23:24
















            • ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ chmod +x /var/apps/importsup/importparcoursup.jar ┌─[root@prodsb01:/var/apps/importsup] └──╼ service importparcoursup start Failed to start importparcoursup.service: Unit importparcoursup.service not found. ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ sudo /etc/init.d/importparcoursup start -bash: sudo : commande introuvable ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ /etc/init.d/importparcoursup start -bash: /etc/init.d/importparcoursup : impossible d'exécuter le fichier binaire : Erreur de format pour exec()
              – Tyvain
              Nov 12 '18 at 1:32










            • If I launch directly the jar ./importparcoursup.jar : it works, so the jar is executable
              – Tyvain
              Nov 12 '18 at 23:24















            ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ chmod +x /var/apps/importsup/importparcoursup.jar ┌─[root@prodsb01:/var/apps/importsup] └──╼ service importparcoursup start Failed to start importparcoursup.service: Unit importparcoursup.service not found. ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ sudo /etc/init.d/importparcoursup start -bash: sudo : commande introuvable ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ /etc/init.d/importparcoursup start -bash: /etc/init.d/importparcoursup : impossible d'exécuter le fichier binaire : Erreur de format pour exec()
            – Tyvain
            Nov 12 '18 at 1:32




            ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ chmod +x /var/apps/importsup/importparcoursup.jar ┌─[root@prodsb01:/var/apps/importsup] └──╼ service importparcoursup start Failed to start importparcoursup.service: Unit importparcoursup.service not found. ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ sudo /etc/init.d/importparcoursup start -bash: sudo : commande introuvable ┌─[✗]─[root@prodsb01:/var/apps/importsup] └──╼ /etc/init.d/importparcoursup start -bash: /etc/init.d/importparcoursup : impossible d'exécuter le fichier binaire : Erreur de format pour exec()
            – Tyvain
            Nov 12 '18 at 1:32












            If I launch directly the jar ./importparcoursup.jar : it works, so the jar is executable
            – Tyvain
            Nov 12 '18 at 23:24




            If I launch directly the jar ./importparcoursup.jar : it works, so the jar is executable
            – Tyvain
            Nov 12 '18 at 23:24













            0














            For some reason, I needed to reboot the server. Now everything works.






            share|improve this answer

























              0














              For some reason, I needed to reboot the server. Now everything works.






              share|improve this answer























                0












                0








                0






                For some reason, I needed to reboot the server. Now everything works.






                share|improve this answer












                For some reason, I needed to reboot the server. Now everything works.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 13 '18 at 2:38









                Tyvain

                78631130




                78631130



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53253253%2fdebian-execute-springboot-app-as-service-service-not-found%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

                    Syphilis

                    Darth Vader #20