Uploaded image for project: 'JBoss Remoting'
  1. JBoss Remoting
  2. JBREM-1300

Create or preview Data Source does not work without network connection when accessing EDS server on localhost

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.5.3.SP1
    • Fix Version/s: 2.5.4.SP4
    • Component/s: None
    • Labels:
      None
    • Environment:

      Fedora 15
      JBoss Developer Studio (JBDS) 4
      Enterprise Data Services (EDS) 5.1.0

    • Steps to Reproduce:
      Hide

      1. Add a Teiid user, with username user, and password user, with admin priveleges.
      1. Start the EDS instance locally.
      2. Start JBDS on the same machine.
      3. Create a new Teiid Model Project
      4. Disconnect network, by removing cable, and/or turning of wireless connections
      5. In the Teiid Designer View, right click the 'Data Sources' folder, and click 'Create Data Source'
      6. Use the defaults in Create Data Source dialogue, connection-url = jdbc:teiid:DynamicPortfolio@mm://localhost:31000

      Expected :
      The same as will network connection, a new Data Source is created.

      The following is printed in EDS server.log:
      15:26:53,426 INFO [DeployHandler] Handle stream, deploymentTarget: names=[DataSource1-ds.xml], description=vfsfile:/tmp/LocalJdbcConnectorTemplate4278692506383201975-ds.xml
      15:26:53,474 INFO [DeployHandler] End handle stream, repositoryName: vfsfile:/home/jshepher/apps/git/product-distributions/jboss-as/server/default/deploy/DataSource1-ds.xml
      15:26:53,493 INFO [DeployHandler] Begin start, [vfsfile:/home/jshepher/apps/git/product-distributions/jboss-as/server/default/deploy/DataSource1-ds.xml]
      15:26:53,662 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DataSource1' to JNDI name 'java:DataSource1'
      15:26:53,663 INFO [DeployHandler] End start, [vfsfile:/home/jshepher/apps/git/product-distributions/jboss-as/server/default/deploy/DataSource1-ds.xml]

      Actual:
      Teiid Designer gets a an error dialogue,

      The following is printed in EDS server.log:

      15:17:09,828 ERROR [ADMIN_API] Unexpected exception for session 9qOreZ86/lUv
      [AdminComponentException]Failed to process template.
      1 [AdminComponentException]Failed to process template.
      2 [RuntimeException]Failed to process template.
      3 [RuntimeException]java.io.IOException: Can not find a free port for use.
      4 [IOException]Can not find a free port for use.
      at org.teiid.client.util.ExceptionUtil.convertException(ExceptionUtil.java:72)
      at org.teiid.jboss.deployers.RuntimeEngineDeployer$2.invoke(RuntimeEngineDeployer.java:309)
      at $Proxy359.createDataSource(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.teiid.transport.ServerWorkItem.run(ServerWorkItem.java:81)
      at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:188)
      at org.teiid.transport.SocketClientInstance.processMessagePacket(SocketClientInstance.java:160)
      at org.teiid.transport.SocketClientInstance.receivedMessage(SocketClientInstance.java:149)
      at org.teiid.transport.SSLAwareChannelHandler.messageReceived(SSLAwareChannelHandler.java:210)
      at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100)
      at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
      at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
      at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:144)
      at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
      at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
      at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
      at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:317)
      at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299)
      at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:216)
      at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
      at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
      at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
      at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
      at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:317)
      at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299)
      at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:216)
      at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
      at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
      at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:540)
      at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
      at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
      at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
      at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:281)
      at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:201)
      at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
      at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:679)
      Caused by: [AdminComponentException]Failed to process template.
      1 [RuntimeException]Failed to process template.
      2 [RuntimeException]java.io.IOException: Can not find a free port for use.
      3 [IOException]Can not find a free port for use.
      at org.teiid.adminapi.jboss.Admin.createDataSource(Admin.java:675)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.teiid.logging.LogManager$LoggingProxy.invoke(LogManager.java:121)
      at org.teiid.jboss.deployers.RuntimeEngineDeployer$2.invoke(RuntimeEngineDeployer.java:303)
      ... 40 more
      Caused by: java.lang.RuntimeException: Failed to process template.
      at org.jboss.profileservice.management.AbstractTemplateCreator.checkComplete(AbstractTemplateCreator.java:209)
      at org.jboss.profileservice.management.AbstractTemplateCreator.distribute(AbstractTemplateCreator.java:176)
      at org.jboss.profileservice.management.AbstractTemplateCreator.applyTemplate(AbstractTemplateCreator.java:106)
      at org.jboss.profileservice.management.ManagementViewImpl.applyTemplate(ManagementViewImpl.java:1437)
      at org.teiid.adminapi.jboss.Admin.createDataSource(Admin.java:671)
      ... 46 more
      Caused by: java.lang.RuntimeException: java.io.IOException: Can not find a free port for use.
      at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.transferDeployment(StreamingDeploymentTarget.java:286)
      at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.distribute(StreamingDeploymentTarget.java:106)
      at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.distribute(DeploymentProgressImpl.java:178)
      at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:83)
      at org.jboss.profileservice.management.AbstractTemplateCreator.distribute(AbstractTemplateCreator.java:173)
      ... 49 more
      Caused by: java.io.IOException: Can not find a free port for use.
      at org.jboss.remoting.transport.PortUtil.findFreePort(PortUtil.java:152)
      at org.jboss.remoting.stream.StreamServer.getLocatorURI(StreamServer.java:171)
      at org.jboss.remoting.stream.StreamServer.<init>(StreamServer.java:119)
      at org.jboss.remoting.Client.invoke(Client.java:1750)
      at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.transferDeployment(StreamingDeploymentTarget.java:277)
      ... 53 more

      Show
      1. Add a Teiid user, with username user, and password user, with admin priveleges. 1. Start the EDS instance locally. 2. Start JBDS on the same machine. 3. Create a new Teiid Model Project 4. Disconnect network, by removing cable, and/or turning of wireless connections 5. In the Teiid Designer View, right click the 'Data Sources' folder, and click 'Create Data Source' 6. Use the defaults in Create Data Source dialogue, connection-url = jdbc:teiid:DynamicPortfolio@mm://localhost:31000 Expected : The same as will network connection, a new Data Source is created. The following is printed in EDS server.log: 15:26:53,426 INFO [DeployHandler] Handle stream, deploymentTarget: names= [DataSource1-ds.xml] , description=vfsfile:/tmp/LocalJdbcConnectorTemplate4278692506383201975-ds.xml 15:26:53,474 INFO [DeployHandler] End handle stream, repositoryName: vfsfile:/home/jshepher/apps/git/product-distributions/jboss-as/server/default/deploy/DataSource1-ds.xml 15:26:53,493 INFO [DeployHandler] Begin start, [vfsfile:/home/jshepher/apps/git/product-distributions/jboss-as/server/default/deploy/DataSource1-ds.xml] 15:26:53,662 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DataSource1' to JNDI name 'java:DataSource1' 15:26:53,663 INFO [DeployHandler] End start, [vfsfile:/home/jshepher/apps/git/product-distributions/jboss-as/server/default/deploy/DataSource1-ds.xml] Actual: Teiid Designer gets a an error dialogue, The following is printed in EDS server.log: 15:17:09,828 ERROR [ADMIN_API] Unexpected exception for session 9qOreZ86/lUv [AdminComponentException] Failed to process template. 1 [AdminComponentException] Failed to process template. 2 [RuntimeException] Failed to process template. 3 [RuntimeException] java.io.IOException: Can not find a free port for use. 4 [IOException] Can not find a free port for use. at org.teiid.client.util.ExceptionUtil.convertException(ExceptionUtil.java:72) at org.teiid.jboss.deployers.RuntimeEngineDeployer$2.invoke(RuntimeEngineDeployer.java:309) at $Proxy359.createDataSource(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.teiid.transport.ServerWorkItem.run(ServerWorkItem.java:81) at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:188) at org.teiid.transport.SocketClientInstance.processMessagePacket(SocketClientInstance.java:160) at org.teiid.transport.SocketClientInstance.receivedMessage(SocketClientInstance.java:149) at org.teiid.transport.SSLAwareChannelHandler.messageReceived(SSLAwareChannelHandler.java:210) at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754) at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:144) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302) at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:317) at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299) at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:216) at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302) at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:317) at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299) at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:216) at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:540) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261) at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349) at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:281) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:201) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:679) Caused by: [AdminComponentException] Failed to process template. 1 [RuntimeException] Failed to process template. 2 [RuntimeException] java.io.IOException: Can not find a free port for use. 3 [IOException] Can not find a free port for use. at org.teiid.adminapi.jboss.Admin.createDataSource(Admin.java:675) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.teiid.logging.LogManager$LoggingProxy.invoke(LogManager.java:121) at org.teiid.jboss.deployers.RuntimeEngineDeployer$2.invoke(RuntimeEngineDeployer.java:303) ... 40 more Caused by: java.lang.RuntimeException: Failed to process template. at org.jboss.profileservice.management.AbstractTemplateCreator.checkComplete(AbstractTemplateCreator.java:209) at org.jboss.profileservice.management.AbstractTemplateCreator.distribute(AbstractTemplateCreator.java:176) at org.jboss.profileservice.management.AbstractTemplateCreator.applyTemplate(AbstractTemplateCreator.java:106) at org.jboss.profileservice.management.ManagementViewImpl.applyTemplate(ManagementViewImpl.java:1437) at org.teiid.adminapi.jboss.Admin.createDataSource(Admin.java:671) ... 46 more Caused by: java.lang.RuntimeException: java.io.IOException: Can not find a free port for use. at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.transferDeployment(StreamingDeploymentTarget.java:286) at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.distribute(StreamingDeploymentTarget.java:106) at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.distribute(DeploymentProgressImpl.java:178) at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:83) at org.jboss.profileservice.management.AbstractTemplateCreator.distribute(AbstractTemplateCreator.java:173) ... 49 more Caused by: java.io.IOException: Can not find a free port for use. at org.jboss.remoting.transport.PortUtil.findFreePort(PortUtil.java:152) at org.jboss.remoting.stream.StreamServer.getLocatorURI(StreamServer.java:171) at org.jboss.remoting.stream.StreamServer.<init>(StreamServer.java:119) at org.jboss.remoting.Client.invoke(Client.java:1750) at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.transferDeployment(StreamingDeploymentTarget.java:277) ... 53 more

      Description

      When trying to create a preview a datasource using the Teiid designer, an error dialogue is shown, and the EDS server.log shows an error containing this message. This only happens when there is no network connectivity on the machine, for example the network cable is unplugged.

      [IOException]Can not find a free port for use

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ron_sigal Ronald Sigal
                Reporter:
                jshepher Jason Shepherd
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: