systemd service startup script worked in 16.04 but throws an error in 18.04

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












I have the following jenkins-agent.service file placed in /etc/systemd/system/:



[Unit]
Description=Jenkins agent
Requires=network-online.target
After=network-online.target

[Service]
ExecStart=/usr/bin/java -jar /home/jenkins/jenkins/Agent/agent.jar -jnlpUrl http://my.jenkins.server.com:8087/jenkins/computer/Ubuntu%2064-bit/slave-agent.jnlp -secret d1ac22621ad4c460e5f8de4f564345fa7cdb2bea1d26b6f17230451a37a08e7e -workDir "/home/jenkins/jenkins"
Restart=always

[Install]
Wants=network-online.target
WantedBy=multi-user.target


It's registered with systemd and worked perfectly to start the Jenkins agent process on system boot. But I've just updated to 18.04, and now this script throws a syntax error:



systemd-analyze verify /etc/systemd/system/jenkins-agent.service
File /lib/systemd/system/systemd-journald.service:36 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
/etc/systemd/system/jenkins-agent.service:7: Failed to resolve unit specifiers on http://my.jenkins.sever.com:8087/jenkins/computer/Ubuntu%2064-bit/slave-agent.jnlp: Invalid slot
jenkins-agent.service: Failed to create jenkins-agent.service/start: Unit jenkins-agent.service is not loaded properly: Exec format error.
Attempted to remove disk file system, and we can't allow that.


How can this be fixed? I don't understand what's wrong.
It says the problem is with the Unit section, so I've checked that /lib/systemd/system/network-online.target exists (it does).







share|improve this question


























    up vote
    1
    down vote

    favorite












    I have the following jenkins-agent.service file placed in /etc/systemd/system/:



    [Unit]
    Description=Jenkins agent
    Requires=network-online.target
    After=network-online.target

    [Service]
    ExecStart=/usr/bin/java -jar /home/jenkins/jenkins/Agent/agent.jar -jnlpUrl http://my.jenkins.server.com:8087/jenkins/computer/Ubuntu%2064-bit/slave-agent.jnlp -secret d1ac22621ad4c460e5f8de4f564345fa7cdb2bea1d26b6f17230451a37a08e7e -workDir "/home/jenkins/jenkins"
    Restart=always

    [Install]
    Wants=network-online.target
    WantedBy=multi-user.target


    It's registered with systemd and worked perfectly to start the Jenkins agent process on system boot. But I've just updated to 18.04, and now this script throws a syntax error:



    systemd-analyze verify /etc/systemd/system/jenkins-agent.service
    File /lib/systemd/system/systemd-journald.service:36 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
    Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
    /etc/systemd/system/jenkins-agent.service:7: Failed to resolve unit specifiers on http://my.jenkins.sever.com:8087/jenkins/computer/Ubuntu%2064-bit/slave-agent.jnlp: Invalid slot
    jenkins-agent.service: Failed to create jenkins-agent.service/start: Unit jenkins-agent.service is not loaded properly: Exec format error.
    Attempted to remove disk file system, and we can't allow that.


    How can this be fixed? I don't understand what's wrong.
    It says the problem is with the Unit section, so I've checked that /lib/systemd/system/network-online.target exists (it does).







    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have the following jenkins-agent.service file placed in /etc/systemd/system/:



      [Unit]
      Description=Jenkins agent
      Requires=network-online.target
      After=network-online.target

      [Service]
      ExecStart=/usr/bin/java -jar /home/jenkins/jenkins/Agent/agent.jar -jnlpUrl http://my.jenkins.server.com:8087/jenkins/computer/Ubuntu%2064-bit/slave-agent.jnlp -secret d1ac22621ad4c460e5f8de4f564345fa7cdb2bea1d26b6f17230451a37a08e7e -workDir "/home/jenkins/jenkins"
      Restart=always

      [Install]
      Wants=network-online.target
      WantedBy=multi-user.target


      It's registered with systemd and worked perfectly to start the Jenkins agent process on system boot. But I've just updated to 18.04, and now this script throws a syntax error:



      systemd-analyze verify /etc/systemd/system/jenkins-agent.service
      File /lib/systemd/system/systemd-journald.service:36 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
      Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
      /etc/systemd/system/jenkins-agent.service:7: Failed to resolve unit specifiers on http://my.jenkins.sever.com:8087/jenkins/computer/Ubuntu%2064-bit/slave-agent.jnlp: Invalid slot
      jenkins-agent.service: Failed to create jenkins-agent.service/start: Unit jenkins-agent.service is not loaded properly: Exec format error.
      Attempted to remove disk file system, and we can't allow that.


      How can this be fixed? I don't understand what's wrong.
      It says the problem is with the Unit section, so I've checked that /lib/systemd/system/network-online.target exists (it does).







      share|improve this question














      I have the following jenkins-agent.service file placed in /etc/systemd/system/:



      [Unit]
      Description=Jenkins agent
      Requires=network-online.target
      After=network-online.target

      [Service]
      ExecStart=/usr/bin/java -jar /home/jenkins/jenkins/Agent/agent.jar -jnlpUrl http://my.jenkins.server.com:8087/jenkins/computer/Ubuntu%2064-bit/slave-agent.jnlp -secret d1ac22621ad4c460e5f8de4f564345fa7cdb2bea1d26b6f17230451a37a08e7e -workDir "/home/jenkins/jenkins"
      Restart=always

      [Install]
      Wants=network-online.target
      WantedBy=multi-user.target


      It's registered with systemd and worked perfectly to start the Jenkins agent process on system boot. But I've just updated to 18.04, and now this script throws a syntax error:



      systemd-analyze verify /etc/systemd/system/jenkins-agent.service
      File /lib/systemd/system/systemd-journald.service:36 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
      Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
      /etc/systemd/system/jenkins-agent.service:7: Failed to resolve unit specifiers on http://my.jenkins.sever.com:8087/jenkins/computer/Ubuntu%2064-bit/slave-agent.jnlp: Invalid slot
      jenkins-agent.service: Failed to create jenkins-agent.service/start: Unit jenkins-agent.service is not loaded properly: Exec format error.
      Attempted to remove disk file system, and we can't allow that.


      How can this be fixed? I don't understand what's wrong.
      It says the problem is with the Unit section, so I've checked that /lib/systemd/system/network-online.target exists (it does).









      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 27 at 18:20

























      asked Apr 27 at 18:14









      Violet Giraffe

      146313




      146313




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          The problem is the use of % in here:



          .../Ubuntu%2064-bit/...
          # ^


          SystemD uses % as the keyword for various internal format specifiers, and in ExecStart (and brothers) those format specifiers can be used for dynamic replacement of values. As it can't interpret %2 as a proper specifier, you are getting:



          Exec format error


          You need to escape the % with another %:



          .../Ubuntu%%2064-bit/...





          share|improve this answer




















          • So simple! Thanks a lot.
            – Violet Giraffe
            Apr 27 at 18:27










          • @VioletGiraffe Anytime!
            – heemayl
            Apr 27 at 18:27










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          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',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028898%2fsystemd-service-startup-script-worked-in-16-04-but-throws-an-error-in-18-04%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          The problem is the use of % in here:



          .../Ubuntu%2064-bit/...
          # ^


          SystemD uses % as the keyword for various internal format specifiers, and in ExecStart (and brothers) those format specifiers can be used for dynamic replacement of values. As it can't interpret %2 as a proper specifier, you are getting:



          Exec format error


          You need to escape the % with another %:



          .../Ubuntu%%2064-bit/...





          share|improve this answer




















          • So simple! Thanks a lot.
            – Violet Giraffe
            Apr 27 at 18:27










          • @VioletGiraffe Anytime!
            – heemayl
            Apr 27 at 18:27














          up vote
          2
          down vote



          accepted










          The problem is the use of % in here:



          .../Ubuntu%2064-bit/...
          # ^


          SystemD uses % as the keyword for various internal format specifiers, and in ExecStart (and brothers) those format specifiers can be used for dynamic replacement of values. As it can't interpret %2 as a proper specifier, you are getting:



          Exec format error


          You need to escape the % with another %:



          .../Ubuntu%%2064-bit/...





          share|improve this answer




















          • So simple! Thanks a lot.
            – Violet Giraffe
            Apr 27 at 18:27










          • @VioletGiraffe Anytime!
            – heemayl
            Apr 27 at 18:27












          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          The problem is the use of % in here:



          .../Ubuntu%2064-bit/...
          # ^


          SystemD uses % as the keyword for various internal format specifiers, and in ExecStart (and brothers) those format specifiers can be used for dynamic replacement of values. As it can't interpret %2 as a proper specifier, you are getting:



          Exec format error


          You need to escape the % with another %:



          .../Ubuntu%%2064-bit/...





          share|improve this answer












          The problem is the use of % in here:



          .../Ubuntu%2064-bit/...
          # ^


          SystemD uses % as the keyword for various internal format specifiers, and in ExecStart (and brothers) those format specifiers can be used for dynamic replacement of values. As it can't interpret %2 as a proper specifier, you are getting:



          Exec format error


          You need to escape the % with another %:



          .../Ubuntu%%2064-bit/...






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 27 at 18:22









          heemayl

          63.9k8126202




          63.9k8126202











          • So simple! Thanks a lot.
            – Violet Giraffe
            Apr 27 at 18:27










          • @VioletGiraffe Anytime!
            – heemayl
            Apr 27 at 18:27
















          • So simple! Thanks a lot.
            – Violet Giraffe
            Apr 27 at 18:27










          • @VioletGiraffe Anytime!
            – heemayl
            Apr 27 at 18:27















          So simple! Thanks a lot.
          – Violet Giraffe
          Apr 27 at 18:27




          So simple! Thanks a lot.
          – Violet Giraffe
          Apr 27 at 18:27












          @VioletGiraffe Anytime!
          – heemayl
          Apr 27 at 18:27




          @VioletGiraffe Anytime!
          – heemayl
          Apr 27 at 18:27

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028898%2fsystemd-service-startup-script-worked-in-16-04-but-throws-an-error-in-18-04%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491