problem with accessing jboss app server with jconsole

Answered

Running a JEE app on jboss eap 7.1. When I start the app in intellij in run mode, I can then connect to the app server with jconsole without any problems (using insecure mode). app server and jboss and intellij are all on the same machine. This is connecting to the jboss process of: "jboss-modules.jar" If I launch the app in debug mode, I get a socket error: "java.net.SocketException: Permission denied: connect" Any suggestions? Thanks

0
5 comments

Try to add

javaee.jmxremote.authenticate=false

in Help | Edit Custom Properties and restart IntelliJ IDEA.

Note that in this case IDEA will administer the server via unsecured JMX connection which is a security vulnerability, potentially allowing remote code execution.

0

Thanks .  Did not work. I am already connecting to jboss in insecure mode.

0

Can you check the full command line your JBoss is running with? Look for the JMX related VM options.

0

see VM and system properties below.  Also, if I start the app in Run configuration, it connects OK, where in Debug it does not.  Thanks.

 

-Dprogram.name=standalone.bat
-Xms1G
-Xmx1G
-XX:MetaspaceSize=96M
-XX:MaxMetaspaceSize=256m
-Djava.net.preferIPv4Stack=true
-Djboss.modules.system.pkgs=org.jboss.byteman
-verbose:gc
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=5
-Xloggc:X:\javatools\jboss-eap-7.1c\standalone\log\gc.log
-XX:GCLogFileSize=3M
-XX:-TraceClassUnloading
-Dorg.jboss.boot.log.file=X:\javatools\jboss-eap-7.1c\standalone\log\server.log
-Dlogging.configuration=file:X:\javatools\jboss-eap-7.1c\standalone\configuration/logging.properties


HIFAuditdialect=org.hibernate.dialect.Oracle10gDialect
HIFPath=C:/temp/hif_deploy/config/
awt.toolkit=sun.awt.windows.WToolkit
file.encoding=Cp1252
file.encoding.pkg=sun.io
file.separator=\
hif-db-url=jdbc:oracle:thin:@usatl-s-cslnx23.bannerlab.int:1521:dev5x
hif_log_home=C:/temp/hif-deploy/logs/
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.awt.printerjob=sun.awt.windows.WPrinterJob
java.class.path=X:\javatools\jboss-eap-7.1c\jboss-modules.jar
java.class.version=52.0
java.endorsed.dirs=C:\Program Files\Java\jdk1.8.0_144\jre\lib\endorsed
java.ext.dirs=C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
java.home=C:\Program Files\Java\jdk1.8.0_144\jre
java.io.tmpdir=C:\Users\amikaml\AppData\Local\Temp\
java.library.path=C:\Program Files\Java\jdk1.8.0_144\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;c:\app\amikaml\product\12.1.0\dbhome_4\bin;c:\app\amikaml\product\12.1.0\dbhome_2\bin;c:\app\amikaml\product\12.1.0\dbhome_1\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\jdk1.8.0_171\bin;C:\Oracle\product\12.1.0\client_1_64bit\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\PuTTY\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Git\cmd;C:\Users\amikaml\AppData\Local\Microsoft\WindowsApps;C:\Users\amikaml\AppData\Local\Programs\Fiddler;X:\javatools\sqlcl\bin;X:\javatools\apache-maven-3.3.3\bin;C:\Program Files (x86)\Common Files\Acronis\VirtualFile\;C:\Program Files (x86)\Common Files\Acronis\VirtualFile64\;C:\Program Files (x86)\Common Files\Acronis\FileProtector\;C:\Program Files (x86)\Common Files\Acronis\FileProtector64\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;c:\curl\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd\core;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;c:\program files\dart\dart-sdk\bin;C:\Users\amikaml\AppData\Roaming\Pub\Cache\bin;C:\Users\amikaml\AppData\Roaming\Pub\Cache\bin;X:\tools\flutter\bin;c:\Users\amikaml\AppData\Local\Android\Sdk\tools\bin;;c:\BillGen\bin;C:\Program Files\Liquid Technologies\Liquid Studio 2019\XmlDataBinder17\Redist17\cpp\win32\bin;C:\Program Files\Liquid Technologies\Liquid Studio 2019\XmlDataBinder17\Redist17\cpp\win64\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\Go\bin;C:\Users\amikaml\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\amikaml\AppData\Local\Programs\Python\Python37-32\;C:\Users\amikaml\AppData\Local\Microsoft\WindowsApps;C:\Users\amikaml\AppData\Local\Programs\Fiddler;C:\Program Files\Mercurial;C:\Users\amikaml\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\amikaml\.dotnet\tools;C:\Users\amikaml\go\bin;.
java.naming.factory.url.pkgs=org.jboss.as.naming.interfaces
java.net.preferIPv4Stack=true
java.protocol.handler.pkgs=org.jboss.net.protocol|org.jboss.vfs.protocol
java.rmi.server.randomIDs=true
java.runtime.name=Java(TM) SE Runtime Environment
java.runtime.version=1.8.0_144-b01
java.security.auth.login.config=jar:file:/X:/javatools/jboss-eap-7.1c/modules/system/layers/base/org/picketbox/main/picketbox-5.0.2.Final-redhat-1.jar!/auth.conf
java.specification.name=Java Platform API Specification
java.specification.vendor=Oracle Corporation
java.specification.version=1.8
java.util.logging.manager=org.jboss.logmanager.LogManager
java.vendor=Oracle Corporation
java.vendor.url=http://java.oracle.com/
java.vendor.url.bug=http://bugreport.sun.com/bugreport/
java.version=1.8.0_144
java.vm.info=mixed mode
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Oracle Corporation
java.vm.specification.version=1.8
java.vm.vendor=Oracle Corporation
java.vm.version=25.144-b01
javax.management.builder.initial=org.jboss.as.jmx.PluggableMBeanServerBuilder
javax.xml.datatype.DatatypeFactory=__redirected.__DatatypeFactory
javax.xml.parsers.DocumentBuilderFactory=__redirected.__DocumentBuilderFactory
javax.xml.parsers.SAXParserFactory=__redirected.__SAXParserFactory
javax.xml.stream.XMLEventFactory=__redirected.__XMLEventFactory
javax.xml.stream.XMLInputFactory=__redirected.__XMLInputFactory
javax.xml.stream.XMLOutputFactory=__redirected.__XMLOutputFactory
javax.xml.transform.TransformerFactory=__redirected.__TransformerFactory
javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema=__redirected.__SchemaFactory
javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom=__redirected.__XPathFactory
jboss.home.dir=X:\javatools\jboss-eap-7.1c
jboss.host.name=hsncol-lt0445
jboss.modules.dir=X:\javatools\jboss-eap-7.1c\modules
jboss.modules.system.pkgs=org.jboss.byteman
jboss.node.name=hsncol-lt0445
jboss.qualified.host.name=hsncol-lt0445
jboss.server.base.dir=X:\javatools\jboss-eap-7.1c\standalone
jboss.server.config.dir=X:\javatools\jboss-eap-7.1c\standalone\configuration
jboss.server.data.dir=X:\javatools\jboss-eap-7.1c\standalone\data
jboss.server.deploy.dir=X:\javatools\jboss-eap-7.1c\standalone\data\content
jboss.server.log.dir=X:\javatools\jboss-eap-7.1c\standalone\log
jboss.server.name=hsncol-lt0445
jboss.server.persist.config=true
jboss.server.temp.dir=X:\javatools\jboss-eap-7.1c\standalone\tmp
line.separator=\r\n
log4j.configurationFile=file:///c:/temp/hif_deploy/config/log4j2.xml
logging.configuration=file:X:\javatools\jboss-eap-7.1c\standalone\configuration/logging.properties
module.path=X:\javatools\jboss-eap-7.1c\modules
org.apache.xml.security.ignoreLineBreaks=true
org.jboss.boot.log.file=X:\javatools\jboss-eap-7.1c\standalone\log\server.log
org.jboss.com.sun.CORBA.ORBUseDynamicStub=true
org.jboss.resolver.warning=true
org.jboss.security.context.ThreadLocal=true
org.omg.CORBA.ORBClass=com.sun.corba.se.impl.orb.ORBImpl
org.omg.CORBA.ORBSingletonClass=com.sun.corba.se.impl.orb.ORBSingleton
org.xml.sax.driver=__redirected.__XMLReaderFactory
os.arch=amd64
os.name=Windows 10
os.version=10.0
path.separator=;
program.name=standalone.bat
sun.arch.data.model=64
sun.boot.class.path=C:\Program Files\Java\jdk1.8.0_144\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_144\jre\classes
sun.boot.library.path=C:\Program Files\Java\jdk1.8.0_144\jre\bin
sun.cpu.endian=little
sun.cpu.isalist=amd64
sun.desktop=windows
sun.io.unicode.encoding=UnicodeLittle
sun.java.command=X:\javatools\jboss-eap-7.1c\jboss-modules.jar -mp X:\javatools\jboss-eap-7.1c\modules org.jboss.as.standalone -Djboss.home.dir=X:\javatools\jboss-eap-7.1c -c standalone-full.xml
sun.java.launcher=SUN_STANDARD
sun.jnu.encoding=Cp1252
sun.management.compiler=HotSpot 64-Bit Tiered Compilers
sun.nio.ch.bugLevel=
sun.os.patch.level=
user.country=US
user.dir=X:\javatools\jboss-eap-7.1c\bin
user.home=C:\Users\amikaml
user.language=en
user.name=amikaml
user.script=
user.timezone=America/New_York
user.variant=

0

I can't reproduce. After setting the custom property below: 

javaee.jmxremote.authenticate=false

an IDEA integration starts JBoss in such a way that an unsecured JMX connection is allowed, in both Run and Debug modes. 

I have created the https://youtrack.jetbrains.com/issue/IDEA-221701 for this issue, please attach there:

- the full textual output from IDEA Run tool window console for the session that does allow you to connect to JBoss via JMX

- and, separately, the full textual output from the debug tool window console for the session which blocks JMX connections.

 

Regards, 

Michael 

 

0

Please sign in to leave a comment.