6 Replies Latest reply on Oct 16, 2012 1:19 PM by Suman Ghosh

    Is there any way to control the local port for Teiid Admin?

    Suman Ghosh Newbie

      We are working with Teiid 7.7.1 with JBoss AS 5.10-Final (deployed on a mainframe) for our application, and can see the following entries when we issue a NETSTAT command -

       

      JBOSTASK 000BC964 Listen

         Local Socket:   ::ffff:1xx.2xx.6x.31..30602

         Foreign Socket: ::ffff:0.0.0.0..0

       

      JBOSTASK 000BCD67 Establsh

         Local Socket:   ::ffff:1xx.2xx.6x..31..30602

         Foreign Socket: ::ffff:1xx.2xx.6x..31..4660

        

      JBOSTASK 000BCD66 Establsh

         Local Socket:   ::ffff:1xx.2xx.6x..31..4660

         Foreign Socket: ::ffff:1xx.2xx.6x..31..30602

       

       

      Here JBOSTASK is the jobname for JBOSS, 1xx.2xx.6x..31 is the external IP of the server, and 30602 is the assigned server port for Teiid Admin. As far as we know, Teiid Admin uses TCP/IP to communicate with itself, so 4660 must be the local port (randomly assigned every time JBoss is started).

       

      Unfortunately, one of our customers have security restrictions on opening any random port every time - and as the local port (4660 in the above example) is a random one, it is causing problems.

       

      Is there any way we can control the Teiid Admin local port allocation too, as we control the Teiid Admin server port (by specifying it in AdminSocketConfiguration-->portNumber in teiid-jboss-beans.xml)?

       

      Regards,

      Suman Ghosh.

        • 1. Re: Is there any way to control the local port for Teiid Admin?
          Ramesh Reddy Master

          Suman Ghosh wrote:

           

          Is there any way we can control the Teiid Admin local port allocation too, as we control the Teiid Admin server port (by specifying it in AdminSocketConfiguration-->portNumber in teiid-jboss-beans.xml)?

          Yes.

          • 2. Re: Is there any way to control the local port for Teiid Admin?
            Suman Ghosh Newbie

            Hi Ramesh,

             

            Thanks for your response. Unfortunately, I am unable to find the configuration point for the local Teiid Admin port in the config file (teiid-jboss-beans.xml).

             

            <bean name="AdminSocketConfiguration" class="org.teiid.transport.SocketConfiguration">

                    <property name="name">AdminSocketConfiguration</property>

                    <property name="enabled">true</property>

                    <property name="bindAddress">${jboss.bind.address}</property>

                    <property name="portNumber">${teiid.admin.port}</property>

                    <!-- Max number of threads dedicated to Admin request processing.

                         Zero indicates the system default of max available processors. (default 4) -->

                    <property name="maxSocketThreads">4</property>

                    <!-- SO_RCVBUF size, 0 indicates that system default should be used (default 0) -->

                    <property name="inputBufferSize">0</property>

                    <!-- SO_SNDBUF size, 0 indicates that system default should be used (default 0) -->

                    <property name="outputBufferSize">0</property>

                    <property name="SSLConfiguration"><inject bean="AdminSslConfiguration"/></property>

            </bean>

             

            As highlighted in the configuration snippet above, we have a configuration for the server port, but none for the local port binding. Is there any way we could control that one too?

            • 3. Re: Is there any way to control the local port for Teiid Admin?
              Ramesh Reddy Master

              You can add java system properties using "-D" options in "run.conf" file in the bin directory.  Or you can do

               

              ./run.sh -b {ip-adddr} -Dteiid.admin.port=35432

               

              Ramesh..

              • 4. Re: Is there any way to control the local port for Teiid Admin?
                Suman Ghosh Newbie

                Hi Ramesh,

                 

                I think I was unable to make myself clear in my previous posts.

                 

                We are currently aware of the configuration to change the teiid-admin server port, and are able to do that successfully with the configuration params stated earlier (in teiid-jboss-beans.xml)

                 

                But as I outlined in my initial post, we can see the following output in NETSTAT (because Teiid Admin does a TCP/IP communication to itself)-

                 

                 

                JBOSTASK 000BCD67 Establsh

                   Local Socket:   ::ffff:1xx.2xx.6x..31..30602     ---> Teiid Admin server port, configurable from teiid-jboss-beans.xml

                   Foreign Socket: ::ffff:1xx.2xx.6x..31..4660      ---> Teiid Admin local port, which is randomly selected, and we are unable to configure

                  

                JBOSTASK 000BCD66 Establsh

                   Local Socket:   ::ffff:1xx.2xx.6x..31..4660      ---> Teiid Admin local port, which is randomly selected, and we are unable to configure

                   Foreign Socket: ::ffff:1xx.2xx.6x..31..30602     ---> Teiid Admin server port, configurable from teiid-jboss-beans.xml

                 

                 

                So the config param in teiid-jboss-beans.xml takes care of the port outlined in blue, but what we are searching for is a config param which will allow us to control the assignment of the port marked in red.

                 

                Can you help us out with a configuration param for that port?

                 

                Thanks & Regards,

                Suman.

                • 5. Re: Is there any way to control the local port for Teiid Admin?
                  Ramesh Reddy Master

                  Suman,

                   

                  I do not think that is something that is configurable. The main port you configure is the listening port, when the client connection request comes in on listening port and when request is bound it assigns a random port to communicate on for that socket connection. What you are seeing in Red are those. They are not exposed to everybody, only listening channels can grant these, once the client connection goes away, that gets cleaned up. As connections grow you see many of them.

                   

                  Thanks

                   

                  Ramesh..

                  • 6. Re: Is there any way to control the local port for Teiid Admin?
                    Suman Ghosh Newbie

                    Thanks Ramesh, this info will be of great help!

                     

                    Best Regards,

                    Suman.