Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Here's what I am trying to do, unless I am crazy:
I am trying to use Tomcat with the multiple workers, so far I got OpenBD working, but having trouble with Railo, and will be tackling Adobe after.

  • each engine deployed as a war
  • separated by different workers
  • I wanted to keep both the sites and engines inside my sites directory
  • I have to remap the symlink for the WEB-INF when I switch engines = have not found a way around this

my thought is to have everything separated into modules and I want to be able to execute both cfm and php code in a single site.  Ideally, it would be amazing if there would be a way to not have to remap the symlink as well.

thoughts? can this be done? I am trying to mimic how this would be setup on a live server, not using eclipse for example. here is what I am working with so far:

my apache workers.properties

worker.list=openbd, openbdadmin, railo, railoadmin 
worker.openbd.type=ajp13 
worker.openbd.host=local.mydev.openbd
  worker.openbd.port=8009

worker.openbdadmin.type=ajp13 
worker.openbdadmin.host=local.admin.openbd
worker.openbdadmin.port=8009  

worker.railo.type=ajp13
  worker.railo.host=local.mydev.railo
  worker.railo.port=8009

worker.railoadmin.type=ajp13 
worker.railoadmin.host=local.admin.railo
worker.railoadmin.port=8009  

my tomcat servers.xml
< Host name="local.admin.openbd" appBase="/Users/[myusername]/Websites/coldfusion.engines"  unpackWARs="false" autoDeploy="true" xmlValidation="true" xmlNamespaceAware="false">       
< Context path="" docBase="openbd/" reloadable="true" privileged="true" antiResourceLocking="false" anitJARLocking="false" allowLinking="true">

< /Host>
      

< Host name="local.admin.railo"   appBase="/Users/[my username]/Websites/coldfusion.engines" unpackWARs="false" autoDeploy="true" xmlValidation="true" xmlNamespaceAware="false">       
< Context path="" docBase="railo/" 
reloadable="true" privileged="true" antiResourceLocking="false" anitJARLocking="false" allowLinking="true">

< /Host>


< Host name="local.mydev.openbd"   appBase="/Users/[my username]/Websites/coldfusion.engines" unpackWARs="false" autoDeploy="true" xmlValidation="true" xmlNamespaceAware="false">

< Context path="" docBase="/Users/[my username]/Websites/example.mydev/wwwroot/" 
reloadable="true" privileged="true" antiResourceLocking="false" anitJARLocking="false" allowLinking="true">< /Context>

< /Host>

< Host name="local.mydev.railo"   appBase="/Users/[my username]/Websites/coldfusion.engines"  unpackWARs="false" autoDeploy="true" xmlValidation="true" xmlNamespaceAware="false">

< Context path="" docBase="/Users/[my username]/Websites/example.mydev/wwwroot/" 
reloadable="true" privileged="true" antiResourceLocking="false" anitJARLocking="false" allowLinking="true">

< /Host>

my apache vhosts


ServerName local.admin.openbd
DocumentRoot /Users/[my username]/Websites/coldfusion.engines/openBD/
#Mount OpenBD and tell it to only server cfml files
JkMount /*.cfm openbdadmin
ErrorLog "/Users/[my username]/Websites/apache.logs/local_openbdadmin_error.log"


ServerName local.admin.railo
DocumentRoot /Users/[my username]/Websites/coldfusion.engines/railo/
#Mount Railo and tell it to only server cfml files
JkMount /*.cfm railoadmin
ErrorLog "/Users/[my username]/Websites/apache.logs/local_railoadmin_error.log"

ServerName local.mydev
DocumentRoot /Users/[my username]/Websites/example.mydev/wwwroot
ErrorLog "/Users/[my username]/Websites/apache.logs/local_example_mydev_error.log"


ServerName local.mydev.openbd
DocumentRoot /Users/[my username]/Websites/example.mydev/wwwroot
#Mount OpenBD and tell it to only server cfml files
JkMount /*.cfm openbd
ErrorLog "/Users/[my username]/Websites/apache.logs/local_example_mydev_openbd_error.log"


ServerName local.mydev.railo
DocumentRoot /Users/[my username]/Websites/example.mydev/wwwroot
JkMount /*.cfm railo
ErrorLog "/Users/[my username]/Websites/apache.logs/local_example_mydev_railo_error.log"

my folder structure I am using

websites/apache.logs/
websites/coldfusion.engines/
websites/coldfusion.engines/cfusion/
websites/coldfusion.engines/openBD/
websites/coldfusion.engines/railo/
websites/example.mydev/
websites/example.mydev/wwwroot/
websites/example.mydev/wwwroot/index.cfm  
websites/example.mydev/wwwroot/index.htm  
websites/example.mydev/wwwroot/index.php  

error log output [Thu Aug 27 00:54:50.443 2009] [11279:2686719776] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized

[Thu Aug 27 00:54:51.346 2009] [11280:2686719776] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized

[Thu Aug 27 00:55:18.963 2009] [11284:2686719776] [info] jk_open_socket::jk_connect.c (594): connect to 127.0.0.1:8009 failed (errno=61)

[Thu Aug 27 00:55:18.963 2009] [11284:2686719776] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (127.0.0.1:8009) (errno=61)

[Thu Aug 27 00:55:18.963 2009] [11284:2686719776] [error] ajp_send_request::jk_ajp_common.c (1507): (openbdadmin) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=61)

[Thu Aug 27 00:55:18.963 2009] [11284:2686719776] [info] ajp_service::jk_ajp_common.c (2447): (openbdadmin) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)

[Thu Aug 27 00:55:19.063 2009] [11284:2686719776] [info] jk_open_socket::jk_connect.c (594): connect to 127.0.0.1:8009 failed (errno=61)

[Thu Aug 27 00:55:19.063 2009] [11284:2686719776] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (127.0.0.1:8009) (errno=61)

[Thu Aug 27 00:55:19.063 2009] [11284:2686719776] [error] ajp_send_request::jk_ajp_common.c (1507): (openbdadmin) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=61)

[Thu Aug 27 00:55:19.063 2009] [11284:2686719776] [info] ajp_service::jk_ajp_common.c (2447): (openbdadmin) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)

[Thu Aug 27 00:55:19.063 2009] [11284:2686719776] [error] ajp_service::jk_ajp_common.c (2466): (openbdadmin) connecting to tomcat failed.

[Thu Aug 27 00:55:19.063 2009] [11284:2686719776] [info] jk_handler::mod_jk.c (2615): Service error=-3 for worker=openbdadmin

[Thu Aug 27 00:55:20.377 2009] [11283:2686719776] [info] jk_open_socket::jk_connect.c (594): connect to 127.0.0.1:8009 failed (errno=61)

[Thu Aug 27 00:55:20.377 2009] [11283:2686719776] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (127.0.0.1:8009) (errno=61)

[Thu Aug 27 00:55:20.377 2009] [11283:2686719776] [error] ajp_send_request::jk_ajp_common.c (1507): (railoadmin) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=61)

[Thu Aug 27 00:55:20.377 2009] [11283:2686719776] [info] ajp_service::jk_ajp_common.c (2447): (railoadmin) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)

[Thu Aug 27 00:55:20.477 2009] [11283:2686719776] [info] jk_open_socket::jk_connect.c (594): connect to 127.0.0.1:8009 failed (errno=61)

[Thu Aug 27 00:55:20.477 2009] [11283:2686719776] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (127.0.0.1:8009) (errno=61)

[Thu Aug 27 00:55:20.477 2009] [11283:2686719776] [error] ajp_send_request::jk_ajp_common.c (1507): (railoadmin) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=61)

[Thu Aug 27 00:55:20.477 2009] [11283:2686719776] [info] ajp_service::jk_ajp_common.c (2447): (railoadmin) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)

[Thu Aug 27 00:55:20.477 2009] [11283:2686719776] [error] ajp_service::jk_ajp_common.c (2466): (railoadmin) connecting to tomcat failed.

[Thu Aug 27 00:55:20.477 2009] [11283:2686719776] [info] jk_handler::mod_jk.c (2615): Service error=-3 for worker=railoadmin

share|improve this question
    
ok, this appears to happen when I attempt to have 2 wars configured at the same time, if I setup one or the other I can get openbd or railo to work........hmmmm.............. –  chrishough Aug 27 '09 at 7:52
    
I was able to so far get railo and openbd setup using multiple instances of tomcat, not sure if this is the best approach since it appears to suck a ton of memory, however, using the correct applescript commands to start only the instance i want to work in this approach may work, not sure yet, more to come –  chrishough Aug 27 '09 at 10:03

1 Answer 1

You generally want your Tomcat Host's appbase="webapps" (default) and have the Context's docBase point to your Web root (docBase="/Users/[my username]/Websites/example.mydev/wwwroot/"). Your Web root will contain a WEB-INF for whichever WAR you're using (ColdFusion/OpenBD/Railo). It sounds like you're using a symlink or something for the WEB-INF dir?

In any case, you can't run requests against 3 different WARs in the same Web root (at least not without some fancy connector stuff--you could let a JRun instance/connector run while having WEB-INF of Railo or OpenBD in the Web root to then use 2 different Apache vhosts to handle... but this all sounds messy:). So, since you can't run them at the same time with this setup, I'm not sure why you're using separate host names?

It's also worth noting that you'll likely need to restart the Tomcat service each time you replace (re-map symlink) the WEB-INF folder.

Finally, if you do have the same Web root (docBase) for all three Tomcat Host entries, I'd imagine this will most certainly cause problems -- this could be the root of your errors, but not sure. Since you want the same Web root for each host, you might as well use an Alias (or just one host), something like this:

<Host name="local.mydev" appBase="webapps">
<Alias>local.mydev.railo</Alias>
<Alias>local.mydev.openbd</Alias>
<Context path="" docBase="/Users/[my username]/Websites/example.mydev/wwwroot" />
</Host>
share|improve this answer
    
after having, to say the least, tons of fun with it, I ended up rolling back to a jrun installation and I will be installing CF9 into it this weekend. –  chrishough Sep 15 '09 at 13:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.