JBoss UnknownHostException when on different network.

I'm having a bit of a problem with getting JBoss working across networks. As a quick overview, we have a development network (which I'll call DEV), and a client network (say.. CLIENT!). These are connected via a firewall. In the Dev network, the server is known as 192.168.100.50, on the client network it's known as 10.0.100.50. DNS in both networks resolve the relevant IP by DNS (sqlserver.dev.net). sqlserver provides 2 services, one via a .NET Web Service, the other by JBoss. When running the client on the DEV network, both services work fine. When on the CLIENT network, only the .NET service works. The JBoss client throws an UnknownHostException when attempting to perform the ContextLookup in the following code: Properties p = new Properties(); p.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); p.put("java.naming.factory.url.pkgs", "=org.jboss.naming:org.jboss.jnp.interfaces"); p.put("java.naming.provider.url", "sqlserver.dev.net:1199"); try { Context c = new InitialContext(p); cm = (ServiceRemote)c.lookup(Service.RemoteJNDIName); } catch (NamingException e) { e.printStackTrace(); throw new RuntimeException(e); } Exception is: >Root exception is java.rmi.UnknownHostException: Unknown host: SQLserver I can confirm that the problem is that the client is attempting to connect to 'sqlserver' without a domain name. This has been tested by adding 'sqlserver' to the client's host file, and it works fine. Additionall, the spelling of 'SQLserver' is interesting, as this is how the Windows host reports it's hostname, not how it's stored in DNS. My best guess is that once the client makes the initial connection, JBoss tells the client to connect to 'SQLserver' in the future, which the client is unable to resolve. I've already tried setting the following system properties to the FQDN of sqlserver: >jgroups.bind_addr >bind.address >java.rmi.server.hostname Does anyone have any ideas?

以上就是JBoss UnknownHostException when on different network.的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏