Re: Tomcat - different users for different instances?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 22 Sep 2017 3:57 am, "Bill Shirley" <bshirley@xxxxxxxxxxxxxxxxx> wrote:
Have you looked at overriding it in the systemd unit file?

I use this for mariadb (/etc/systemd/system/mariadb.service):
.include /usr/lib/systemd/system/mariadb.service

[Service]
#LimitNOFILE=infinity
LimitNOFILE=65536
LimitMEMLOCK=infinity

Bill


On 9/21/2017 6:55 PM, Peter Boy wrote:
When Fedora used systemV init you could define a specific user for a specific tomcat instance in /etc/systconfig/tomcat-[myinstance] by adding a line TOMCAT_USER=„mytomcat“.

In Fedora 26 with systemd you can define different Tomcat instances but the above mechanism doesn’t work anymore. I checked the starter script and couldn’t identify a way to define an instance specific user.

Well, does anybody know how I can achieve this?


My issue is: If my instances are all executing as the same user I get sometimes an „Too many open files“ error message and the instance stops executing. In RHEL it helps to define separate users per instance. The other instances were not affected by the broken one.



Thanks
Peter


_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@lists.fedoraproject.org


_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@lists.fedoraproject.org


Small side note... don't use .include as it's not recommended and long since deprecated. 

Use a systemd unit override which is the supported way of handling it. 

mkdir /etc/systemd/system/mariadb.service.d

Pop a .conf file in there with the directives you want to override. 

If you do 'systemctl edit <unit_name>' that's how it organises things. 

Back to the question of the OP ... sounds like you are in the perfect area of requirements for a unit template with each tomcat instance from the template and override User in each to make them different and individually controllable. 
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux