7 Replies Latest reply on Nov 29, 2016 3:14 PM by Aaron Fogarty

    AWS EC2 issues. Cannot connect to server / Unable to connect, using Spark

    Aaron Fogarty

       

      I am new to Openfire and I wanted to run a basic setup. I have created a redhat EC2 AWS instance and installed openfire on it. The ports 5222, 5223 are open.

       

      These are the steps I made to install Openfire on the server:

      1. sudo yum install java-1.8.0
      2. sudo yum install openjdk-7-jre wget
      3. wget http://download.igniterealtime.org/openfire/openfire-3.9.3-1.i386.rpm
      4. rpm -ivh openfire-3.9.3-1.i386.rpm
      5. yum install libstdc++.i686
      6. /etc/init.d/openfire start

       

      I then logged onto the console using:

      http://ec2-45-143-133-29.us-west-2.compute.amazonaws.com:9090/index.jsp

       

      I went through the setup selecting the default settings and skipped anything that could be skipped.  From windows 10 I then ran Spark and tried to create a new account:

      Username: aaron

      Password: pass

      Domain: ec2-45-143-133-29.us-west-2.compute.amazonaws.com

       

      This gave me the error:

      Unable to connect to ec2-45-143-133-29.us-west-2.compute.amazonaws.com

       

      I also attempted to connect as admin:

      Username: admin

      Password: admin

      Domain: ec2-45-143-133-29.us-west-2.compute.amazonaws.com

       

      This gave me the error :

      Can't connect to server: invalid  name or server not reachable

       

      I am not sure where I have gone wrong can you please advise? Thank you

        • Re: AWS EC2 issues. Cannot connect to server / Unable to connect, using Spark
          wroot

          On the final step of setup were you able to login to Admin Console with admin/admin? I think it was always enabled by default, but you can still check if Inbound registration is enabled on the server (Server Settings > Registration & Login). What Java version is shown in use on the first page of Admin Console? Anything in the logs in Openfire?

           

          Also why not 4.0.3 version of Openfire?

            • Re: AWS EC2 issues. Cannot connect to server / Unable to connect, using Spark
              Aaron Fogarty

              Hi wroot,

               

              Thanks for looking. I am able to login to the console using admin/admin. I have looked at the registration&Login and it is enabled

               

              regOpenfire.JPG

               

              The Java version is1.7.0_55. I was wondering why this was showing up like this since I did the install. On the first server I created I added java after installing Openfire and the version was 1.7.0_55, So on this new server I installed java first but it still shows the older version.

               

              javaVersion.JPG

               

              I used wget http://download.igniterealtime.org/openfire/openfire-3.9.3-1.i386.rpm simply as it was in an example setup, I'd not used wget before. However, I did try to change the version in the command to wget http://download.igniterealtime.org/openfire/openfire-4.0.3-1.i386.rpmbut this did not work for some reason.

               

              The Error Logs:

              at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.jav a:586)

              at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java :44)

              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598 )

              at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)

              at java.lang.Thread.run(Thread.java:745)

              2016.11.29 08:16:50 org.jivesoftware.util.CertificateManager - Error decoding subjectAltName

              java.lang.ClassCastException: org.bouncycastle.asn1.DERTaggedObject cannot be cast to org.bouncycastle.asn1.ASN1Sequence

              at org.jivesoftware.util.CertificateManager.getSubjectAlternativeNames(Certificate Manager.java:260)

              at org.jivesoftware.util.CertificateManager.getPeerIdentities(CertificateManager.j ava:223)

              at org.jivesoftware.util.CertificateManager.isCertificate(CertificateManager.java: 371)

              at org.jivesoftware.util.CertificateManager.isRSACertificate(CertificateManager.ja va:322)

              at org.jivesoftware.openfire.admin.index_jsp._jspService(index_jsp.java:519)

              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)

              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1359)

              at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8)

              at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

              at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:74)

              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

              at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:50)

              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

              at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:78)

              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

              at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:164)

              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1330)

              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)

              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)

              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)

              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:22 7)

              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:94 1)

              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)

              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186 )

              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875 )

              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)

              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:250)

              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:149)

              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)

              at org.eclipse.jetty.server.Server.handle(Server.java:349)

              at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)

              at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConne ction.java:919)

              at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:582)

              at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)

              at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51 )

              at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.jav a:586)

              at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java :44)

              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598 )

              at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)

              at java.lang.Thread.run(Thread.java:745)

               

              The Warning logs:

               

              2016.11.28 19:37:50 org.jivesoftware.util.log.util.CommonsLogFactory - Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.

              2016.11.28 19:37:50 org.jivesoftware.util.log.util.CommonsLogFactory - Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.

              2016.11.28 20:23:59 org.jivesoftware.database.SequenceManager - Autocreating jiveID row for type '25'

              2016.11.28 21:20:10 org.jivesoftware.openfire.IQRouter - User tried to authenticate with this server using an unknown receipient: <iq type="get" to="ec2-35-163-133-29.us-west-2.compute.amazonaws.com" id="aab1a" from="ip-172-31-46-86.us-west-2.compute.internal/b294cba2">

              <query xmlns="jabber:iq:register"/>

              </iq>

              2016.11.28 21:21:43 org.jivesoftware.openfire.IQRouter - User tried to authenticate with this server using an unknown receipient: <iq type="get" to="ec2-35-163-133-29.us-west-2.compute.amazonaws.com" id="aab1a" from="ip-172-31-46-86.us-west-2.compute.internal/9589ed0b">

              <query xmlns="jabber:iq:register"/>

              </iq>

               

              The Info Logs:

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

              at java.lang.Thread.run(Thread.java:745)

              Caused by: javax.net.ssl.SSLException: Received fatal alert: certificate_unknown

              at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)

              at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1619)

              at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1587)

              at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1756)

              at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1060)

              at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:884)

              at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:758)

              at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)

              at org.apache.mina.filter.support.SSLHandler.unwrap0(SSLHandler.java:668)

              at org.apache.mina.filter.support.SSLHandler.unwrapHandshake(SSLHandler.java:624)

              at org.apache.mina.filter.support.SSLHandler.handshake(SSLHandler.java:503)

              at org.apache.mina.filter.support.SSLHandler.messageReceived(SSLHandler.java:306)

              at org.apache.mina.filter.SSLFilter.messageReceived(SSLFilter.java:392)

              ... 14 more

              2016.11.28 19:48:10 org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Group

              2016.11.28 19:48:10 org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Group Metadata Cache

              2016.11.28 20:13:41 org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Secret Keys Cache

              2016.11.28 20:28:06 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports IOException for session: (SOCKET, R: /37.228.248.160:43840, L: /172.31.46.86:5222, S: 0.0.0.0/0.0.0.0:5222)

              java.io.IOException: Connection reset by peer

              at sun.nio.ch.FileDispatcherImpl.read0(Native Method)

              at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)

              at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)

              at sun.nio.ch.IOUtil.read(IOUtil.java:197)

              at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)

              at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.j ava:218)

              at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcesso r.java:198)

              at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProce ssor.java:45)

              at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProce ssor.java:485)

              at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

              at java.lang.Thread.run(Thread.java:745)

              2016.11.28 20:28:06 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports IOException for session: (SOCKET, R: /37.228.248.160:43868, L: /172.31.46.86:5222, S: 0.0.0.0/0.0.0.0:5222)

              java.io.IOException: Connection reset by peer

              at sun.nio.ch.FileDispatcherImpl.read0(Native Method)

              at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)

              at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)

              at sun.nio.ch.IOUtil.read(IOUtil.java:197)

              at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)

              at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.j ava:218)

              at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcesso r.java:198)

              at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProce ssor.java:45)

              at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProce ssor.java:485)

              at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

              at java.lang.Thread.run(Thread.java:745)