24 Replies Latest reply on Feb 21, 2012 10:31 AM by kurttt

    CF Server will not restart

    puregas Level 1

      I have just installed ColdFusion 9 (FOR 10th TIME) After installing 9 i when ahead and installed the update (9.0.1) - I did the installation be following the instructions on the Adobe installation document - CF installed without any error,


      But now... I cannot get CF Application to restart. It give me the following error:


      "Windows could not start the ColdFusion 9 Application Server ... services-specific error code 2"


      I have checked the log file but cannot find anything???


      PLEASE - can someone help - this is driving me nuts

        • 1. Re: CF Server will not restart
          charlie@carehart.org Adobe Community Professional & MVP

          Puregas, first, as for "checking the log file", can you clarify where you're looking? Also, are you on Windows or Linux? If on Windows and running CF as a service, you may want to check out the Windows event log, but that may only tell you to look in the CF console log.


          If you're running CF as a service, is this CF Standard or Enterprise? And if the latter, is it Server or Multiserver? I ask because the other important log to be looking at is either in \runtime\logs\, if running CF Standard or Enterprise in Server modem or in \logs\ if running in Enterprise Multiserver mode. The -out.log there will likely offer useful information.


          As for having " just installed ColdFusion 9 (FOR 10th TIME)", it sounds like you did that, and then "went ahead and installed the update (9.0.1)". So was it working when just 9.0, on the 10th installation? And only failed after the updater? And in case it may prove useful diagnostically, why was it the 10th time you'd installed CF9? Do you mean in your most recent wrangling with things? Or do you mean you've done it several times in the past? If that's the case, why so many re-installs? (And is this a production server, or your development box?) Again, there could be a clue for us as to what's going wrong.


          Naturally, it should all just be very simple. I've helped people install CF hundreds of times, and it generally just works. Whatever is amiss for you would seem pretty unusual.  I realize you don't likely want to hear that.


          You just want the problem solved. The logs I point you to should help. If you are really struggling and don't want to wait for back and forths on the forums here, there are folks (like myself) who offer on-demand remote assistance for such problems. You don't have to struggle on your own. See more in my signature below. But I realize many don't want to pay for help, so the forums are here and as you can see, I (and others) are more than willing to answer questions here for free. Whatever people want.


          Hope some of that helps.


          /charlie arehart


          Providing on-demand troubleshooting services for CF and CFBuilder

          at http://www.carehart.org/consulting

          • 2. Re: CF Server will not restart
            Steve Sommers Level 4

            If Windows 7, Windows 2008 Server, or Windows 2003 Server is the operating system, I would wager that it is a security related rights issue. On these systems the user that IIS (and default CF user) uses do not have sufficient rights by default to run. I wish I could be more help but I just remember that our IT department had a hell of a time when we installed on these o/s's originally.

            • 3. Re: CF Server will not restart
              carl type3 Level 4


              +1 check out the tail of coldfusion-event and coldfusion-out log files in cf\runtime\logs\ if running CF Standard or CF Enterprise in multi-server mode in jrun4\logs\


              Regards Carl.

              • 4. Re: CF Server will not restart
                puregas Level 1

                Following up on this...


                We are currently running a Windows Server 2008 R2 Enterprise Edition and ColdFusion Single server Enterprise Edition.


                Having looked at the log file as per your recommendation (thank you) I found the following error message in the CF\runtime\logs\coldfusion-out file...


                "Error: no known VMs. (check for corrupt jvm.cfg file)"


                What this means??? I did check to see if the jvm.cfg file is there and it is.


                Any ideas?? 

                • 5. Re: CF Server will not restart
                  carl type3 Level 4

                  Odd error. The configuration file is normally CF\runtime\bin\jvm.config


                  Has Java JRE or JDK been installed or has the Java Virtual Machine configuration been altered in CF? You do not list such happening with the server description.


                  Perhaps a copy of JVM.CONFIG will be interesting to look at?


                  HTH, Carl.

                  • 6. Re: CF Server will not restart
                    charlie@carehart.org Adobe Community Professional & MVP

                    @puregas, while the jvm.config is "there", that's not really what the error is saying. It says "no known VMs" and to check if the jvm.config is "corrupted".


                    I suspect your problem is simply that the jvm.config has an error, specifically in the java.home variable, which points to the location of the jvm. If it can't find it, then it will think there "are no known VMs".


                    Since you say you are using a "single server enterprise edition" and refer to cf\runtime\logs, then you are indeed using Server mode, so the default java.home on Windows would be java.home=C:/ColdFusion9/runtime/jre for CF9 or java.home=C:/ColdFusion8/runtime/jre for CF8. (Those slashes in the "wrong" way is what Java expects and indeed what CF has as a default.)


                    But if you installed a new JVM and changed the java.home location to point to that, you may have a mistake in doing it. For instance, if I implemented the latest current version in the c:\ program files\java\jdk1.6.0_24 directory, the value could appear as:


                    java.home=C:/Program Files/Java/jdk1.6.0_17/jre


                    Note that you can also change the / instead to
                    (must listed twice):


                    Program Files


                    If instead you try to just specify the path as it "should" appear from a Windows perspective:


                    java.home=C:\Program Files\Java\jdk1.6.0_17\jre


                    that will in fact cause your error, "Error: no known VMs. (check for corrupt jvm.cfg file)", as it would also if you simply had an error in the directory name.


                    Hope that helps.


                    /charlie arehart


                    Providing fast, remote, on-demand troubleshooting services for CF (and CFBuilder)

                    More at http://www.carehart.org/consulting

                    • 7. Re: CF Server will not restart
                      carl type3 Level 4

                      Just adding to Charlie's details on java.home in jvm.config this also works:


                      java.home=C:\\Program Files\\Java\\jdk1.6.0_17\\jre


                      ie double slashes.


                      HTH, Carl.

                      • 8. Re: CF Server will not restart
                        charlie@carehart.org Adobe Community Professional & MVP

                        It's funny (or sad), Carl, but that is in fact what I was trying to show in the last (working) example in my note. :-)


                        But I see that what happened is that this form software seems to have regarded two slashes as some sort of newline character, but only if entered by email (as I tend to answer most questions). That's too bad, as it definitely messed up what I was trying to communicate! I'm assuming you entered your note using the forum?


                        So I am logging in to the web forum now to answer this and to be able to explain what happened.


                        So where I had written this:


                        Note that you can also change the / instead to \\ (must listed twice):

                        java.home=C:\Program Files\Java\jdk1.6.0_17\jre


                        That became instead:


                        Note that you can also change the / instead to
                        (must listed twice):


                        Program Files


                        How bizzarre, how bizzare. Also, I see that I goofed in an innocuous way: where said I was going to show how to use _24, my examples showed _17. Doh! :-)    

                        • 9. Re: CF Server will not restart
                          carl type3 Level 4

                          Yes that is what I thought you were conveying Charlie and I figured the pasting must have gone forlorn,
                          Glad to jump in and fix it as you have done so many times for me and others, I am certainly not going to keep score the points would be in your favour.

                          I normally use the form however even that has some miss giving’s if say pasting contents of jvm.config, putting in spaces in where there are none.


                          cheers, Carl.


                          • 10. Re: CF Server will not restart
                            puregas Level 1

                            Hi Charlie and Carl,


                            Thanks for all you assistance in trying to solve this problem, whoever in the meantime we discovered other corrupt file on the server and it was decided by my ISP who we rent the server from to reformat it and start a fresh.


                            We did this and by the looks of things its all working. We will run it for a few days and see...


                            Once again, thank   

                            • 11. Re: CF Server will not restart
                              snelson@webapper.com Level 1

                              This error just happened to me after I was mucking around with the JVM settings. I've been working on a script the last couple weeks that has to perform roughly 400,000,000,000 cfloops. Anyway, I changed the maximum JVM heap size from 1024 to 1524 just to see if that would help. It caused this same error.


                              Compare these two files:





                              I suspect something is different in those two files. Mine happened to be on line 18. I changed the heap size back to 1024 and everything is fine. Anyway I think you'll find your answer there.



                              • 12. Re: CF Server will not restart
                                charlie@carehart.org Adobe Community Professional & MVP

                                Steve, was this on a 64-bit OS? You should have not even been able to start CF with 1.5gb heap on 32 bit.


                                And is it that CF comes up, but then fails when you run a particular page? You say "Mine happened to be on line 18." Or do you mean that to be the line in jvm.config where the args are specified, perhaps to help some other readers?


                                Anyway, why in the world should it be ok for a CF app to loop 400 billion times? Seems some refactoring/rearchitecting is in order.



                                • 13. Re: CF Server will not restart
                                  snelson@webapper.com Level 1

                                  When I tried to start the CF service it threw this same error message that puregas was getting. A little Google search brought me here. This is on a 32bit machine which explains why it didn't start like you said. Honestly it seems like a bug in the CF admin to me. I never remember the various limits, shouldn't the CF admin keep track of that for me? Whatever.


                                  Line 18 of the jvm.config is where I manually changed the heap size back to 1024.


                                  As far as the 400 billion rows... The bigger question is why SHOULDN'T CF be able to handle that many loops? I've been refactoring this application for 3 years now. The reality is that sometimes applications just have a lot of data. I'm sure my 400 billion loops is off by a factor or 10 or maybe a 100. But it's somewhere in that neighborhood. It's a stock market prediction app. This particular script I've been working on calculates out moving averages based on 4 data points every 1 minute for a 1000 symbols, for years worth of data. Multiply that out, it's only a few months of data before you hit 20,000 rows for a single symbol. Calculating moving averages essentially requires looping over the loops. Well, sort of. I think my big table has around 100-150 million rows.


                                  But even at 4 billion-400 billion loops, CF can still handle it just fine when you throw cfthread into the mix. It's slow, but it works. I wrote a version in Javascript the other day. Running the script in Google Chrome is like 100 times faster than CF. That's a little annoying that a web browser can do things 100 times faster that CF.


                                  Hope you're doing well Charlie.



                                  • 14. Re: CF Server will not restart
                                    charlie@carehart.org Adobe Community Professional & MVP

                                    Hey there, Steve. I hadn't connected the dots to recognize you. Hope all's well for you, too.


                                    So first, about the 32bit issue with CF not allowing more than about 1.3gb, I suppose it's fair to ask why the CF Admin hasn't ever warned about it. It's just been a long-standing observation that many had come to over the years.


                                    As for the 400b rows, and the observation that Chrome could do it faster in JS than CF, I'd wonder a couple of things. First, is it an even comparison? I mean, are the two apps really doing the same thing? I could think of ways they could vary that would make them work quite differently. Second, consider also that your CF page is being multithreaded with other requests on CF. If there are indeed other requests running at the same time, then perhaps the CF request is simply getting less CPU (per billion requests, for instance) than on the desktop.


                                    Along the same lines, the server may be doing a lot more context switching in the operating system, or a lot more swapping to virtual file space.


                                    What I'm saying is that there can often be explanations for such a difference that are not about some core inability of CF to "handle a large loop". It would just seem fair to rule out such issues before asserting that CF just isn't up to the task.


                                    As for my wondering why you would do it, that was sincere: I've seen many apps where people didn't take the time to refactor and make such a huge process work better or more efficiently and they just expected CF to snap to attention for whatever they may ask it to do. Sometimes, such desires should be questioned. But are you saying that this has run (even at that high rate) in the past? And if so, then what changed? I would think something must have, perhaps along the lines above.


                                    Finally, if you can do it in JS in the browser, then perhaps it may be a better place to do it. Just trying to help.



                                    • 15. Re: CF Server will not restart
                                      TheRealAgentK Level 2

                                      Just a quick addition wrt the memory on 32-bit CF installations.


                                      The issue is essentially a JVM issue, not as such a CF issue. It gets even worse because the 1.3 GB Charlie was mentioning are not even an absoute value. You'll find it depends on the exact version and type of the operating system you're running as well as the specific JVM version and vendor. It's fair to say that the limit is 1.3 GB-ish, but I've seen machines on which I could successfully assign heap sizes between 1.2 GB and nearly 1.4 GB on Windows. On Linux it's a different game again apparently, I've def. seen 32-bit JVMs using even more than 1.4 GB.


                                      I agree - it'd be nice if CF offered some sort of warning in the admin. On the other hand - it'd be hard to spit out more than "Make sure that you don't assign more than 1.3 GB - your CF might not start" - because it's really outside of Adobe's control. Is that useful - I don't know.


                                      Personally I think there's a case of removing the JVM config (resp. the textarea to edit it) from the CF admin in the first place. I consider those settings to be very advanced tuning settings and the vast majority of people has no clue of those anyway. Give people the option to change min/max heap sizes and that's it. The folks how are actually able to understand what the other stuff mean will be able to find the jvm.cofig file and sort it there.

                                      • 16. Re: CF Server will not restart
                                        snelson@webapper.com Level 1

                                        It was a fair question. It probably sounded like the classic cfquery inside of a cfloop.


                                        I haven't taken the time to do a truly scientific comparison of javascript vs cf with this particular script. I'm not even sure how to get an exact execution time with javascript. Someone's probably figured it out. It would be an interesting comparison. The loop/logic sections of the two versions of code are identical. The data transfer is obviously a little different. Javascript makes a secondary ajax request to get a json packet. But logically that *should* be slower. In the grand scheme of things that part of the code is pretty negligble compared to these giants loops I'm doing.


                                        The execution times for each symbol varies, but it'll be around 100,000-150,000ms for CF. Whereas when JS does it, it *looks* like it only takes a few seconds for each one. Again I don't have exact execution times for JS.


                                        The reason I haven't given up on CF for this particular script is that I can run this on the server in the background and just forget about it. Plus I only have to do these HUGE loops once. I've written the script so it'll basically pick up where it left off. So if I run this script every hour it's only doing ummm... 1000*60*(1500+250+100) no, wait... 1000*60*(1500+250+100+14+35+210)=126,540,000 loops


                                        that's a piece of cake



                                        • 17. Re: CF Server will not restart
                                          snelson@webapper.com Level 1

                                          That's a perfect reason for the CF admin to calculate that out for you. It can easily keep track of which OS you're using, whether it's 32 bit, how much physical memory you have in the machine etc. I used to be able to keep track of 3 or 4 things at a time like that, but now I have kids.

                                          • 18. Re: CF Server will not restart
                                            charlie@carehart.org Adobe Community Professional & MVP

                                            Thanks for the elaboration, K. I had been tempted to offer almost exactly what you wrote in your first paragraph, but had so much else to say that I left it at what I did. Good for you to have explained it for those who'd benefit.


                                            As for the removal of the jvm settings page, that is in fact done in Multiserver deployments of CF. You have to then edit the jvm.config to make such changes.



                                            • 19. Re: CF Server will not restart
                                              charlie@carehart.org Adobe Community Professional & MVP

                                              Steve, if you wanted to do some work together to find out if we could cut down those dramatic time differences, I'd be happy to lend a hand, gratis, as thanks for all you’ve done in the community all these years. Sounds like an interesting challenge. Just drop me an email directly, charlie@carehart.org.



                                              • 20. Re: CF Server will not restart
                                                charlie@carehart.org Adobe Community Professional & MVP

                                                Funny guy.


                                                Still, as he said, part of it is that even with the details, it's still just a guess on CF's (or our own) part. I do appreciate that it would be nice, but first of all, there's no chance any such fix will be back-ported for current installs, so it's mostly water under the bridge.


                                                Second, CF 10 is going to be deployed on Tomcat rather than JRun (as was announced at Scotch on the Rocks earlier this month), so the numbers will be different even for someone deploying CF on 32 bit in the CF10 era (since some of the reason for the 1.3gb limit had as much to do with some core libraries loaded into the address space by CF/Java/JRun, and that will surely vary on Tomcat, and due to changes in CF10).



                                                • 21. Re: CF Server will not restart
                                                  Dave Watts Adobe Community Professional

                                                  As for tracking the maximum amount of memory that can be allocated to the JVM, the CF Admin (or any other app that runs in the JVM for that matter) doesn't really know. That's analogous to asking MS Word to tell you the maximum amount of physical memory that can be installed in Windows.


                                                  As for the 400 billion rows, the real question isn't why shouldn't CF be able to handle it, as you've indicated that in the right conditions it can - and you could definitely improve the conditions by, say, upgrading to a 64-bit version, etc. CF can do all sorts of things that it's not designed to do - you could, for example, use CF in place of batch files; you could write "desktop" applications that involved running CF as an application from a zip file (CF can be run locally without being installed by doing this). But all of these things are well beyond the design parameters for what CF is intended to do. It is not intended for raw number crunching, or batch processing data. You would be better served by moving that sort of task to an environment better suited to do this.


                                                  Finally, as for something running faster in a web browser - why does that surprise you? A web browser doesn't have to maintain resources for multithreading beyond a handful of threads - it can dedicate its resources to doing one thing and one thing only. CF is designed to service many concurrent short-running requests simultaneously - which is diametrically opposed to what you're trying to do.


                                                  Dave Watts, CTO, Fig Leaf Software



                                                  • 22. Re: CF Server will not restart

                                                    Same issue. The updater breaks the jre!

                                                    Os: Oracle Linux 5.7 in VM environment (but VM shouldn't matter)

                                                    CF files: ColdFusion_9_WWE_linux64.bin and ColdFusion_update_901_WWEJ_linux.bin.

                                                    Using iPlanet 7.0.9 on linux


                                                    I shut down the iPlanet config instance first (the virtual server portion, left admin-server running).

                                                    I installed CF9 with an iPlanet web server configuration through the installer,

                                                    giving the paths for the config and docs directory during the install.


                                                    After installing CF9, I didn't start it. I immediately backed up the jre directory, located at

                                                    /opt/coldfusion9/runtime/jre, using the following commands


                                                    linux> cd /opt/coldfusion9/runtime

                                                    linux> cp -R jre jre.ORIG


                                                    I installed the updater and tried to start CF9. It broke with a message the jvm must be corrupt.

                                                    I removed the existing jre directory, and replaced it with my backup using the following commands


                                                    linux> cd /opt/coldfusion9/runtime

                                                    linux> rm -rf jre

                                                    linux> cp -R jre.ORIG jre


                                                    I tried to restart CF9 and it worked with my backup jre!

                                                    I didn't have to play around with the jvm.conf file or mess with the java.home location.

                                                    I might add that the iPlanet connector reported a successful configuration.

                                                    After iPlanet config was running, I brought up http://<hostname>/CFIDE/administrator

                                                    and it worked.


                                                    I hope this helped someone.

                                                    I've been helped many times by other posters.

                                                    Time to give something back.

                                                    • 23. Re: CF Server will not restart
                                                      retfird Level 1

                                                      Same problem after updating to 9.0.1 on linux.


                                                      I ended up switching java.home in my coldfusion/bin/jvm.config to get it working once again:



                                                      # VM configuration


                                                      # Where to find JVM, if {java.home}/jre exists then that JVM is used

                                                      # if not then it must be the path to the JRE itself




                                                      # If no java.home is specified a VM is located by looking in these places in this

                                                      # order:


                                                      #  1) bin directory for java.dll (windows) or lib/<ARCH>/libjava.so (unix)

                                                      #  2) ../jre

                                                      #  3) registry (windows only)

                                                      #  4) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre)




                                                      # Arguments to VM

                                                      java.args=-server -Xmx512m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -Xbatch -Djava.awt.headless=true -Dcoldfusion.rootDir={application.home}/../ -Djava.security.policy={application.home}/../lib/coldfusion.policy -Djava.security.auth.policy={application.home}/../lib/neo_jaas.policy  -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{appli cation.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/cfform/jars,{applicatio n.home}/../wwwroot/WEB-INF/flex/jars -Dcoldfusion.libPath={application.home}/../lib




                                                      # commas will be converted to platform specific separator and the result will be passed

                                                      # as -Djava.ext.dirs= to the VM





                                                      # where to find shared libraries






                                                      # set the current working directory - useful for Windows to control

                                                      # the default search path used when loading DLLs since it comes

                                                      # before system directory, windows directory and PATH




                                                      # JVM classpath

                                                      java.class.path={application.home}/servers/lib,{application.home}/../lib/macromedia_driver s.jar,{application.home}/lib/cfmx_mbean.jar,{application.home}/../lib/oosdk/classes,{appli cation.home}/../lib/oosdk/lib,{application.home}/lib

                                                      • 24. Re: CF Server will not restart
                                                        kurttt Level 1

                                                        Ditto. I pointed java.home to my oracle install and it worked, but I thought maybe the updater was screwing up the contents of the jre folder.


                                                        So I got it working easier with this technique -à


                                                        1.       install CF9, then


                                                        2.       back up the jre folder ( /opt/coldfusion9/runtime/jre to jre.ORIG), then


                                                        3.       install the updater, then


                                                        4.       replace the jre with the existing jre.ORIG folder




                                                        I configured an iPlanet webserver on the initial install….


                                                        When I started the CF9 instance it successfully configured the iPlanet connector and everything worked!