Hi,
I have jmx.address=0.0.0.0 and can connect from a remote host on a LAN
via connect string =
service:jmx:rmi://my-james-host-name/jndi/rmi://my-james-host-name:1000/jmxrmi
However, going through a firewall/port-forwarding fails due to randomly
created sockets by RMI.
Read more on
http://olegz.wordpress.com/2009/03/23/jmx-connectivity-through-the-firewall
http://blogs.law.harvard.edu/hoanga/2006/07/07/getting-java-jmx-to-work-through-firewalls-properly
thx,
Eric
On 04/26/2012 10:56 PM, [email protected] wrote:
I want to allow jmx from any remote server (james will be behind the firewall
and the jmx port will be open only locally). When I run using run.sh I have
EXTRA_JVM_ARGUMENTS="-Xms128m -Xmx256m
-Djava.system.class.loader=org.apache.james.container.spring.context.JamesClassLoader
-Dcom.sun.management.jmxremote.port=9915 -Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.authenticate=false
-Dmail.mime.multipart.ignoremissingendboundary=true
-Dmail.mime.multipart.ignoremissingboundaryparameter=true
-Dmail.mime.ignoreunknownencoding=true -Dmail.mime.uudecode.ignoreerrors=true
-Dmail.mime.uudecode.ignoremissingbeginend=true
-Dmail.mime.multipart.allowempty=true -Dmail.mime.base64.ignoreerrors=true
-Dmail.mime.encodeparameters=true -Dmail.mime.decodeparameters=true
-Dmail.mime.address.strict=false -Djames.message.usememorycopy=false
-Djava.util.logging.config.file=$REPO/../config/logging.properties
-Dtangosol.coherence.distributed.localstorage=true
-Dtangosol.coherence.cacheconfig=$REPO/../config/coherence-cache-config.xml
-Dtangosol.pof.config=$REPO/../config/pof-config.xml -Dtangos
o
l.coherence.clusterport=7777 -Dtangosol.coherence.cluster=MailerCluster
-Dtangosol.coherence.role=MailerComponent"
And when using the wrapper I put the same jmx switches wrapper.conf.
I checked that I can telnet to port 9915, but when I use jconsole I get an error
"The connection to 10.90.110.135:9915 did not succeed".
In jmx.properties I have:
#jmx.address=localhost
jmx.port=9915
I believe jmx.properties should not be in the picture since I configured the
server to just grab the platform mbean server, see below.
Nothing of any use in any of the logs or on the console. I register my custom
mbeans without any issues. Help will be greatly appreciated.
Thanks,
-Paul
<!--
JMX Server
-->
<bean id="mbeanserver" class="java.lang.management.ManagementFactory"
factory-method="getPlatformMBeanServer"/>
<!--
JMX Export
-->
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter"
lazy-init="false">
<property name="beans">
<map>
<entry key="org.apache.james:type=server,name=smtpserver"
value-ref="smtpserver"/>
<entry key="org.apache.james:type=server,name=lmtpserver"
value-ref="lmtpserver"/>
<entry key="org.apache.james:type=server,name=pop3server"
value-ref="pop3server"/>
<entry key="org.apache.james:type=server,name=imapserver"
value-ref="imapserver"/>
<entry key="org.apache.james:type=component,name=domainlist"
value-ref="domainlistmanagement"/>
<entry key="org.apache.james:type=component,name=dnsservice"
value-ref="dnsservice"/>
<entry key="org.apache.james:type=component,name=recipientrewritetable"
value-ref="recipientrewritetablemanagement"/>
<entry key="org.apache.james:type=component,name=usersrepository"
value-ref="usersrepositorymanagement"/>
<entry key="org.apache.james:type=component,name=fetchmail"
value-ref="fetchmail"/>
<entry key="org.apache.james:type=component,name=mailboxmanagement"
value-ref="mailboxmanagermanagement"/>
<entry
key="org.apache.james:type=component,component=mailetcontainer,name=mailspooler"
value-ref="mailspooler"/>
<entry key="org.apache.james:type=component,name=mailboxcopier"
value-ref="mailboxcopiermanagement"/>
<entry key="org.apache.james:type=component,name=james23importer"
value-ref="james23importermanagement"/>
<entry key="org.apache.james:type=container,name=logprovider"
value-ref="logprovider"/>
</map>
</property>
<property name="assembler">
<bean
class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler">
<property name="managedInterfaces"
value="org.apache.james.smtpserver.netty.SMTPServerMBean,org.apache.james.pop3server.netty.POP3ServerMBean,org.apache.james.imapserver.netty.IMAPServerMBean,org.apache.james.fetchmail.FetchSchedulerMBean,org.apache.james.domainlist.api.DomainListManagementMBean,org.apache.james.dnsservice.api.DNSServiceMBean,org.apache.james.rrt.api.RecipientRewriteTableManagementMBean,org.apache.james.user.api.UsersRepositoryManagementMBean,org.apache.james.adapter.mailbox.MailboxManagerManagementMBean,org.apache.james.container.spring.mailbox.MailboxCopierManagementMBean,org.apache.james.mailetcontainer.api.jmx.MailSpoolerMBean,org.apache.james.container.spring.lifecycle.LogProviderManagementMBean"/>
</bean>
</property>
</bean>
<bean id="usersrepositorymanagement"
class="org.apache.james.user.lib.UsersRepositoryManagement" />
<bean id="recipientrewritetablemanagement"
class="org.apache.james.rrt.lib.RecipientRewriteTableManagement" />
<bean id="domainlistmanagement"
class="org.apache.james.domainlist.lib.DomainListManagement" />
<bean id="mailboxmanagermanagement"
class="org.apache.james.adapter.mailbox.MailboxManagerManagement" />
<bean id="mailboxcopiermanagement"
class="org.apache.james.container.spring.mailbox.MailboxCopierManagement" />
<bean id="james23importermanagement"
class="org.apache.james.container.spring.tool.James23ImporterManagement" />
This email was sent to you by Thomson Reuters, the global news and information
company. Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be the views of
Thomson Reuters.
--
eric | http://about.echarles.net | @echarles
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]