You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by He...@systema.com on 2022/07/07 14:21:36 UTC
Antwort: [Ext] Too Many Open Files error trying to start Artemis server from a SystemD service
Hello Richard
8k should be enough sockets. You must at least re-login or reboot to make
this active.
Did you verify with ulimit -n ? What did you get?
btw. After=network.target is sub-optimal.
After=network-online.target
is better.
Check this out
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
Best Regards
Herbert
Von: "Richard Bergmann" <RB...@colsa.com.INVALID>
An: "users@activemq.apache.org" <us...@activemq.apache.org>
Datum: 07.07.2022 16:10
Betreff: [Ext] Too Many Open Files error trying to start Artemis
server from a SystemD service
I have been struggling with the Too Many Open Files issue running Artemis
as a service within a service (if that is not confusing enough). My
/etc/security/limits.conf files contains:
-----
.
.
.
# End of file
* soft nofile 81920
* hard nofile 81920
-----
Originally it was set to 8192 and I was able to start the service from the
command line: /opt/artemis/bin/artemis-service start
When I did so and ran: lsof -p <artemis pid> | wc -l
it reported some 5K files open by the process, hence the reason it
wouldn't run with the default limit of 1024.
I then tried to start the SystemD service: sudo systemctl start artemis
using this in /etc/systemd/system/artemis.service:
-----
[Unit]
Description=ActiveMQ Artemis Service
After=network.target
[Service]
ExecStart=/opt/artemis/bin/artemis-service start
ExecStop=/opt/artemis/bin/artemis-service stop
Type=forking
User=<my id>
Group=<my group>
[Install]
WantedBy=multi-user.target
-----
and it failed with the Too Many Open Files error. So I increased it to
the 81920 shown above, rebooted, and I STILL get the Too Many Open Files
error.
Is there something special about the way services are started such that it
doesn't use /etc/security/limits.conf to determine the number of open
files allowed for a process?
Regards,
Rich Bergmann
________________________________
The information contained in this e-mail and any attachments from COLSA
Corporation may contain company sensitive and/or proprietary information,
and is intended only for the named recipient to whom it was originally
addressed. If you are not the intended recipient, any disclosure,
distribution, or copying of this e-mail or its attachments is strictly
prohibited. If you have received this e-mail in error, please notify the
sender immediately by return e-mail and permanently delete the e-mail and
any attachments.
COLSA Proprietary
Antwort: [Ext] Re: [External] - Antwort: [Ext] Too Many Open Files error trying to start Artemis server from a SystemD service
Posted by He...@systema.com.
on RHEL LimitNOFILE is definitely a good idea.
I do not have a user in the systemd service, so it runs under system
defaults, maybe that helps me out.
Von: "Richard Bergmann" <RB...@colsa.com.INVALID>
An: "users@activemq.apache.org" <us...@activemq.apache.org>
Datum: 07.07.2022 16:52
Betreff: [Ext] Re: [External] - Antwort: [Ext] Too Many Open Files
error trying to start Artemis server from a SystemD service
Yes, ulimit -n reports 81920.
________________________________
From: Herbert.Helmstreit@systema.com <He...@systema.com>
Sent: Thursday, July 7, 2022 10:21 AM
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: [External] - Antwort: [Ext] Too Many Open Files error trying to
start Artemis server from a SystemD service
CAUTION: This email originated from outside of the organization. Do not
click links or open attachments unless you recognize the sender and know
the content is safe.
Hello Richard
8k should be enough sockets. You must at least re-login or reboot to make
this active.
Did you verify with ulimit -n ? What did you get?
btw. After=network.target is sub-optimal.
After=network-online.target
is better.
Check this out
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/<
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fwww.freedesktop.org%2Fwiki%2FSoftware%2Fsystemd%2FNetworkTarget%2F&data=05%7C01%7CRBERGMANN%40colsa.com%7Cc096e7f544e14cc74a2c08da60241118%7C9821086b78824b43a5edb1e979bee31f%7C1%7C0%7C637928006067698160%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=JBD7f6FQvzRRxyk3p8dCJRJOwPTNdJHhcXThKtVH5V0%3D&reserved=0
>
Best Regards
Herbert
________________________________
Herbert Helmstreit
Dipl.-Phys.
Software Engineer
[SYSTEMA Logo]<
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fwww.systema.com%2F&data=05%7C01%7CRBERGMANN%40colsa.com%7Cc096e7f544e14cc74a2c08da60241118%7C9821086b78824b43a5edb1e979bee31f%7C1%7C0%7C637928006067698160%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=J8%2FypKJmI01tdDHelk4m1TEMIHDnV%2FMLMpja5K2nCqs%3D&reserved=0
>
Phone: +49 941 / 7 83 92 36
Fax: +49 351 / 88 24 772
Herbert.Helmstreit@systema.com<ma...@systema.com> |
www.systema.com<
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fwww.systema.com%2F&data=05%7C01%7CRBERGMANN%40colsa.com%7Cc096e7f544e14cc74a2c08da60241118%7C9821086b78824b43a5edb1e979bee31f%7C1%7C0%7C637928006067698160%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=J8%2FypKJmI01tdDHelk4m1TEMIHDnV%2FMLMpja5K2nCqs%3D&reserved=0
>
[LinkedIn]<
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fsystema-gmbh%2F&data=05%7C01%7CRBERGMANN%40colsa.com%7Cc096e7f544e14cc74a2c08da60241118%7C9821086b78824b43a5edb1e979bee31f%7C1%7C0%7C637928006067698160%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=e%2F%2BQlaPnLGBRHuugkY81AUdzNcQrytIdOt5wSOejmE4%3D&reserved=0
>[Facebook]<
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fde-de.facebook.com%2FSYSTEMA.automation%2F&data=05%7C01%7CRBERGMANN%40colsa.com%7Cc096e7f544e14cc74a2c08da60241118%7C9821086b78824b43a5edb1e979bee31f%7C1%7C0%7C637928006067698160%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=38bp0NDE45IrPTRuNUWoi7D3NNF2UaZb12Af1Vm4gAc%3D&reserved=0
>[XING]<
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fwww.xing.com%2Fpages%2Fsystemagmbh&data=05%7C01%7CRBERGMANN%40colsa.com%7Cc096e7f544e14cc74a2c08da60241118%7C9821086b78824b43a5edb1e979bee31f%7C1%7C0%7C637928006067698160%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=UDJfXXY9quG9lVsMWsGcrIKtWrTElaTe0SRiz%2Be0Jmg%3D&reserved=0
>
SYSTEMA Systementwicklung Dipl.-Inf. Manfred Austen GmbH
Schikanederstraße 2b - Posthof | 93053 Regensburg
HRB 11256 Amtsgericht Dresden | USt.-ID DE 159 607 786
Geschäftsführer: Manfred Austen, CEO und Dr. Ulf Martin, COO
Von: "Richard Bergmann" <RB...@colsa.com.INVALID>
An: "users@activemq.apache.org" <us...@activemq.apache.org>
Datum: 07.07.2022 16:10
Betreff: [Ext] Too Many Open Files error trying to start Artemis
server from a SystemD service
________________________________
I have been struggling with the Too Many Open Files issue running Artemis
as a service within a service (if that is not confusing enough). My
/etc/security/limits.conf files contains:
-----
.
.
.
# End of file
* soft nofile 81920
* hard nofile 81920
-----
Originally it was set to 8192 and I was able to start the service from the
command line: /opt/artemis/bin/artemis-service start
When I did so and ran: lsof -p <artemis pid> | wc -l
it reported some 5K files open by the process, hence the reason it
wouldn't run with the default limit of 1024.
I then tried to start the SystemD service: sudo systemctl start artemis
using this in /etc/systemd/system/artemis.service:
-----
[Unit]
Description=ActiveMQ Artemis Service
After=network.target
[Service]
ExecStart=/opt/artemis/bin/artemis-service start
ExecStop=/opt/artemis/bin/artemis-service stop
Type=forking
User=<my id>
Group=<my group>
[Install]
WantedBy=multi-user.target
-----
and it failed with the Too Many Open Files error. So I increased it to
the 81920 shown above, rebooted, and I STILL get the Too Many Open Files
error.
Is there something special about the way services are started such that it
doesn't use /etc/security/limits.conf to determine the number of open
files allowed for a process?
Regards,
Rich Bergmann
________________________________
The information contained in this e-mail and any attachments from COLSA
Corporation may contain company sensitive and/or proprietary information,
and is intended only for the named recipient to whom it was originally
addressed. If you are not the intended recipient, any disclosure,
distribution, or copying of this e-mail or its attachments is strictly
prohibited. If you have received this e-mail in error, please notify the
sender immediately by return e-mail and permanently delete the e-mail and
any attachments.
COLSA Proprietary
________________________________
The information contained in this e-mail and any attachments from COLSA
Corporation may contain company sensitive and/or proprietary information,
and is intended only for the named recipient to whom it was originally
addressed. If you are not the intended recipient, any disclosure,
distribution, or copying of this e-mail or its attachments is strictly
prohibited. If you have received this e-mail in error, please notify the
sender immediately by return e-mail and permanently delete the e-mail and
any attachments.
Re: [External] - Antwort: [Ext] Too Many Open Files error trying to start Artemis server from a SystemD service
Posted by Richard Bergmann <RB...@colsa.com.INVALID>.
Yes, ulimit -n reports 81920.
________________________________
From: Herbert.Helmstreit@systema.com <He...@systema.com>
Sent: Thursday, July 7, 2022 10:21 AM
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: [External] - Antwort: [Ext] Too Many Open Files error trying to start Artemis server from a SystemD service
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hello Richard
8k should be enough sockets. You must at least re-login or reboot to make this active.
Did you verify with ulimit -n ? What did you get?
btw. After=network.target is sub-optimal.
After=network-online.target
is better.
Check this out https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fwww.freedesktop.org%2Fwiki%2FSoftware%2Fsystemd%2FNetworkTarget%2F&data=05%7C01%7CRBERGMANN%40colsa.com%7Cc096e7f544e14cc74a2c08da60241118%7C9821086b78824b43a5edb1e979bee31f%7C1%7C0%7C637928006067698160%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=JBD7f6FQvzRRxyk3p8dCJRJOwPTNdJHhcXThKtVH5V0%3D&reserved=0>
Best Regards
Herbert
________________________________
Herbert Helmstreit
Dipl.-Phys.
Software Engineer
[SYSTEMA Logo]<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fwww.systema.com%2F&data=05%7C01%7CRBERGMANN%40colsa.com%7Cc096e7f544e14cc74a2c08da60241118%7C9821086b78824b43a5edb1e979bee31f%7C1%7C0%7C637928006067698160%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=J8%2FypKJmI01tdDHelk4m1TEMIHDnV%2FMLMpja5K2nCqs%3D&reserved=0>
Phone: +49 941 / 7 83 92 36
Fax: +49 351 / 88 24 772
Herbert.Helmstreit@systema.com<ma...@systema.com> | www.systema.com<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fwww.systema.com%2F&data=05%7C01%7CRBERGMANN%40colsa.com%7Cc096e7f544e14cc74a2c08da60241118%7C9821086b78824b43a5edb1e979bee31f%7C1%7C0%7C637928006067698160%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=J8%2FypKJmI01tdDHelk4m1TEMIHDnV%2FMLMpja5K2nCqs%3D&reserved=0>
[LinkedIn]<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fsystema-gmbh%2F&data=05%7C01%7CRBERGMANN%40colsa.com%7Cc096e7f544e14cc74a2c08da60241118%7C9821086b78824b43a5edb1e979bee31f%7C1%7C0%7C637928006067698160%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=e%2F%2BQlaPnLGBRHuugkY81AUdzNcQrytIdOt5wSOejmE4%3D&reserved=0>[Facebook]<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fde-de.facebook.com%2FSYSTEMA.automation%2F&data=05%7C01%7CRBERGMANN%40colsa.com%7Cc096e7f544e14cc74a2c08da60241118%7C9821086b78824b43a5edb1e979bee31f%7C1%7C0%7C637928006067698160%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=38bp0NDE45IrPTRuNUWoi7D3NNF2UaZb12Af1Vm4gAc%3D&reserved=0>[XING]<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fwww.xing.com%2Fpages%2Fsystemagmbh&data=05%7C01%7CRBERGMANN%40colsa.com%7Cc096e7f544e14cc74a2c08da60241118%7C9821086b78824b43a5edb1e979bee31f%7C1%7C0%7C637928006067698160%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=UDJfXXY9quG9lVsMWsGcrIKtWrTElaTe0SRiz%2Be0Jmg%3D&reserved=0>
SYSTEMA Systementwicklung Dipl.-Inf. Manfred Austen GmbH
Schikanederstraße 2b - Posthof | 93053 Regensburg
HRB 11256 Amtsgericht Dresden | USt.-ID DE 159 607 786
Geschäftsführer: Manfred Austen, CEO und Dr. Ulf Martin, COO
Von: "Richard Bergmann" <RB...@colsa.com.INVALID>
An: "users@activemq.apache.org" <us...@activemq.apache.org>
Datum: 07.07.2022 16:10
Betreff: [Ext] Too Many Open Files error trying to start Artemis server from a SystemD service
________________________________
I have been struggling with the Too Many Open Files issue running Artemis as a service within a service (if that is not confusing enough). My /etc/security/limits.conf files contains:
-----
.
.
.
# End of file
* soft nofile 81920
* hard nofile 81920
-----
Originally it was set to 8192 and I was able to start the service from the command line: /opt/artemis/bin/artemis-service start
When I did so and ran: lsof -p <artemis pid> | wc -l
it reported some 5K files open by the process, hence the reason it wouldn't run with the default limit of 1024.
I then tried to start the SystemD service: sudo systemctl start artemis
using this in /etc/systemd/system/artemis.service:
-----
[Unit]
Description=ActiveMQ Artemis Service
After=network.target
[Service]
ExecStart=/opt/artemis/bin/artemis-service start
ExecStop=/opt/artemis/bin/artemis-service stop
Type=forking
User=<my id>
Group=<my group>
[Install]
WantedBy=multi-user.target
-----
and it failed with the Too Many Open Files error. So I increased it to the 81920 shown above, rebooted, and I STILL get the Too Many Open Files error.
Is there something special about the way services are started such that it doesn't use /etc/security/limits.conf to determine the number of open files allowed for a process?
Regards,
Rich Bergmann
________________________________
The information contained in this e-mail and any attachments from COLSA Corporation may contain company sensitive and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments.
COLSA Proprietary
________________________________
The information contained in this e-mail and any attachments from COLSA Corporation may contain company sensitive and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments.