有没有人有想法如何更接近解决我的问题?
我正在使用与Wildfly服务器的jmx的远程连接。
WildFly 10.0.0 Final
JDK 1.8.0_66
域名模式
专用遥控插座
专用遥控连接器
我介绍了一个专用的远程连接器,因为我只想通过这个端口访问jmx并将我的管理保留在另一个端口上。我定义了安全领域以及那里的一些用户。
我在语法“service:jmx :: //:。”中尝试了几个连接字符串但是没有协议可以工作:
这出现在我的WF服务器的server.log中
DEBUG [org.jboss.remoting.remote.connection](默认I / O-5)JBREM000200:远程连接失败:java.io.IOException:XNIO000804:收到无效的消息长度1195725856
<subsystem xmlns="urn:jboss:domain:remoting:3.0">
<endpoint/>
<connector name="remoting" socket-binding="remoting" security-realm="ApplicationRealm"/>
<http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>
</subsystem>
我想在我的Windows客户端上使用VisualVM进行连接,因此我使用了Wildfly jconsole.bat并调整了可执行文件以使用VisualVM。
@echo off
rem -------------------------------------------------------------------------
rem jconsole script for Windows
rem -------------------------------------------------------------------------
rem
rem A script for running jconsole with the remoting-jmx libraries on the classpath.
rem $Id$
set JBOSS_HOME="C:\local\wildfly_10.0"
set JAVA_HOME="C:\Programme\Java\jdk1.8.0_66"
@if not "%ECHO%" == "" echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal
if "x%JAVA_HOME%" =="x" (
echo JAVA_HOME environment variable has not been set - please set and re-run!
goto :EOF
)
if "%OS%" == "Windows_NT" (
set "DIRNAME=%~dp0%"
) else (
set DIRNAME=.\
)
pushd %DIRNAME%..
set "RESOLVED_JBOSS_HOME=%CD%"
popd
if "x%JBOSS_HOME%" == "x" (
set "JBOSS_HOME=%RESOLVED_JBOSS_HOME%"
)
pushd "%JBOSS_HOME%"
set "SANITIZED_JBOSS_HOME=%CD%"
popd
if "%RESOLVED_JBOSS_HOME%" NEQ "%SANITIZED_JBOSS_HOME%" (
echo WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur.
)
set DIRNAME=
if "%OS%" == "Windows_NT" (
set "PROGNAME=%~nx0%"
) else (
set "PROGNAME=jdr.bat"
)
rem Setup JBoss specific properties
if "%JAVA_HOME%" == "x" (
echo JAVA_HOME is not set. Unable to locate the jars needed to run jconsole.
goto END
)
rem Find jboss-modules.jar, or we can't continue
if exist "%JBOSS_HOME%\jboss-modules.jar" (
set "RUNJAR=%JBOSS_HOME%\jboss-modules.jar"
) else (
echo Could not locate "%JBOSS_HOME%\jboss-modules.jar".
echo Please check that you are in the bin directory when running this script.
goto END
)
rem Set default module root paths
if "x%JBOSS_MODULEPATH%" == "x" (
set "JBOSS_MODULEPATH=%JBOSS_HOME%\modules"
)
rem Setup The Classpath
set CLASSPATH=
call :SearchForJars %JBOSS_MODULEPATH%\system\layers\base\org\jboss\remoting\main
call :SearchForJars %JBOSS_MODULEPATH%\system\layers\base\org\jboss\remoting-jmx\main
call :SearchForJars %JBOSS_MODULEPATH%\system\layers\base\org\jboss\remoting3\remoting-jmx\main
call :SearchForJars %JBOSS_MODULEPATH%\system\layers\base\org\jboss\remoting3\main
call :SearchForJars %JBOSS_MODULEPATH%\system\layers\base\org\jboss\logging\main
call :SearchForJars %JBOSS_MODULEPATH%\system\layers\base\org\jboss\xnio\main
call :SearchForJars %JBOSS_MODULEPATH%\system\layers\base\org\jboss\xnio\nio\main
call :SearchForJars %JBOSS_MODULEPATH%\system\layers\base\org\jboss\sasl\main
call :SearchForJars %JBOSS_MODULEPATH%\system\layers\base\org\jboss\marshalling\main
call :SearchForJars %JBOSS_MODULEPATH%\system\layers\base\org\jboss\marshalling\river\main
"%JAVA_HOME%\bin\jvisualvm.exe" "-cp:a" "%CLASSPATH%"
:END
goto :EOF
:SearchForJars
pushd %1
for %%j in (*.jar) do call :ClasspathAdd %1\%%j
popd
goto :EOF
:ClasspathAdd
SET CLASSPATH=%CLASSPATH%;%1
:EOF
答案 0 :(得分:4)
对于Wildfly 10.1:
从wildfly / bin目录运行jconsole.sh。
与服务联系:jmx:remote + http://server:port
以及您添加的管理用户。
您可以在日志输出中看到端口
10:20:36,785 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://server:10090/management