0

I'm running Tomcat 9 with IIS 10 using AJP13 by following this guide. Everything works as long as it's not proxied through Cloudflare. However, once I proxy it, I'm getting the following error in the isapi_redirect.log.

[info] jk_open_socket::jk_connect.c (816): connect to 104.27.142.45:8009 failed (errno=60)
[info] ajp_connect_to_endpoint::jk_ajp_common.c (1065): (tomcat01) Failed opening socket to (104.27.142.45:8009) (errno=60)
[error] ajp_send_request::jk_ajp_common.c (1725): (tomcat01) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=60)

It's saying that it couldn't connect to 104.27.142.45 but that's not my server's IP. It's the IP of Cloudflare's reverse proxy. Most probably because I'm accessing the website using a domain name that is pointed to Cloudflare and Tomcat or the isapi_redirect got the IP address by performing a DNS lookup on the domain name.

Is there a setting where I can force the IP address to connect to?

Twisted Whisper
  • 193
  • 1
  • 6
  • Microsoft IIS does not require that ISAPI to host Java applications, https://blogs.msdn.microsoft.com/manjug/2015/11/27/understanding-iis-httpplatformhandler-using-tomcat-8/ – Lex Li Mar 03 '20 at 15:41

1 Answers1

0

I ended up adding a record in the host file.

172.30.18.82    mydomain.com

where 172.30.18.82 is my server's IP. This will force mydomain.com to resolve to my server's IP during a DNS lookup.

If anyone of you have a better idea, I'd appreciate it.

Twisted Whisper
  • 193
  • 1
  • 6