Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] unable to connect to JMX port

Just tried this setup on 9.0.6, and it worked.

OPTIONS=jmx
jetty.jmxrmihost=localhost
jetty.jmxrmiport=1099
-Dcom.sun.management.jmxremote
etc/jetty-jmx.xml
-Dorg.eclipse.jetty.jmx.MBeanContainer.LEVEL=DEBUG

Heck, I didn't even use --exec

The extra DEBUG entry enables debug logging for that class, so that I can see that the MBeanContainer is started.

$ java -jar start.jar 
WARNING: System properties and/or JVM args set.  Consider using --dry-run or --exec
2013-10-21 17:05:32.225:DBUG:oejj.MBeanContainer:main: beanAdded org.eclipse.jetty.server.Server@31873729->qtp57003552{STOPPED,10<=0<=200,i=0,q=0}
...(snip)...
2013-10-21 17:05:34.399:DBUG:oejj.MBeanContainer:main: Registered org.eclipse.jetty.server:context=SSL-http/1.1@17ccbdbe,type=httpconfiguration,id=0
2013-10-21 17:05:34.400:DBUG:oejj.MBeanContainer:main: beanAdded HttpConnectionFactory@1f719a8d{HTTP/1.1}->org.eclipse.jetty.jmx.MBeanContainer@566749c5
2013-10-21 17:05:34.401:INFO:oejs.ServerConnector:main: Started ServerConnector@17ccbdbe{SSL-http/1.1}{0.0.0.0:8443}

I can connect to it via jconsole, on the same machine that started the server, but oddly, port 1099 does not show up in netstat.







--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts


On Mon, Oct 21, 2013 at 4:56 PM, joshuarbox-junk1@xxxxxxxxx <joshuarbox-junk1@xxxxxxxxx> wrote:
I am unable to connect JConsole to my JMX instance, nor telnet to port 1099 (the configured JMX port.)  I believe it's causing Intellij IDE not to work with my Jetty server.  Here are the details of what I did:

I have downloaded jetty-distribution-9.0.6.v20130930

I am running it on Mac OS X 10.7.5.

I uncommented the JMX configuration, and the "--exec" configuration, per http://www.eclipse.org/jetty/documentation/current/jetty-jconsole.html

My start.ini looks like this:
#===========================================================
# JMX Management
# To enable remote JMX access uncomment jmxremote and
# enable --exec
#-----------------------------------------------------------
OPTIONS=jmx
jetty.jmxrmihost=localhost
jetty.jmxrmiport=1099
-Dcom.sun.management.jmxremote
etc/jetty-jmx.xml

I noticed this warning on Jetty stderr when JConsole attempts to connect. Looks suspicious, but don't know what to do about it:
objc[8849]: Class JavaLaunchHelper is implemented in both /Library/Java/Home/bin/java and
 /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

Here is the console output at startup:
scml-jrichardson:jetty-distribution-9.0.6.v20130930 jric$ java -jar start.jar
2013-10-11 11:09:28.695:WARN::main: test-realm is deployed. DO NOT USE IN PRODUCTION!
2013-10-11 11:09:28.781:INFO:oejs.Server:main: jetty-9.0.6.v20130930
2013-10-11 11:09:28.830:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps/] at interval 1
2013-10-11 11:09:28.833:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/] at interval 1
2013-10-11 11:09:28.856:INFO:oejsh.ContextHandler:main: Started o.e.j.s.h.MovedContextHandler@57cd3447{/oldContextPath,null,AVAILABLE}
2013-10-11 11:09:29.395:WARN::main: test-spec webapp is deployed. DO NOT USE IN PRODUCTION!
2013-10-11 11:09:29.563:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@367e5959{/test-spec,[file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-test-spec.war-_test-spec-any-/webapp/, jar:file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-test-spec.war-_test-spec-any-/webapp/WEB-INF/lib/test-web-fragment-9.0.6.v20130930.jar!/META-INF/resources/],AVAILABLE}{/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/test-spec.war}
2013-10-11 11:09:29.929:WARN::main: test webapp is deployed. DO NOT USE IN PRODUCTION!
2013-10-11 11:09:30.283:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@3b0037c8{/test,file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-test.war-_test-any-/webapp/,AVAILABLE}{/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/test.war}
2013-10-11 11:09:30.288:INFO:oejsh.ContextHandler:main: Started o.e.j.s.h.ContextHandler@4dcb3539{/javadoc,file:/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/javadoc,AVAILABLE}
2013-10-11 11:09:30.381:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@3ec06d57{/,file:/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/ROOT/,AVAILABLE}{/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/ROOT}
2013-10-11 11:09:30.454:WARN::main: test-jndi webapp is deployed. DO NOT USE IN PRODUCTION!
2013-10-11 11:09:30.494:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@695eb69a{/test-jndi,file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-test-jndi.war-_test-jndi-any-/webapp/,AVAILABLE}{/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/test-jndi.war}
2013-10-11 11:09:30.590:WARN::main: test-jaas webapp is deployed. DO NOT USE IN PRODUCTION!
2013-10-11 11:09:30.601:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@4d129d08{/test-jaas,file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-test-jaas.war-_test-jaas-any-/webapp/,AVAILABLE}{/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/test-jaas.war}
2013-10-11 11:09:30.848:WARN::main: async-rest webapp is deployed. DO NOT USE IN PRODUCTION!
2013-10-11 11:09:30.867:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@7248f9e0{/async-rest,[file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-async-rest.war-_async-rest-any-/webapp/, jar:file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/example-async-rest-jar-9.0.6.v20130930.jar!/META-INF/resources/],AVAILABLE}{/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/async-rest.war}
2013-10-11 11:09:31.148:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@4b6bf659{/proxy,file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-xref-proxy.war-_xref-proxy-any-/webapp/,AVAILABLE}{/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/xref-proxy.war}
2013-10-11 11:09:31.837:INFO:oejs.ServerConnector:main: Started ServerConnector@7bde635a{HTTP/1.1}{0.0.0.0:8080}
2013-10-11 11:09:32.015:INFO:oejs.ServerConnector:main: Started ServerConnector@5ec881b5{SSL-http/1.1}{0.0.0.0:8443}

Any help, much appreciated!

Thanks, --josh


On Monday, October 21, 2013 10:18 AM, Joshua Richardson <jric@xxxxxxxxx> wrote:
I am unable to connect JConsole to my JMX instance, nor telnet to port 1099 (the configured JMX port.)  I believe it's causing Intellij IDE not to work with my Jetty server.  Here are the details of what I did:

I have downloaded jetty-distribution-9.0.6.v20130930

I am running it on Mac OS X 10.7.5.

I uncommented the JMX configuration, and the "--exec" configuration, per http://www.eclipse.org/jetty/documentation/current/jetty-jconsole.html

My start.ini looks like this:
#===========================================================
# JMX Management
# To enable remote JMX access uncomment jmxremote and
# enable --exec
#-----------------------------------------------------------
OPTIONS=jmx
jetty.jmxrmihost=localhost
jetty.jmxrmiport=1099
-Dcom.sun.management.jmxremote
etc/jetty-jmx.xml

I noticed this warning on Jetty stderr when JConsole attempts to connect. Looks suspicious, but don't know what to do about it:
objc[8849]: Class JavaLaunchHelper is implemented in both /Library/Java/Home/bin/java and
 /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

Here is the console output at startup:
scml-jrichardson:jetty-distribution-9.0.6.v20130930 jric$ java -jar start.jar
2013-10-11 11:09:28.695:WARN::main: test-realm is deployed. DO NOT USE IN PRODUCTION!
2013-10-11 11:09:28.781:INFO:oejs.Server:main: jetty-9.0.6.v20130930
2013-10-11 11:09:28.830:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps/] at interval 1
2013-10-11 11:09:28.833:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/] at interval 1
2013-10-11 11:09:28.856:INFO:oejsh.ContextHandler:main: Started o.e.j.s.h.MovedContextHandler@57cd3447{/oldContextPath,null,AVAILABLE}
2013-10-11 11:09:29.395:WARN::main: test-spec webapp is deployed. DO NOT USE IN PRODUCTION!
2013-10-11 11:09:29.563:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@367e5959{/test-spec,[file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-test-spec.war-_test-spec-any-/webapp/, jar:file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-test-spec.war-_test-spec-any-/webapp/WEB-INF/lib/test-web-fragment-9.0.6.v20130930.jar!/META-INF/resources/],AVAILABLE}{/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/test-spec.war}
2013-10-11 11:09:29.929:WARN::main: test webapp is deployed. DO NOT USE IN PRODUCTION!
2013-10-11 11:09:30.283:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@3b0037c8{/test,file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-test.war-_test-any-/webapp/,AVAILABLE}{/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/test.war}
2013-10-11 11:09:30.288:INFO:oejsh.ContextHandler:main: Started o.e.j.s.h.ContextHandler@4dcb3539{/javadoc,file:/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/javadoc,AVAILABLE}
2013-10-11 11:09:30.381:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@3ec06d57{/,file:/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/ROOT/,AVAILABLE}{/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/ROOT}
2013-10-11 11:09:30.454:WARN::main: test-jndi webapp is deployed. DO NOT USE IN PRODUCTION!
2013-10-11 11:09:30.494:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@695eb69a{/test-jndi,file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-test-jndi.war-_test-jndi-any-/webapp/,AVAILABLE}{/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/test-jndi.war}
2013-10-11 11:09:30.590:WARN::main: test-jaas webapp is deployed. DO NOT USE IN PRODUCTION!
2013-10-11 11:09:30.601:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@4d129d08{/test-jaas,file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-test-jaas.war-_test-jaas-any-/webapp/,AVAILABLE}{/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/test-jaas.war}
2013-10-11 11:09:30.848:WARN::main: async-rest webapp is deployed. DO NOT USE IN PRODUCTION!
2013-10-11 11:09:30.867:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@7248f9e0{/async-rest,[file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-async-rest.war-_async-rest-any-/webapp/, jar:file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/example-async-rest-jar-9.0.6.v20130930.jar!/META-INF/resources/],AVAILABLE}{/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/async-rest.war}
2013-10-11 11:09:31.148:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@4b6bf659{/proxy,file:/private/var/folders/b6/1hrm44bs67sf00dhml3ntldxcr632h/T/jetty-0.0.0.0-8080-xref-proxy.war-_xref-proxy-any-/webapp/,AVAILABLE}{/Users/jric/Downloads/jetty-distribution-9.0.6.v20130930/webapps.demo/xref-proxy.war}
2013-10-11 11:09:31.837:INFO:oejs.ServerConnector:main: Started ServerConnector@7bde635a{HTTP/1.1}{0.0.0.0:8080}
2013-10-11 11:09:32.015:INFO:oejs.ServerConnector:main: Started ServerConnector@5ec881b5{SSL-http/1.1}{0.0.0.0:8443}

Any help, much appreciated!

Thanks, --josh



_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top