Disable jmx in red5 - java

Red5 takes more time while starting in centOS. I checked the stdout.log. There is JMX timeout error.
[ERROR] [main] org.red5.server.jmx.JMXAgent - {}
java.io.IOException: Cannot bind to URL [rmi://:9999/red5]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 69.164.154.24; nested exception is:
java.net.ConnectException: Connection timed out]
How to disable JMX in red5..?

Red5 used JMX for monitoring deployed application from remote. By default port 9999 used for JMX. It will wait for upto 100/200 seconds if program can not able to make connection with port 9999. To disable JMX monitoring you have to set false for "enableRmiAdapter" in red5-common.xml in conf folder of red5 server.
<bean id="jmxAgent" class="org.red5.server.jmx.JMXAgent" init-method="init">
<!-- The RMI adapter allows remote connections to the MBeanServer -->
<property name="enableRmiAdapter" value="false"/>
....
FYI I am using red5-0.9.1 and JMX port and host configuration in red5.properties file.
For 1.0 and more follow this https://code.google.com/p/red5/wiki/SlowStartup

Related

Cant run index.jsp from web aplication

I made Java Enterprise app using Java 15.0.2 and GlassFish 4.1.1.
This is what I got in glassfish output:
`C:\Users\s\Documents\Java\glassfish4\glassfish\bin\asadmin.bat start-domain domain1
Attempting to start domain1.... Please look at the server log for more details.....
C:\Users\s\.jdks\openjdk-15.0.2\bin\java.exe -Dfile.encoding=windows-1252 -classpath C:\Users\s\AppData\Local\Temp\classpath1367306742.jar com.intellij.javaee.oss.process.JavaeeProcess 64094 com.intellij.javaee.oss.glassfish.agent.Glassfish31Agent
[2021-03-19 09:07:21,872] Artifact demo:war exploded: Waiting for server connection to start artifact deployment...
Detected server admin port: 4848
Detected server http port: 8080
`
Unable to ping server at localhost 4848
Use the ping-connection-pool subcommand in remote mode to test if a connection pool is usable. For example, if you create a new JDBC connection pool for an application that is expected to be deployed later, you can test the JDBC pool with this subcommand before the application is deployed. Running a ping will force the creation of the pool if it hasn't already been created.
Before You Begin
According to Oracle Glassfish admin guide
Before you can contact a connection pool, the connection pool must be created with authentication, and the server or database must be running.
Ensure that the server is running.
Remote subcommands require a running server.
Ping a connection pool by using the ping-connection-pool(1) subcommand.

Why does Port 9721 intermittently refuse connections on Apache Tomcat 8.5 running on Windows Server 2012 R2?

Web Server: Apache Tomcat 8.5
Operating System: Windows Server 2012 R2
Port: 9721
We are running a Web server on our internal network and have about 8500 kiosks connecting through our VPN to a Java servlet that is running on this port: <Server IP Address>:9721
This Web server was set up by a former employee and we are not sure how it was originally configured.
We noticed recently that about 25% of the connection attempts are being refused (Connection Refused error). We found this information by monitoring Port 9721 using PRTG and this monitoring tool is reporting that this port is refusing connections on multiple occasions within each hour throughout the day. I have not been able to find a pattern to the refused connections...it appears to be intermittent.
Our network administrator says it is not a firewall issue, but I have not ruled out this possibility. We have tried to review the "maxconnections" setting in the Tomcat server.xml configuration file, but cannot find the "maxconnections" attribute included in that configuration file. We do not have the Tomcat Manager Application installed on this server that I can find.
How do I troubleshoot and resolve this port connection issue?

JMS - Couldn't create session factory even if connection to remote provider is OK

I make a jar to connect to JMS provider, it's work fine in a server (a) but doesn't work on a server (b).
I verify that connection to the JMS provider from server (b) is OK via telnet as shown below:
-> telnet -d 10.127.161.247 4447
Trying 10.127.161.247...
Connected to 10.127.161.247.
The logs and exception that it's throw is below :
2018/08/01 11:19:47:921 - Processing command line arguments...
2018/08/01 11:19:47:927 - Preparing the output... Writing to file = true
2018/08/01 11:19:50:315 - Trying to establish connection, attempt: 0
2018/08/01 11:19:52:132 - Connecting to provider: remote://10.127.161.247:4447 using user: oad_user
2018/08/01 11:19:52:132 - Creating a regular (non-secure) connection factory...
2018/08/01 11:19:53:073 - Opening a connection to the JMS provider...
2018/08/01 11:20:24:192 - Attempt failed: Failed to create session factory
javax.jms.JMSException: Failed to create session factory
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:675)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createTopicConnection(ActiveMQConnectionFactory.java:267)
at com.alcatel.ossgw.client.jms.JmsSubscriberClient.prepareConnection(JmsSubscriberClient.java:334)
at com.alcatel.ossgw.client.jms.JmsSubscriberClient.connect(JmsSubscriberClient.java:274)
at com.alcatel.ossgw.client.jms.JmsSubscriberClient.listen(JmsSubscriberClient.java:97)
at com.alcatel.ossgw.client.jms.JmsSubscriberClient.main(JmsSubscriberClient.java:536)
Caused by: ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ119007: Cannot connect to server(s). Tried with all available servers.]
at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:818)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:67
I don't how to debug such a problem knowing i'm new in JMS, i'll be grateful for any remarks and ideas..
Many thanks
Did you ever find out why this was happening?
I have a related issue where an active JMS connection suddenly disconnects and the system starts throwing this exception until a system restart is done and then it connects again without fail.

Could not connect to SMTP host, java.security.NoSuchAlgorithmException: Error constructing implementation

When I use spring java mail send email,In the LAN test environment and the local development environment is no problem, but released to the production environment, reported the following exception:
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.s
mtp.SMTPTransport,Oracle]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.exmail.qq.com", port 465, isSSL false
Exception in thread "Thread-18" org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtp.exmail.qq.com, port: 465; nested exception is: java.net.SocketException: java.security.NoSuchAlgorithmException: Error
constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.s ecurity.ssl.SSLContextImpl$DefaultSSLContext).
The test environment and the production environment of the jre version are 1.8 update 121. both of windows server 2012
Did you see the connection debugging tips in the JavaMail FAQ? There's probably a firewall or anti-virus preventing you from connecting.
As already said by #Bill, it is mostly network infra team's work to amend firewall inbound/outbound policies/ proxy connections/ opening firewall ports/ DNS lookup issues.
To check end url connectivity via firewall rules:
Run tracert/traceroute <host-name>
tracert on windows OS and traceroute on *nix OS.
To check whether port is opened.
Run telnet <host-name> <port-number>
To check proxy connections.
Run ping <host-name>
To check DNS issues.
Run nslookup <host-name>
The above nslookup should resolve host-name to ip address. If not, you will have to add the hostname and the ip address in hosts file /etc/* directory.
I found these 4 techniques to be helpful for me to debug network infra issues. I might have missed many, kindly forgive me!
Hope this helps!

Remote connection of Jboss 7 server fails with Proxy exception

I have a Jboss 7 server running & accepting secure connections on port 443.
All along i was testing locally which was working fine . However now when i make connection attempts i get a
"javax.naming.NamingException: Failed to create proxy [Root exception is java.lang.IllegalStateException: ..." .
I tried to follow what is written # EJB invocations from a remote client using JNDI
I guess my jndi.properties & jboss-ejb-client.properties file need changes . I think i got it right but still no success .
1 ) jndi.properties
java.naming.factory.url.pkgs=org.jboss.ejb.client.naming
2 ) jboss-ejb-client.properties
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
remote.connections=default
remote.connection.default.host=10.160.148.61
remote.connection.default.port = 4447
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
Any suggestions anyone . Making the port 443 also doesnt help .
My ejb call from the client
InitialContext aJNDI = new InitialContext();
Ppi handle = (Ppi) aJNDI
.lookup("ejb:PPIEAR/PService/PConnect!com.gem.p.PConnection?stateful");
Posting Full stracktrace :
log4j: Finished configuring.
- JBoss EJB Client version 1.0.5.Final
- XNIO Version 3.0.3.GA
- XNIO NIO Implementation Version 3.0.3.GA
- JBoss Remoting version 3.2.3.GA
- Could not register a EJB receiver for connection to remote://10.160.148.61:4447
java.lang.RuntimeException: Operation failed with status WAITING
at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:93)
at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:121)
at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.<init>(ConfigBasedEJBClientContextSelector.java:78)
at org.jboss.ejb.client.EJBClientContext.<clinit>(EJBClientContext.java:77)
at org.jboss.ejb.client.EJBClient.createSession(EJBClient.java:160)
at org.jboss.ejb.client.naming.ejb.EjbNamingContext.doCreateProxy(EjbNamingContext.java:135)
at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createEjbProxy(EjbNamingContext.java:113)
at org.jboss.ejb.client.naming.ejb.EjbNamingContext.lookup(EjbNamingContext.java:96)
at javax.naming.InitialContext.lookup(Unknown Source)
..
Quoting this page:
WARN: Could not register a EJB receiver for connection to
remote://10.160.148.61:4447 java.lang.RuntimeException: Operation failed
with status WAITING
This is commonly caused by a wrong combination of IP or port in the file jboss-ejb-client.properties.
You might be unable to reach that host address
Maybe you are using a port-offset on that server, so instead of port 4447 you should use 4447 + offset
You could start by testing if you can connect to your target using telnet:
telnet 10.160.148.61 4447

Categories

Resources