15 Replies Latest reply on Jun 1, 2010 1:34 PM by Lampei

    How to setup multiple CF instances? (Jrun Multisever)

    Admentus1

      I have ColdFusion multi-server instance setup on my local development workstation with the initial ColdFusion instance being CF9 and a second instance for CF8.  The server was setup to connect to IIS with the default IIS web site connected to the CF9 instance.  I have a collection of other web sites under IIS which are each connected to either the CF9 or CF8 instance.

       

      So, I am trying to setup these two instances in ColdFusion Builder.  Both servers are running on the same IP address / host and even though I provide different application server names, the two servers in ColdFusion always end up pointing at the CF9 instance.

       

      What am I doing wrong here?

       

      Thanks

      -- Jeff

        • 1. Re: How to setup multiple CF instances? (Jrun Multisever)
          Kiran Sakhare

          Hi Jeff

           

          As you mentioned you have multi server setup with CF9 and CF8. You need to provide the ContextRoot for CF9 and CF8 server while configuring server in ColdFusion Builder.  Also as you mentioned you have configured CF8/CF9 on different website on IIS, You need to provide the Webport of site where you running CF8/9 during server configuration in CFB.

           

          If still not able to fix it. Give us some more details with example URL for CF9/CF8 admin, sites configured under CF9/CF8, details of site will help us providing correct configuration.

           

          Thanks

          Kiran Sakhare

          • 2. Re: How to setup multiple CF instances? (Jrun Multisever)
            Admentus1 Level 1

            Okay, here goes.  I installed ColdFusion 9 as a multi-server JRun configuration leaving me with two instances running - cfusion and admin.  I then ran the ColdFusion 8 installer creating a new EAR file which was deployed to JRun giving me a third instance - cfusion8.

             

            When the initial ColdFusion 9 installation was run, it connected to IIS using only the default localhost web site.  So, if I browse to http://localhost/CFIDE/administrator/index.cfm I get the ColdFusion administrator for the cfusion (CF9) instance.

             

            I have since setup numerous project web sites (http://project1, http://project2, etc.) in IIS and have used the JRun web server configuration tool to connect either the CF8 (cfusion8) or CF9 (cfusion) instances to each of these project web sites in IIS.  So, while the default localhost web site was setup for CF9, I don't really have a 'default' web site for CF8.  Each of the individual project sites have a CFIDE virtrual directory setup to point to the C:\JRun4\servers\cfusion8\cfusion.ear\cfusion.war\CFIDE to be able to access the CF administrator.

             

            All of these IIS web sites are running on the same IP address though with different host headers.  When I create the new server instance in CF Builder, it asks for the host but appears to only recognize the IP address, not a host header and thus all of my locale CF server instances end up pointing to the default CF 'cfusion' instance.  This is what I am trying to figure out a way around.

             

            Thanks

            -- Jeff

            • 3. Re: How to setup multiple CF instances? (Jrun Multisever)
              Kiran Sakhare Level 1

              Hi Jeff

                        Thanks for the detailed setup description. For website setups,  CFB provides Virtual Host setup in Server. As you mentioned you have multiple website configured for CF9/8 , I will try to provide solution by example

               

              server                   CF8                     CF9

              Context Root        cfusion8              cfusion

               

              Site Info     

              Host  Name       www.cf8.com     www.cf9.com

              Port                         81                         82

              Document Root    c:\project1          c:\project2

                                 

              1. Add CF9 Server with below configuration

              Host Name - localhost   

              port            -  80

              Application Name -

              ServerHome - c:\jrun4

              Document root - c:\inetpub\wwwroot

               

              VirtualHost setting

                  Virtual Host Address--- www.cf9.com

                  port            --- 82

                Document root -- c:\project1

               

              2.  Add CF8 Server with below configuration

              Host Name - localhost   

              port            -  80

              Context root - cfusion8

              Application Name -

              ServerHome - c:\jrun4

              Document root - c:\inetpub\wwwroot

               

              VirtualHost setting

                  VirtualHost Address -- www.cf8.com

                  port  ------------------------ 82

                Document Root ------- c:\project2

               

              Read more about Virtual Host setup in CFB Documentation.  Hope this will help u

               

              Thanks

              Kiran Sakhare

              • 4. Re: How to setup multiple CF instances? (Jrun Multisever)
                Admentus1 Level 1

                Thanks for the information.  However, some of this does not make sense.

                 

                First, on both the cfusion and cfusion8 instances, the context root is just '/'.  If I try to set it to anything different, I get an expected 404.

                 

                With regards to setting up the cfusion8 instance in CF Builder, you have it pointing to the same C:\inetpub\wwwroot folder where the CFIDE directory is for the cfusion (CF9) instance.  Therefore, if I attempt to open the CF administator for the cfusion8 instance, I still get the CF9 administrator.

                 

                Thanks

                -- Jeff

                • 5. Re: How to setup multiple CF instances? (Jrun Multisever)
                  Kiran Sakhare Level 1

                  As CF9 is installed as Multi server installation it is intrinsic that context root is / hence no need to enter in CFB server settings.

                   

                  Your correct because ur CFIDE is in inetpub/wwwroot even CF8 picks the same admin which is copied by CF9. In this scenario you need to create VD pointing to the CF8's CFIDE which is in {jrun-home}/servers/cfusion8/cfsuion-ear/cfusion-war/CFIDE and then do request using VD name in the URL.

                   

                  For example :-

                   

                  In default Site create VD name-cfide8 location-  {jrun-home}/servers/cfusion8/cfsuion-ear/cfusion-war/CFIDE

                  then access CF8 admin with http://localhost/cfide8/administrator/index.cfm.

                   

                   

                  Thanks

                  Kiran Sakhare

                  • 6. Re: How to setup multiple CF instances? (Jrun Multisever)
                    Admentus1 Level 1

                    Kiran,

                     

                    But how does CF Builder know to use the CFIDE8 virtual directory?  The hist field does not include \CFIDE and the document root points to the wwwroot folder, not wwwroot\CFIDE, so it appears that the CFIDE name is inferred and thus I am not seeing a way to over-ride that.

                     

                    Thanks

                    -- Jeff

                    • 7. Re: How to setup multiple CF instances? (Jrun Multisever)
                      Kiran Sakhare Level 1

                      Hi Jeff

                       

                      The /CFIDE is inferred when your opening administrator within CFB. Hence you will not be able to open administrator of CF8 within CFB.

                       

                      Thanks

                      Kiran Sakhare

                      • 8. Re: How to setup multiple CF instances? (Jrun Multisever)
                        Admentus1 Level 1

                        So basically what you are saying is that CF Builder cannot support ColdFusion when setup in a multi-server instance.  It can only support a single instance on any given host.

                         

                        Not real helpful.

                         

                        -- Jeff

                        • 9. Re: How to setup multiple CF instances? (Jrun Multisever)
                          Adam Cameron. Level 5

                          For development work, can you not connect to the various CF instances via the JRun webserver, via localhost & the port?

                           

                          --

                          Adam

                          • 10. Re: How to setup multiple CF instances? (Jrun Multisever)
                            Admentus1 Level 1

                            Adam -

                             

                            I know every instance has a different port on JRun, but I have never attempted to access them directly.  In trying, if I try http://localhost:8300 (the cfusion instance), I just get a blank screen and http://localhost:8300/CFIDE/administrator/index.cfm gives a 404.

                             

                            Have you tried this before?

                             

                            Thanks

                            -- Jeff

                            • 11. Re: How to setup multiple CF instances? (Jrun Multisever)
                              Adam Cameron. Level 5

                              Yep, it's how I do all my development work all the time, unless there is some vagary of the Apache or IIS set-up that is vital to the app being developed, and it cannot be implemented with JWS (it's a fairly basic web server).

                               

                              As you set up your sites for IIS, the CFIDE dir will actually be in the C:\inetpub\wwwroot dir, which is not where JWS expects it to be.  You'll need to add a mapping for it in your jrun-web.xml file ([Jrun dir]/servers/[instance name]/cfusion-ear/cfusion-war/WEB-INF/jrun-web.xml.  Also make sure there's a / mapping for where the webroot is (JWS assumes it's the cfusion-war dir), and any other virtual directory mappings you need for your own purposes.

                               

                              ALSO, because you will be mapping / away from the cfusion-war dir, you will need to make sure you have a mapping for WEB-INF back to the cfusion-war/WEB-INF dir.

                               

                              There's an example of how to do a mapping within the file, but the example is not very clear.  Here's my mappings for one of my instances:

                               

                                  <virtual-mapping>
                                      <resource-path>/*</resource-path>
                                      <system-path>C:/webroots/cf901a1</system-path>
                                  </virtual-mapping>

                               

                                  <virtual-mapping>
                                      <resource-path>/WEB-INF/*</resource-path>
                                      <system-path>C:/Adobe/JRun4/servers/cf901a1/cfusion-ear/cfusion-war/WEB-INF</system-path>
                                  </virtual-mapping>
                                  <virtual-mapping>
                                      <resource-path>/CFIDE/*</resource-path>
                                      <system-path>C:/Adobe/JRun4/servers/cf901a1/cfusion-ear/cfusion-war/CFIDE</system-path>
                                  </virtual-mapping>
                                  <virtual-mapping>
                                      <resource-path>/cfide/*</resource-path>
                                      <system-path>C:/Adobe/JRun4/servers/cf901a1/cfusion-ear/cfusion-war/CFIDE</system-path>
                                  </virtual-mapping>

                               

                              HTH

                               

                              --

                              Adam

                              • 12. Re: How to setup multiple CF instances? (Jrun Multisever)
                                Admentus1 Level 1

                                Adam,

                                 

                                That actually helps quite a bit.  With a little bit of tweaking, I now can access the CF Admin directly through JRun for both instances.  I have set both servers up in CF Builder using the JRun ports and the cfusion (CF9) instance appears to be working perfectly.  On the cfusion8 (CF8) instance, I get 3 messages in the console upon saving ...

                                 

                                [ColdFusion 8 (cfusion8)]:(03/25 at 10:46:27) Server is available. Getting server settings.
                                [ColdFusion 8 (cfusion8)]:Error(03/25 at 10:46:27) Unable to fetch server mappings.
                                [ColdFusion 8 (cfusion8)]:Error(03/25 at 10:46:27) Unable to get the log directory.

                                 

                                The first makes it look like the connection is working and I can right click on the server and open the admin panel.  The last two messages make it look like some path is still missing maybe?  I am off to do more digging to see what is being sought here.

                                 

                                Thanks

                                -- Jeff

                                • 13. Re: How to setup multiple CF instances? (Jrun Multisever)
                                  Adam Cameron. Level 5

                                  Cool that you got moving in the rightr direction.

                                   

                                  I'm out of my depth with those other msgs CFB is giving you.  Dunno what to suggest there.  I have, however, found that sometimes it bleats about something on the server being wrong (or that it's not even running), whereas it's working fine and I can access server assets and debug and [what-have-you].

                                   

                                  That said, I don't use any of those features too much... too accustomed to not having all these bells and whistles to play with, so CFB for me is mostly a big white square for typing stuff in, and not much else.

                                   

                                  --

                                  Adam

                                  • 14. Re: How to setup multiple CF instances? (Jrun Multisever)
                                    Kiran Sakhare Level 1

                                    Hi Jeff

                                     

                                    The below errors your seeing are failed operation when CFB tries to talk to server to fetch mappings and log directory.

                                     

                                    [ColdFusion 8 (cfusion8)]:Error(03/25 at 10:46:27) Unable to fetch server mappings.
                                    [ColdFusion 8 (cfusion8)]:Error(03/25 at 10:46:27) Unable to get the log directory.

                                     

                                     

                                    These informations are required by CFB like it uses server mappings to resolve components and log directory used by Log view (Tail view).

                                     

                                    To fetch setting from server you need to enable RDS and provide RDS username and password. CFB also caches these information once it fetches from server.

                                     

                                    Thanks

                                    Kiran Sakhare

                                    • 15. Re: How to setup multiple CF instances? (Jrun Multisever)
                                      Lampei Level 1

                                      I have RDS set up (in CF Administrator and CF Builder) and I'm still seeing those same 2 error messages.

                                       

                                      Any other suggestions for fixing them?