Skip to main content
Known Participant
February 21, 2024
Answered

coldfusion kubernetes

  • February 21, 2024
  • 2 replies
  • 1653 views

I have set up ColdFusion in a pod of my Kubernetes cluster. I have configured all settings (services, ingress, etc.), and everything is working fine. However, I'm unable to connect ColdFusion to the Apache web server through wsconfig.

I've successfully done the same setup in a Docker container, but I encounter errors only in the Kubernetes cluster. The process of connecting wsconfig to Apache seems to proceed without errors, and when I list the wsconfig connected server, Apache is displayed.

When I access the server (Apache), it's working, and I can reach it. However, when I try to run a CFM file, it gives a 503 error.

I referred to the following documentation for guidance:
https://helpx.adobe.com/in/coldfusion/configuring-administering/web-server-management.html

Versions used: ColdFusion 2021/23




 

    This topic has been closed for replies.
    Correct answer Charlie Arehart

    Ok. I think you'll find this is a problem in how the localhost reference in workers.properties is being resolved (such as to ::1  in your k8s setup vs 127.0.0.1 in your docker setup).

     

    If so, the solution is to change cf's server.xml file to recognize that as an allowed address by which the AJP connector can be reached. This was  discussed in a forum thread (about such a 503 connector error) where I offered details in comments here:

     

    https://community.adobe.com/t5/coldfusion-discussions/tomcat-503-service-unavailable-error/td-p/11817160#M187746

     

    And FWIW, it was introduced in a Tomcat security change introduced into cf  in March 20202, as I blogged (again with more detail) here:

     

    https://www.carehart.org/blog/2020/3/20/how_and_why_sites_may_break_after_Mar_2020_CF_updates

     

    Let us know if you get going. 

     

    One last thing: as you may know, you don't NEED to implement tomcat WITHIN the cf container. You COULD set it up as it's own, and then use cf's "distributed" configuration of the connector (discussed in cf docs and elsewhere as if cf and the web server were on a separate machines). But hopefully the above will get you going, without taking that step. 

    2 replies

    Charlie Arehart
    Community Expert
    Charlie ArehartCommunity ExpertCorrect answer
    Community Expert
    February 21, 2024

    Ok. I think you'll find this is a problem in how the localhost reference in workers.properties is being resolved (such as to ::1  in your k8s setup vs 127.0.0.1 in your docker setup).

     

    If so, the solution is to change cf's server.xml file to recognize that as an allowed address by which the AJP connector can be reached. This was  discussed in a forum thread (about such a 503 connector error) where I offered details in comments here:

     

    https://community.adobe.com/t5/coldfusion-discussions/tomcat-503-service-unavailable-error/td-p/11817160#M187746

     

    And FWIW, it was introduced in a Tomcat security change introduced into cf  in March 20202, as I blogged (again with more detail) here:

     

    https://www.carehart.org/blog/2020/3/20/how_and_why_sites_may_break_after_Mar_2020_CF_updates

     

    Let us know if you get going. 

     

    One last thing: as you may know, you don't NEED to implement tomcat WITHIN the cf container. You COULD set it up as it's own, and then use cf's "distributed" configuration of the connector (discussed in cf docs and elsewhere as if cf and the web server were on a separate machines). But hopefully the above will get you going, without taking that step. 

    /Charlie (troubleshooter, carehart. org)
    Known Participant
    February 22, 2024

    oh thank you so much 
    i was able to connect to cf server thanks 

    Charlie Arehart
    Community Expert
    Community Expert
    February 22, 2024

    Glad to have helped. So which approach did you take, or what change did you make, in case others find this thread? 

    /Charlie (troubleshooter, carehart. org)
    Charlie Arehart
    Community Expert
    Community Expert
    February 21, 2024

    That doc page doesn't discuss connecting the wsconfig tool to a container. You'd help us help you by showing your dockerfile and/or k8s manifest, so we better understand how you're attempting things. If you keep it simple, we should even be able to try exactly what you offer.

     

    BTW, have you considered NOT using the wsconfig tool, and instead configure apache to forward/proxy requests to the built-in/tomcat web server in cf? 

    /Charlie (troubleshooter, carehart. org)
    Known Participant
    February 21, 2024

    Thank you for your reply.
    1> I referred to the documentation for configuring the Linux environment didi the same in  the Docker container, which is working fine.
    2> I haven't considered that. I will check it, thanks. Apache -> Tomcat [forwarding].

    This is my Dockerfile. I've provided the Apache vhost configuration below, and I've used the same image in my Kubernetes cluster. There are no issues with the standalone Docker setup, but when I run the same image in Kubernetes, I encounter a 503 error. The Kubernetes configuration also seems fine, as Apache and other services are accessible from my cluster.