Copy link to clipboard
Copied
Currently we are running four separate instances of ColdFusion 8 Enterprise which are using the bundled JRun server attached to Apache2. I have them split up using virtual machines on ESXi.
We just purchased CF 9 which I will be setting up on a new server and then migrating our applications over, but I am wondering if I would be better off just avoiding ESXi and intead running these 4 separate CF instances on one install of JBoss. In the past I toyed around with running several instances of CF8 on Tomcat 6, which I had working (for the most part), except I never got the virtual domains working correctly and the proxy between apache<>tomcat didn't seem to be working properly.
I just chucked that previous attempt at Tomcat expecially since it isn't an officially supported platform by Adobe. Looking around online I can find very little information about running on a J2EE server... will Tomcat 6 work fine (since it is the core to Jboss)? Should I use JBoss or am I better off the way I am with separate instances of JRun on Virtual Machines?
Thanks for any input.
Copy link to clipboard
Copied
I did get CF 8 and 9 up and running on JBoss 5.1 the same day I made my first post and also got virtual hosts working with apache/ajp. Everything seems to be working quite well actually, and now that I am using jboss's rewrite engine instead of apache's I suppose I don't even need the apache part of the equation anymore.
But, I still have that question in the back of my mind of if this setup is worth the extra effort. Should this setup be more stable or efficient? I have noticed that if I need to restart a CF instance it is alot quicker to stop/start the EAR (or even stop/start JBoss entirely) than it is to stop/start JRun. JBoss will fully startup with 6 instances in under a minute where the CF service would take several minutes.
Copy link to clipboard
Copied
I'm running into this same problem. I have JBoss and CF9 set up and working with Apache and mod_proxy. There are going to be 3 or 4 more instances of CF set up on this box but I'm having a hard time trying to figure it all out.
I have CF deployed as an .ear in JBoss. Say I have 4 other CF apps that I want to get going. I can just make seperate .war folders under cfusion.ear and deploy that way, correct? They don't seem to deploy, what else do I need to configure? Do I need to copy the CFIDE and WEB-INF these .war folders and change the jboss-web.xml?
I'm also having issues trying to configure the server.xml for the virtual hosts. Can you give me any examples or point me in the right direction?
Thanks!
Copy link to clipboard
Copied
There are two way to approach this and it depends if you are deploying from a EAR or WAR file. Since you chose to use a EAR like I did, these are the steps I follow to create an instance, if you're using linux I also put commands for reference:
<jboss-web>
<context-root>/</context-root>
<virtual-host>newappname</virtual-host>
</jboss-web>
<Host name="newappname" autoDeploy="false" deployOnStartup="false" deployXML="false">
<Alias>newappname.domain.com</Alias>
</Host>
<VirtualHost *:80>
ServerName newappname.domain.com
ProxyPass / ajp://newappname.domain.com:8009/
</VirtualHost>
You need to make sure that the FQDN used for these configs is actually setup in your DNS since it is all name based... I put them in my hosts file while setting this up just to ensure there are no issues.
You will be using a completely separate instance.ear for each instance, each of which will contain their own instance.war
Copy link to clipboard
Copied
Thanks for the quick reply! This is on a Windows 2008 box btw. So I set everything up but everytime I have more than one instance of CF the other instance won't start. It shows the following error in JBoss when trying to start:
java.lang.SecurityException: Seed must be between 20 and 64 bytes. Only 8 bytes supplied.
Here are my config files, I have a cfusion.ear and brazil.ear under the JBoss deploy directory.
application.xml under brazil.ear
<web>
<web-uri>brazil.war</web-uri>
<context-root>/brazil</context-root>
</web>
jboss-web.xml under brazil.war
<jboss-web>
<context-root>/brazil</context-root>
<virtual-host>abellasbrazil-dev.mysite</virtual-host>
</jboss-web>
server.xml
<Host name="abellasbrazil-dev.mysite" autoDeploy="false" deployOnStartup="false" deployXML="false">
<Alias>abellasbrazil-dev.mysite</Alias>
</Host>
Apache virtual host file
<VirtualHost *:80>
ServerAdmin abellas@mysite.com"
ServerName devmktgweb.mysite.com
ServerAlias devmktgweb.mysite.com
ProxyPass / ajp://devmktgweb.mysite.com:8080/
ErrorLog "logs/devmktgweb.mysite.com-error.log"
CustomLog "logs/devmktgweb.mysite.com-access.log" common
</VirtualHost>
Thanks again for any help.
Copy link to clipboard
Copied
Are you running v5.1.0GA-jdk6 or the new v6?
Copy link to clipboard
Copied
Yeah it's JBoss v5.1.0GA and JDK1.6u16.
Copy link to clipboard
Copied
Interesting... I have encountered that error before but in a different scenario. Is your JAVA_HOME set so that you know jboss is loading up the correct JDK instance?
Take a look at this link: http://help.adobe.com/en_US/ColdFusion/9.0/Installing/WSc3ff6d0ea77859461172e0811cdec18c28-7fbd.html it has some tweaks that you need to perform, these would also apply to CF8. There are sections only for windows servers.
Copy link to clipboard
Copied
Yes, the JAVA_HOME variable is set to the correct (and only) JDK instance. I also followed that help article when setting up JBoss and CF9 so I'm kind of at a loss on what to do next...
I found this article http://daveshuck.instantspot.com/blog/2009/05/08/Solving-javalangSecurityException-Seed-must-be-between-20-and-64-bytes-Only-8-bytes-supplied but its referring to JRun.
Copy link to clipboard
Copied
Sorry I completely forgot about that (what I get for not documenting as I go). You need to edit the bin/run.sh (bin/run.bat in your case) and down around like 230 you should see a JAVA_OPTS property. Replace this with...
JAVA_OPTS="-Dcoldfusion.disablejsafe=true $JAVA_OPTS"
-Patrick
Copy link to clipboard
Copied
Hm, I didn't see exactly where to put this but here are my JAVA_OPTS section's.
if "x%JAVA_OPTS%" == "x" (
set "JAVA_OPTS=-Dprogram.name=%PROGNAME%"
) else (
set "JAVA_OPTS=-Dprogram.name=%PROGNAME% %JAVA_OPTS%"
set JAVA_OPTS=%JAVA_OPTS% "-Djava.library.path=%JBOSS_NATIVE_HOME%;%PATH%;%JBOSS_HOME%\bin"
"%JAVA%" %JAVA_OPTS% ^
-Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" ^
-classpath "%JBOSS_CLASSPATH%" ^
org.jboss.Main %*
Copy link to clipboard
Copied
Try changing the file as follows:
Original
if "x%JAVA_OPTS%" == "x" (
set "JAVA_OPTS=-Dprogram.name=%PROGNAME%"
) else (
set "JAVA_OPTS=-Dprogram.name=%PROGNAME% %JAVA_OPTS%"
)
New
if "x%JAVA_OPTS%" == "x" (
set "JAVA_OPTS=-Dcoldfusion.disablejsafe=true"
) else (
set "JAVA_OPTS=-Dcoldfusion.disablejsafe=true %JAVA_OPTS%"
)
Copy link to clipboard
Copied
Thanks, I just saw that at the bottom of the help doc right after I posted. Anyways both CF instances are up and running
However, the other site still won't come up. My config is still the same as in post 4. Is there anything that you can see that I'm missing?
Thanks again for all the help.
Copy link to clipboard
Copied
So you can access the instances via Tomcat but not via Apache?
First thing thats obvious to me is your proxypass statement...
ProxyPass / ajp://devmktgweb.mysite.com:8080/
ajp operates by default on port 8009, separate of tomcats http server operating on 8080.
You should have:
ProxyPass / ajp://devmktgweb.mysite.com:8009/
Copy link to clipboard
Copied
I tried changing the ProxyPass to 8009 but still couldn't get to the other test page. I know there's something I'm missing but I'm just not sure what I need to change or add.