systemd service startup script worked in 16.04 but throws an error in 18.04
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).
systemd 18.04
add a comment |Â
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).
systemd 18.04
add a comment |Â
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).
systemd 18.04
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).
systemd 18.04
edited Apr 27 at 18:20
asked Apr 27 at 18:14
Violet Giraffe
146313
146313
add a comment |Â
add a comment |Â
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/...
So simple! Thanks a lot.
â Violet Giraffe
Apr 27 at 18:27
@VioletGiraffe Anytime!
â heemayl
Apr 27 at 18:27
add a comment |Â
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/...
So simple! Thanks a lot.
â Violet Giraffe
Apr 27 at 18:27
@VioletGiraffe Anytime!
â heemayl
Apr 27 at 18:27
add a comment |Â
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/...
So simple! Thanks a lot.
â Violet Giraffe
Apr 27 at 18:27
@VioletGiraffe Anytime!
â heemayl
Apr 27 at 18:27
add a comment |Â
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/...
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/...
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
add a comment |Â
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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password