• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF 9.0.1 Solr does not respect Java VM Path

Participant ,
Mar 25, 2011 Mar 25, 2011

Copy link to clipboard

Copied

As part of securing some of our machines for DoD use we have to maintain up to date Java versions.  To do this we install the latest JDKs and use the Server Settings > Java and JVM > Java Virtual Machine Path to then tell CF to use it.  We've been doing this since CF4 with no issues and when we moved to CF6+ we continued the process but also after doing this we then remove the jre folder from the runtime folder from within CF itself. Well I just setup and installed my first CF9 + Win 2008 R2 server and after doing this the Solr service fails to start.  This then had me digging into its folder structure and it has its own jre folder within its folder structure as well.  However using Sysinternals Process Monitor I can see the Solr service is NOT using the jre folder from within it's own structure but is actually going up and "trying" to use the runtime\jre folder which I've removed so it causes the service to fail.  I can actually remove the solr\jre folder as long as the runtime\jre folder exists.

So there are several issues with this.

  • Solr has yet another Java installation within itself
  • Solr does not use its own Java even though there's a copy there
  • Solr does not respect the overall Java VM Path setting

Views

1.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , May 04, 2011 May 04, 2011

Adobe replied to my bug with the location of the solr configuration variable to point it at the external JVM.

ColdFusion9\solr\solr.lax

lax.nl.currentvm=JVM_PATH

This seems to be working correctly so far now.

Votes

Translate

Translate
Community Expert ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

Brentil, I would assert that if Solr is "trying" to use the runtime/jre to find classes then perhaps your last point is not correct: maybe instead it IS honoring the classpath, but it's other than what you're seeing. Rather than rely on what you see as the textarea field of the Java and JVM page (for the classpath), look instead in the settings summary page to see what it shows to be the classpath.

As for your removing the CF JRE when you would add a new JDK, that's interesting. I'd not heard of people doing it. Of course, the fact you used ProcMon to prove that Solr looked there if its own JRE was removed may be how you proved that when you added a new JDK for CF, it too still looked in the old jre location. Did you prove that? I would be surprised, and it could suggest that people who added a new JDK may not have always been leveraging it alone. That would be a surprise. Let us know if you did prove that. Perhaps others would want to start removing it--though this Solr problem is certainly another challenge in considering that.

Will look forward to seeing how all this turns out.

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

When we first started using CF6 we tested and proved that altering the JVM location moved all of the core java calls to that installed JDK installation.  At that point we would remove the jre folder from within CF since it was older and violation of DoD security policies.  We've been running that way since CF6 with no issues at all to development and production level applications.  All of the CF specific code resides within its own DLLs and JAR files that exist outside of the jre folder.  This is how CF can run off of the JRUN & other enterprise java servers.

So one would expect that then if Solr has specific versions of its own files within its own special jre folder it would look there.  However instead it's loading from the jre inside of the CF folders.  I actually took and removed the jre from inside of the Solr folder to test it and all it cared about was the existance of the one in the CF folder.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

Thanks for the clarification on why you would remove it in the past.

As for the problem you're having with Solr, I'm just explaining that Java has a notion of a classpath, which is a list of directories through which the JVM will look when trying to load a class. If you look at what CF shows to be the classpath, then THAT is why it's looking where it is.

Does that help?

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

The classpath does point to the runtime folder for CF itself since class paths are a different setting than the JRE itself.  Which this may explain why Solr is looking there.  However it does not explain why it's looking there for the JRE components when it has its own JRE and the system JRE is pointed elsewhere.

Either way it's a bug on the part of the CF server and needs to be resolved.  It either needs to read its own JRE or respect the JVM setting and read that one.  I personally don't understand why there has to be ANOTHER copy of the jre inside of the folder structure in the first place especially if it's not even using it...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

Well, to be clear, I'm not an Adobe representative, so I can't do anything if you feel there is a bug. You'd want to report that in the CF bug tracking area instead: http://www.adobe.com/go/cf_bugs

As for why the JVM searches for classes in other than the jre.home, I can't explain that. Maybe someone else can. I would just say that as far as normal class loading goes, it works as we've observed: searching through the directories in the classpath to find a class when loaded, and it's done in the order that directories are listed, so that if a class is not found in one then it looks in the next.

I'd not be surprised that it would work the same for "application" classes as well as classes within the JRE itself.

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 31, 2011 Mar 31, 2011

Copy link to clipboard

Copied

I've submitted this as a bug, thank you for your assistance.

http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=86770

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 04, 2011 May 04, 2011

Copy link to clipboard

Copied

Adobe replied to my bug with the location of the solr configuration variable to point it at the external JVM.

ColdFusion9\solr\solr.lax

lax.nl.currentvm=JVM_PATH

This seems to be working correctly so far now.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 14, 2014 Jul 14, 2014

Copy link to clipboard

Copied

I'd like to add a followup to this thread from 3 years ago, in case anyone may find it in the future as I just did doing a search for something. Keith's last note had discussed how to modify the solr jvm configuration file (solr.lax in CF9) to point to a new JVM.

He had said the line to modify was that for lax.nl.currentvm but instead it's than lax.nl.current.vm. I clarify this as much for those who may be searching for references to it, so they may find this discussion.

Also, FWIW for future readers, in CF10+ the file is now instead called jetty.lax and is also located in a different directory: \[cf10]\cfusion\jetty, or [cf10]\[instancename]\jetty if you have created a new CF10 Enterprise instance.

Hope that's helpful.


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 16, 2014 Jul 16, 2014

Copy link to clipboard

Copied

Hi Leith,

You have surely found a solution that is bound to help someone else in future. Please mark your last post as the 'correct' answer.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 18, 2014 Dec 18, 2014

Copy link to clipboard

Copied

Marked it as the answer, this thread was from before there was an answer system in the forums.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 18, 2014 Dec 18, 2014

Copy link to clipboard

Copied

LATEST

OK. Cheers.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation