5 Replies Latest reply on Aug 20, 2014 9:23 AM by Ramesh Reddy

    Access VDB from different machine

    Zachary Price Newbie



      Say I have two virtual machines:

      -One has JBoss EAP 6.1, Teiid, and a VDB deployed

      -The other has Pentaho BA Enterprise Server


      Each machine is running CentOS 6.5. For testing purposes, I have disabled iptables and ip6tables on both machines.


      On the machine with the VDB deployed, I am able to connect to the VDB via SQuirreL just fine by using..



      However when I try to test basic connectivity from the other machine using SQuirreL I get the following error. (I am using the exact same URL as above, except instead of "localhost" I am using the internal IP of the Pentaho machine.)


      java.util.concurrent.ExecutionException: java.lang.RuntimeException: org.teiid.jdbc.TeiidSQLException: TEIID20020 Error establishing socket to host and port: Reason: Connection refused
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:202)
        at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132)
        at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45)
        at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        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)
      Caused by: java.lang.RuntimeException: org.teiid.jdbc.TeiidSQLException: TEIID20020 Error establishing socket to host and port: Reason: Connection refused
        at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:171)
        at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45)
        at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104)
        ... 5 more
      Caused by: org.teiid.jdbc.TeiidSQLException: TEIID20020 Error establishing socket to host and port: Reason: Connection refused
        at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
        at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
        at org.teiid.jdbc.SocketProfile.connect(SocketProfile.java:56)
        at org.teiid.jdbc.TeiidDriver.connect(TeiidDriver.java:107)
        at org.teiid.jdbc.TeiidDriver.connect(TeiidDriver.java:55)
        at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133)
        at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167)
        ... 7 more
      Caused by: org.teiid.net.socket.SingleInstanceCommunicationException: TEIID20020 Error establishing socket to host and port: Reason: Connection refused
        at org.teiid.net.socket.SocketServerConnection.selectServerInstance(SocketServerConnection.java:158)
        at org.teiid.net.socket.SocketServerConnection.<init>(SocketServerConnection.java:92)
        at org.teiid.net.socket.SocketServerConnectionFactory.getConnection(SocketServerConnectionFactory.java:312)
        at org.teiid.jdbc.SocketProfile.connect(SocketProfile.java:54)
        ... 11 more
      Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:579)
        at java.net.Socket.connect(Socket.java:528)
        at org.teiid.net.socket.OioOjbectChannelFactory.createObjectChannel(OioOjbectChannelFactory.java:172)
        at org.teiid.net.socket.SocketServerInstanceImpl.connect(SocketServerInstanceImpl.java:94)
        at org.teiid.net.socket.SocketServerConnectionFactory.getServerInstance(SocketServerConnectionFactory.java:271)
        at org.teiid.net.socket.SocketServerConnection.connect(SocketServerConnection.java:196)
        at org.teiid.net.socket.SocketServerConnection.selectServerInstance(SocketServerConnection.java:122)
        ... 14 more



      Is there any other way I can test the VDB to make sure it is running properly? As far I can tell it is deploying successfully, as shown in the JBoss Admin console.


      I also noticed that there isn't a standalone-teiid.xml located in my JBoss configuration directory. Not sure if this could be related or not. Thank you for your time.




      Is it possible that VMware ESXi 5.5 that these machines are running on is somehow blocking the traffic on this port? I can successfully ping the devices from each other but maybe there is something else I am missing?



        • 1. Re: Access VDB from different machine
          jason.marley Newbie

          Hi Zach,


          I'd try to run the simpleclient [1] to test your connection locally on your box and then on your remote box. It sounds like either the server is not binding to the correct IP and/or the firewall is blocking the traffic.


          [1] teiid/teiid-quickstarts · GitHub

          • 2. Re: Access VDB from different machine
            Ramesh Reddy Master

            By default server binds to You need to start the server with -b option like


            ./standalone.sh -b <ip>


            ./standalone.sh -b


            Then you can connect using the ip on the remote client machine. Also open the firewall ports 31000 for JDBC access.


            Please note the above still does not open the management port, if you connect it from Designer you will still see issues. You can address that by


            ./standalone.sh -c standalone-teiid.xml -b -Djboss.bind.address.management=


            or manually editing the property value in the standalone-teiid.xml file



            1 of 1 people found this helpful
            • 3. Re: Access VDB from different machine
              Ramesh Reddy Master

              BTW, default management ports are 9999, 9990 open these too in the firewall configuration if you need remote access from Teiid Designer.

              • 4. Re: Re: Access VDB from different machine
                Zachary Price Newbie



                For troubleshooting purposes I have eliminated the complexity of having 2 separate machines. I have installed Pentaho BA local to JBoss EAP. On this machine I can connect to the VDB using SQuirreL. However when I try to connect using Pentaho I get the following error message (I have added teiid-common-core-8.4.1-redhat-7.jar and teiid-client-8.4.1-redhat-7.jar to the BA server lib/jdbc directory):


                I have also moved the error message so that you can see my connection details.




                I have also opened port 31000 on the firewall configuration. Any ideas?




                • 5. Re: Re: Access VDB from different machine
                  Ramesh Reddy Master



                  You only need JDBC driver jar from here Downloads this jar contains all the necessary classes to connect using JDBC. Look in Pentaho logs there must be a log that details the error. Also what is your look like?


                  When working on same machine, there is no need to open any ports in firewall.