Error: Password file not found: jmxremote.password

Answered

Was trying to deploy an application in another tomcat instance (unpacked from apache-tomcat zip) from IDEA 2019.1.3. 

Keep hitting the above error on deployments. I'm really not sure why, these jmx files aren't in the tomcat distro, that's true. Don't know where the requests for all the jmx attributes in CATALINA_OPTS are coming from. While I do set my own custom CATALINA_OPTS it doesn't have any of these jmx attributes at all? (stops at  workbench.cfg.profile below). Guessing IDEA is adding these extra parameters automatically so if its IDEA why doesn't just add the required jmx files it needs directly into its created tomcat deployment dir (/opt/jetbrains/profiles/.IntelliJIdea2019.1/system/tomcat/modSpace/)? Had to move my idea user profile into /opt as it kept running out of space under /home and I can't change the allocations.

How do I know what password IDEA is expecting to find in the password file? Am I meant to mutate the tomcat distro with these missing jmxremote files I don't have copies of? How do I proceed?

---

output from deployment:

/opt/mango/apache-tomcat-7.0.39/bin/catalina.sh run
Using CATALINA_OPTS:
>> -Xms512m
>> -Xmx1g
>> -Xmn400m
>> -Xss128m
>> -XX:+UseParallelGC
>> -XX:ParallelGCThreads=4
>> -XX:PermSize=128m
>> -XX:MaxPermSize=512m
>> -XX:MaxTenuringThreshold=3
>> -XX:SurvivorRatio=4
>> -Dworkbench.cfg.profile=-mod310
>> -Xms1024m
>> -Xmx2048m
>> -Dsvnkit.wc.17=false
>> -XX:MaxPermSize=512m
>> -Xss228k
>> -XX:+UseParallelGC
>> -XX:MaxGCPauseMillis=1500
>> -XX:GCTimeRatio=9
>> -server
>> -XX:+DisableExplicitGC
>> -XX:OnOutOfMemoryError=/opt/mango/apache-tomcat-7.0.39/bin/collect_info_on_OOM.sh
>> -Dcom.sun.management.jmxremote.port=8090
>> -Dcom.sun.management.jmxremote.ssl=false
>> -Dcom.sun.management.jmxremote.authenticate=true
>> -Dcom.sun.management.jmxremote.password.file=/opt/mango/apache-tomcat-7.0.39/conf/jmxremote.password
>> -Dcom.sun.management.jmxremote.access.file=/opt/mango/apache-tomcat-7.0.39/conf/jmxremote.access
>> -Djava.awt.headless=true

Using JAVA_OPTS:
>> -Xms512m
>> -Xmx1g
>> -Xmn400m
>> -Xss128m
>> -XX:+UseParallelGC
>> -XX:ParallelGCThreads=4
>> -XX:PermSize=128m
>> -XX:MaxPermSize=512m
>> -XX:MaxTenuringThreshold=3
>> -XX:SurvivorRatio=4
>> -Dworkbench.cfg.profile=-mod310
>> -Dcom.sun.management.jmxremote=
>> -Dcom.sun.management.jmxremote.port=8090
>> -Dcom.sun.management.jmxremote.ssl=false
>> -Dcom.sun.management.jmxremote.password.file=/opt/jetbrains/profiles/.IntelliJIdea2019.1/system/tomcat/modSpace/jmxremote.password
>> -Dcom.sun.management.jmxremote.access.file=/opt/jetbrains/profiles/.IntelliJIdea2019.1/system/tomcat/modSpace/jmxremote.access
>> -Djava.rmi.server.hostname=127.0.0.1
_______________________________________________

[2019-07-11 11:46:41,974] Artifact mango-cas-1.0.4: Waiting for server connection to start artifact deployment...
[2019-07-11 11:46:41,975] Artifact modspace:war exploded: Waiting for server connection to start artifact deployment...
Error: Password file not found: /opt/mango/apache-tomcat-7.0.39/conf/jmxremote.password
Disconnected from server
7 comments

Hello,

Try adding -Djavaee.jmxremote.authenticate=false in Help | Edit Custom VM Options and restart IntelliJ IDEA.

If it doesn't help please create issue on YouTrack: http://youtrack.jetbrains.com/issues/IDEA  attaching idea.log ("Help | Show Log in...").

0

It didn't really help, only moved and changed the error message slightly:

/opt/mango/apache-tomcat-7.0.39/bin/catalina.sh run
Using CATALINA_OPTS:
>> -Xms512m
>> -Xmx1g
>> -Xmn400m
>> -Xss128m
>> -XX:+UseParallelGC
>> -XX:ParallelGCThreads=4
>> -XX:PermSize=128m
>> -XX:MaxPermSize=512m
>> -XX:MaxTenuringThreshold=3
>> -XX:SurvivorRatio=4
>> -Dworkbench.cfg.profile=-mod310
>> -Xms1024m
>> -Xmx2048m
>> -Dsvnkit.wc.17=false
>> -XX:MaxPermSize=512m
>> -Xss228k
>> -XX:+UseParallelGC
>> -XX:MaxGCPauseMillis=1500
>> -XX:GCTimeRatio=9
>> -server
>> -XX:+DisableExplicitGC
Error: Password file not found: /opt/mango/apache-tomcat-7.0.39/conf/jmxremote.password
>> -XX:OnOutOfMemoryError=/opt/mango/apache-tomcat-7.0.39/bin/collect_info_on_OOM.sh
>> -Dcom.sun.management.jmxremote.port=8090
>> -Dcom.sun.management.jmxremote.ssl=false
>> -Dcom.sun.management.jmxremote.authenticate=true
>> -Dcom.sun.management.jmxremote.password.file=/opt/mango/apache-tomcat-7.0.39/conf/jmxremote.password
>> -Dcom.sun.management.jmxremote.access.file=/opt/mango/apache-tomcat-7.0.39/conf/jmxremote.access
>> -Djava.awt.headless=true

Using JAVA_OPTS:
>> -Xms512m
>> -Xmx1g
>> -Xmn400m
>> -Xss128m
>> -XX:+UseParallelGC
>> -XX:ParallelGCThreads=4
>> -XX:PermSize=128m
>> -XX:MaxPermSize=512m
>> -XX:MaxTenuringThreshold=3
>> -XX:SurvivorRatio=4
>> -Dworkbench.cfg.profile=-mod310
>> -Dcom.sun.management.jmxremote=
>> -Dcom.sun.management.jmxremote.port=8090
>> -Dcom.sun.management.jmxremote.ssl=false
>> -Dcom.sun.management.jmxremote.authenticate=false
>> -Djava.rmi.server.hostname=127.0.0.1
_______________________________________________

Disconnected from server
0

Do you face the same issue if you run

/opt/mango/apache-tomcat-7.0.39/bin/catalina.sh run

manually from command line?

0

Ah I thought it was just an unpacked apache tomcat distro but I've just found a setenv.sh file in the bin/ directory that isn't in the original distro. This does set more CATALINA_OPTS, might help explain why it looks like there where so many above that aren't in the IDEA tomcat configuration options.

Includes these lines:

export CATALINA_OPTS="${CATALINA_OPTS} 
-Dcom.sun.management.jmxremote.port=8090 \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=true \
-Dcom.sun.management.jmxremote.password.file=${CATALINA_HOME}/conf/jmxremote.password \
-Dcom.sun.management.jmxremote.access.file=${CATALINA_HOME}/conf/jmxremote.access \
-Djava.awt.headless=true"

Which I guess is what's impacting IDEA. If I remove the whole setenv.sh file IDEA deployment gets a bit further, but of course the app now falls over during deployment with cryptic messages.. somehow I need to make the two compatible,

Any other CATALINA_OPTS that might give IDEA problems? or is it mostly these jmx related ones?

0

Right now I'm wrestling with errors from the webapp, not IDEA related except for the knock on impact from excluding that setenv.sh configuration. Getting it to deploy to an embedded tomcat from IDEA as my user not the usual production tomcat user etc...

0

Feel free to contact us if you need any assistance with IDE.

0

Please sign in to leave a comment.