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

CF8 Multiserver configuration - how to identify jvm config file for an instance?

Guest
Jun 25, 2012 Jun 25, 2012

Copy link to clipboard

Copied

hello.

i've inhereted a web server running the multiserver configuraiton of cf8, on a win2003 (64 bit), and i am wondering how to identify the jvm config file used by each instance?  i've found a number of config files in the JRun4/bin/ folder, but unfortunately they are not in all cases named the same as the cf instance. 

thanks for your help.

Views

3.8K

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

Community Expert , Jun 26, 2012 Jun 26, 2012

@djangolives, the simple answer is that what you seek is tracked in the registry. The longer answer, including how to get that info from the command line, follows.

Since you’re running CF on Windows, then if you’re running each instance as a service, then @joopk was on the right track. The way to indicate a different jvm.config for an instance is to modify the service definition to denote it. And as Carl later noted, you do that using the command line jrunsvc command and the –config argument. Sa

...

Votes

Translate

Translate
New Here ,
Jun 25, 2012 Jun 25, 2012

Copy link to clipboard

Copied

One way is to start the JRUN console and look at the settings of each instance to get a clue. It does not show the name of the config file though.

But perhaps a better way is to look at the WIndows service of each instance in the services control panel and look for the  command line of the service, it contains the config file name. We moved from Windows to Linux so I can not supply exact steps.

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
Guest
Jun 25, 2012 Jun 25, 2012

Copy link to clipboard

Copied

thanks for the response.

i'd tried that one already, and unfortunately all the windows services point at '"C:\JRun4\bin\jrunsvc.exe"...

in terms of the JRUN console you mention, what more specifically are you referring to?  and how do i start 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
Guide ,
Jun 25, 2012 Jun 25, 2012

Copy link to clipboard

Copied

On windows someone would have done something like jrunsvc -install <server_name> <server_name> "<service_name>" -config jvm_<server_name>.config.

Maybe the "jvm.config" has a comment inside it expaining which instance it belongs to?

Something you could do is enable some JVM logging and specify a sepate log name to the JVM arguments, then when you stop start an instance you will be able to identify the "jvm.config" to instance by the log name generated EG:

One JVM.CONFIG

java.args=-server etc -XX:+UseParallelGC -Xloggc:which_instance1.log etc

Another JVM.CONFIG

java.args=-server etc -XX:+UseParallelGC -Xloggc:which_instance2.log etc

HTH, Carl.

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
Guest
Jun 25, 2012 Jun 25, 2012

Copy link to clipboard

Copied

thanks for the suggestions.  i'd imagine that's exactly how this was set up initially...

unfortunately the config files offer no pointers that i could find.  pretty plain jane. 

in terms of logging, that's not a bad idea, however as this is a production machine, i'd prefer to avoid restarting the instances if possible.  i'll keep this one in mind if i can't find another solution.

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 ,
Jun 25, 2012 Jun 25, 2012

Copy link to clipboard

Copied

The JRUN Admin Server is normally pre-installed as a service, as part of the CF installation. It normally runs under port 8000 so you could access it at http://localhost:8000 on the server itself for instance.

I has a settings tab for each instance, which shows the JVM settings. IF each one had some unique setting, like Carl Type 3 suggests, you'd possibily see it there.

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
Guest
Jun 25, 2012 Jun 25, 2012

Copy link to clipboard

Copied

ah, didn't realize you were talking about the cfamin.  i tried there as well, the instance manager section shows the various instances, but there's not much in the way in terms of information on them (i checked the edit screen for each instance as well).  perhaps you were meaning to check elsehwere?

thanks.

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
Guide ,
Jun 25, 2012 Jun 25, 2012

Copy link to clipboard

Copied

If the JVM arguments are "plain jane" not different to each other JMC will still not make the distinction clear. EG:

Capture.JPG

Capture2.JPG

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 ,
Jun 25, 2012 Jun 25, 2012

Copy link to clipboard

Copied

The JRUN Admin is not the same as the CF Admin..

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
Guide ,
Jun 26, 2012 Jun 26, 2012

Copy link to clipboard

Copied

What about use JMC to apply a sane change to instance JVM arguments setting then go check Jrun4\bin\ as to which JVM.CONFIG has been updated. I expect there should be need to restart your production instances.

Hope helps, Carl.

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 ,
Jun 26, 2012 Jun 26, 2012

Copy link to clipboard

Copied

@djangolives, the simple answer is that what you seek is tracked in the registry. The longer answer, including how to get that info from the command line, follows.

Since you’re running CF on Windows, then if you’re running each instance as a service, then @joopk was on the right track. The way to indicate a different jvm.config for an instance is to modify the service definition to denote it. And as Carl later noted, you do that using the command line jrunsvc command and the –config argument. Sadly, there is no jrunsvc argument that lists these definitions (that I know of).

And you’re right that if you look at the Windows service definition, all you’ll see is it pointing to jrunsvc.exe itself, not indicating the jvm.config.

Instead, the configuration is saved as part of the Service definition as tracked by Windows in the registry, and that’s where you need to look to find this info. If you’re comfortable using RegEdit, I’ll share what you need to find it. If you may prefer to use a command-line tool instead, I’ll show that also, which is helpful both to get for many instances quickly as well as to avoid risk of editing values by mistake in regedit.

First, note that all services are defined in the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\. So let’s say your service name of interest was “Adobe Coldfusion 8 AS instance1”. You’d find that there’s a key there with that name. And under that key you will see it has various values, among which is one (if you did modify it to have its own jvm.config) called “Parameters”, which is where the JRunSVC command would place this –config argument and value if provided.

So that’s one way to find what config is used for what service. But a second way is to use the REG command-line tool (should be available free within Windows on most versions that I’ve seen.) You’d want to use its “query” argument, and you then pass it the keyname (including the service/instance name, so it’s varied a bit from what I showed above). Note also that if the service name has spaces, then you need to enclose the whole keyname in quotes.

reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Adobe Coldfusion 8 AS instance1"

That will show all the keys and their values, but even niftier is that you can get it to list JUST the one value you’re interested in (in this case, the one called “parameters”) using the /v argument:

reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Adobe Coldfusion 8 AS instance1" /v parameters

Note also that the reg query command also lets you specify the machine name (before the keyname) if you wanted to use this to run against other servers in your network, and it has still other args that may be of interest. Run “reg query /?” from the command line to learn more.

I do think this will be the most straight-forward way to get the info you seek, @djangolives. Let us know if that helps or if you need more info.

/charlie

PS As I was responding to this note, and referring to djangolives and joopk above, I wondered, “do people realize they can change the forums to show their real name rather than just their Adobe ID?” I do appreciate that some may like it that way, but if you maybe didn’t know you could and you’d like to show your name instead, see another forum entry I just created at http://forums.adobe.com/thread/1029289.

PPS I am also going to blog all this above. I was torn as to whether to do it there and point to it here, or vice-versa. I decided it may be best for all concerned to just repeat the info in both places. I’ll update the blog entry if we get some new info to modify what I propose above.


/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 ,
Jun 26, 2012 Jun 26, 2012

Copy link to clipboard

Copied

One more little tip about the above. If you wanted to just list all the jvm.configs for all the instances, without naming each one, you can do that also, using the REG command's /s command, as in:

reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services" /v parameters /s


This would return a list of each service definition that had a Parameters value. Here's an example of how that could look:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Macromedia JRun Admin Server

    Parameters    REG_SZ    -config C:\Jrun4\bin\jvm.config

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Macromedia JRun CFusion Server

    Parameters    REG_SZ    -config C:\\Jrun4\\bin\\jvm2.config

That's a lot easier than listing each service one by one! 🙂

Of course, technically this variation of the command would return info on any services that may have a parameters value, beyond just CF services. I'll note taht you could limit this list still further, using any of a number of available arguments to the REG QUERY command. Again, use REG QUERY /? to get more details.


/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
Guest
Jun 26, 2012 Jun 26, 2012

Copy link to clipboard

Copied

thanks for the answers everyone.  i greatly appreciate it.  hopefully i'll get to trying these later today...i'll follow up when i do.

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 ,
Jun 26, 2012 Jun 26, 2012

Copy link to clipboard

Copied

Here' the blog entry I referred to:

How to identify what jvm.config a #ColdFusion instance uses (and vice-versa)

http://www.carehart.org/blog/client/index.cfm/2012/6/26/identifying_what_instance_uses_a_given_jvm_c...

(Or a shortened link: http://bit.ly/MVmBUo)

BTW, to the suggesiton above of using the JRun Admin (or Management Console, or JMC), I do not find that it lists what jvm.config is used for a given instance, if indeed that instance it configured to run as a Windows service (which is what I think what djangolives had been referring to). If anyone finds otherwise, please do report it here, and I'll add that to my blog entry. Thanks.


/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
Guest
Jun 27, 2012 Jun 27, 2012

Copy link to clipboard

Copied

thanks charlie, the reg query utility worked like a charm...now i can actually go and clean these jvm config args up.

thanks to everyone else that responded as well.

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 ,
Jun 27, 2012 Jun 27, 2012

Copy link to clipboard

Copied

LATEST

Good to hear. Thanks (and to jkaashoek for confirming things about the JMC.)

/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 ,
Jun 27, 2012 Jun 27, 2012

Copy link to clipboard

Copied

Indeed, the JRUN management console doe not show the name of the config file used. But it shows the JVM settings so if you added a unique JVM setting to each config file yu could find it that way. It is a roundabout way.

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