jts linux service fails
Accepted answer
3 other answers
[Service] ExecStart=<%= @jtsPath %>/server/server.startup ExecStop=<%= @jtsPath %>/server/server.shutdown Type=forking PIDFile=<%= @jtsPath %>/server/liberty/servers/.pid/clm.pid User=vagrant Group=vagrant WorkingDirectory=<%= @jtsPath %>/server LimitNOFILE=65535:65535 LimitNPROC=10000:10000
Comments
(This is a template that vagrant chef populates, replacing jtsPath with the actual deployment path. Don't just copy the text above and expect that systemd will do anything with text like "<%= @someVar %>".)
Thanks the info. i am using chef as well.
I can share parts of it but the entire "menu" of recipes is a Sodius service as product. For example, I have a public recipe to set up a DB2 server so that it is Jazz-ready but configuration of Jazz with DB2 is a product, not open source.
Here's the little routine chef template resource use that uses the above template to make a systemd service for a deployed JTS environment. (Getting to that deployed JTS environment takes a few more recipes and tearing of hair.)
template "systemd jts" do
action :create
source "systemd_jts.erb"path Pathname( '/etc' ).join( 'systemd' ).join('system').join( "jts.service" ).to_s
owner "root"group "root"mode "0644"
variables :timestamp => DateTime.now(),:jtsPath => jtsPath.to_s
end
Thanks. I will check it soon.
Good to know. Where can I find more info about Sodius product?
You will likely want a chef "service" resource later in your recipe that starts this JTS service through the systemd methods. I am using:
service "jts" do
provider Chef::Provider::Service::Systemd
action :start
start_command "systemctl start jts"stop_command "systemctl stop jts"
supports :restart => false, :reload => false, :status => truepattern jtsPath.join( 'server' ).join('jre' ).join( 'bin' ).join( 'java' ).to_s
only_if { jtsPath.join( 'server' ).join('jre' ).join( 'bin' ).join( 'java' ).exist?() }
end
Because I tell it which provider, it may no longer be necessary to tell it the start and stop commands; the Systemd provider SHOULD know how systemctl works.
Thanks Lonnie. Seems like a great job on your part.
Comments
Liora Milbaum
Aug 21 '15, 4:09 p.m.Running server.startup as a root doesn't produce the errors