Could not get endpoint for worker=ajp13_worker

We have some real performance issues and our application is not very reliable in the afternoon and after some restarts I found this errormessage in the mod_jk.log:

[warn] ajp_get_endpoint::jk_ajp_common.c (3372): Unable to get the free endpoint for worker ajp13_worker from 25 slots
[error] jk_handler::mod_jk.c (2932): Could not get endpoint for worker=ajp13_worker
[info] jk_handler::mod_jk.c (2995): Service error=0 for worker=ajp13_worker

workers.properties:

worker.ajp13_worker.port=8009
worker.ajp13_worker.host=127.0.0.1
worker.ajp13_worker.type=ajp13
worker.ajp13.socket_keepalive=1

(socket_keepalive is fresh and makes no differences)

tomcat/server.xml:

    <Connector port="8888" protocol="HTTP/1.1"
               connectionTimeout="20000"
               address="127.0.0.1"
               redirectPort="8443" />
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" address="127.0.0.1" redirectPort="8443" secretRequired="false" />

apache2/sites-enabled/project.conf:

<VirtualHost *:443>
...
    JkMount /*.cfm ajp13_worker
    JkMount /*.cfc ajp13_worker
    JkMount /*.cfm/* ajp13_worker
...
</VirtualHost>

Apache mods-enabled mpm-event:

<IfModule mpm_event_module>
        StartServers                     2
        MinSpareThreads          25
        MaxSpareThreads          75
        ThreadLimit                      64
        ThreadsPerChild          25
        MaxRequestWorkers         150
        MaxConnectionsPerChild   0
</IfModule>

We have a FusionReactor installed but I found nothing, what could be wrong.

Don’t forget to tell us about your stack!

OS: Ubuntu 18 LTS
Java Version: 1.8.0_282
Tomcat Version: Tomcat/9.0.31
Lucee Version: 5.2.8.50

I don’t know much about mod_jk, but that is just an idea: what apache webserver version are you using? I have a machine running Ubuntu 20.04LTS with apache2.4 and it makes use of the mod_proxy_ajp module. I think that was introduced to Apache webserver 2.1. With mod_proxy_ajp you just enable the module and proxy pass to ajp protocol. Very easy to setup.

Thanks for your reply. Ubuntu 18LTS has apache 2.4.29 and Ubuntu 20LTS has apache 2.4.41. Both can use the proxy_ajp modules.
So use this configuration?

ProxyPreserveHost On
ProxyPassMatch ^/(.+.cf[cm])(/.)?$ ajp://127.0.0.1:8009/$1$2
ProxyPassMatch ^/((flashservices/gateway|messagebroker/|flex2gateway/|openamf/gateway/).) ajp://127.0.0.1:8009/$1

What I’ve implemented is just an adaption of the default Lucee installer configuration. Here is what I’ve set up on my machine:

	
	ProxyPreserveHost On

	# AJP ProxyPass
	ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ ajp://127.0.0.1:8009/$1$2
	ProxyPassMatch ^/(.+\.cfml)(/.*)?$ ajp://127.0.0.1:8009/$1$2
	
	# optional AJP mappings (Still needs to be tested) 
	#ProxyPassMatch ^/flex2gateway/(.*)$ ajp://127.0.0.1:8009/flex2gateway/$1
	#ProxyPassMatch ^/messagebroker/(.*)$ ajp://127.0.0.1:8009/messagebroker/$1
	#ProxyPassMatch ^/flashservices/gateway(.*)$ ajp://127.0.0.1:8009/flashservices/gateway$1
	#ProxyPassMatch ^/openamf/gateway/(.*)$ ajp://127.0.0.1:8009/openamf/gateway/$1
	#ProxyPassMatch ^/rest/(.*)$ ajp://127.0.0.1:8009/rest/$1


	# AJP ProxyPassReverse
	ProxyPassReverse / ajp://127.0.0.1:8009/

Still, there is a drawback that might have an impact on certain hosting scenarios: On Ubuntus mod_proxy_ajp the password implementation for the secretRequired attibute still hasn’t been implemented. So you’ll have to keep it deactivated in Tomcats servers ajp connector configuration, but I’ve seen that this is what you’ve setup already.

Guys, if the efforts related to the connectors don’t pan out, I would say it’s possible that the error may instead mean there was instead a problem in request processing lucee–flowing back to the connectors.

I know Michael says he “found nothing” in FR. It may be that there WAS an explanation that was missed. Too many possibilities to offer here. But Michael if you continue to suffer the problem, reach out if you want direct help that might solve this quickly. You won’t pay for time you don’t value: CArehart.org/consulting. (I know that offer is against the ethos of some. It’s the first time I’ve ever offered it here. I do try to help free here and many places elsewhere before suggesting that option.)

Have you verified that you have connections available?
e.g.:
sudo lsof -i:8009

No, I have not checked this. Thanks for the input! If i have no connections available, what would I do?