已经在使用的地址:JVM_Bind [英] Address already in use: JVM_Bind

查看:150
本文介绍了已经在使用的地址:JVM_Bind的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows XP Pro上使用Glassfish 3.0.1,JVM 1.6.0_21;

I'm using Glassfish 3.0.1, JVM 1.6.0_21 on Windows XP Pro;

我不清楚我的环境中发生了什么变化,但我当我尝试部署企业应用程序(ejb模块+应用程序客户端模块)时,立即获取此堆栈跟踪。

I don't know exactly what has changed in my environment but I get this stacktrace as soon as I try to deploy an enterprise application (ejb module + app client module).

除了Glassfish,端口3820上没有任何运行...我检查了netstat,服务器停止运行,服务器启动。

There is nothing running on port 3820, except Glassfish... I checked with netstat with the server stopped and the server started.

这可能是什么原因造成的?一些内部进程冲突?

What could be the cause of this? Some internal process conflict?

有关如何进一步调试的提示?

Any tips on how I can debug this further?

WARNING: Can not find resource bundle for this logger.  class name that failed: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory
SEVERE: iiop.createsocket_exception
WARNING: Can not find resource bundle for this logger.  class name that failed: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory
SEVERE: java.net.BindException: Address already in use: JVM_Bind
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at javax.net.ssl.SSLServerSocket.<init>(SSLServerSocket.java:106)
        at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.<init>(SSLServerSocketImpl.java:106)
        at com.sun.net.ssl.internal.ssl.SSLServerSocketFactoryImpl.createServerSocket(SSLServerSocketFactoryImpl.java:72)
        at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.createSSLServerSocket(IIOPSSLSocketFactory.java:402)
        at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.createServerSocket(IIOPSSLSocketFactory.java:281)
        at com.sun.corba.ee.impl.transport.SocketOrChannelAcceptorImpl.initialize(SocketOrChannelAcceptorImpl.java:91)
        at com.sun.corba.ee.impl.transport.CorbaTransportManagerImpl.getAcceptors(CorbaTransportManagerImpl.java:247)
        at com.sun.corba.ee.impl.transport.CorbaTransportManagerImpl.addToIORTemplate(CorbaTransportManagerImpl.java:264)
        at com.sun.corba.ee.spi.oa.ObjectAdapterBase.initializeTemplate(ObjectAdapterBase.java:131)
        at com.sun.corba.ee.impl.oa.poa.POAImpl.initialize(POAImpl.java:474)
        at com.sun.corba.ee.impl.oa.poa.POAImpl.makeRootPOA(POAImpl.java:323)
        at com.sun.corba.ee.impl.oa.poa.POAFactory$1.evaluate(POAFactory.java:279)
        at com.sun.corba.ee.impl.orbutil.closure.Future.evaluate(Future.java:57)
        at com.sun.corba.ee.impl.resolver.LocalResolverImpl.resolve(LocalResolverImpl.java:51)
        at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:55)
        at com.sun.corba.ee.impl.orb.ORBImpl.resolve_initial_references(ORBImpl.java:1289)
        at com.sun.corba.ee.impl.naming.cosnaming.TransientNameService.initialize(TransientNameService.java:122)
        at com.sun.corba.ee.impl.naming.cosnaming.TransientNameService.<init>(TransientNameService.java:90)
        at org.glassfish.enterprise.iiop.impl.PEORBConfigurator.configure(PEORBConfigurator.java:154)
        at com.sun.corba.ee.impl.orb.ORBConfiguratorImpl.runUserConfigurators(ORBConfiguratorImpl.java:191)
        at com.sun.corba.ee.impl.orb.ORBConfiguratorImpl.configure(ORBConfiguratorImpl.java:176)
        at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:579)
        at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:680)
        at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:666)
        at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:91)
        at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:612)
        at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:289)
        at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:83)
        at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:122)
        at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:189)
        at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:810)
        at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:558)
        at com.sun.ejb.containers.AbstractSingletonContainer.<init>(AbstractSingletonContainer.java:136)
        at com.sun.ejb.containers.CMCSingletonContainer.<init>(CMCSingletonContainer.java:73)
        at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:109)
        at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:207)
        at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:197)
        at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:63)
        at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)

WARNING: Can not find resource bundle for this logger.  class name that failed: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory
WARNING: Can not find resource bundle for this logger.  class name that failed: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory
SEVERE: "IOP00410216: (COMM_FAILURE) Unable to create IIOP listener on the specified host/port: all interfaces/3820"

编辑
这正是我试过的:


EDIT Here it's exactly what I tried:

C:\Documents and Settings\b.tanase>netstat -p tcp -ano | findstr :3820

asadmin> start-domain domain1
Waiting for DAS to start ...
Started domain: domain1
Domain location: D:\java\glassfish-3.0.1\glassfish\domains\domain1
Log file: D:\java\glassfish-3.0.1\glassfish\domains\domain1\logs\server.log
Admin port for the domain: 4848
Command start-domain executed successfully.

C:\Documents and Settings\b.tanase>netstat -p tcp -ano | findstr :3820

asadmin> deploy d:/java/projects/netbeans-projects/CountingSystem/dist/CountingS
ystem.ear
com.sun.enterprise.admin.cli.CommandException: remote failure: Exception while l
oading the app : java.lang.RuntimeException: EJB Container initialization error
Exception while invoking class org.glassfish.ejb.startup.EjbDeployer load method
 : java.lang.RuntimeException: EJB Container initialization error


Command deploy failed.

C:\Documents and Settings\b.tanase>netstat -p tcp -ano | findstr :3820
  TCP    0.0.0.0:3820           0.0.0.0:0              LISTENING       2428

你可以看到在端口3820上没有任何监听,直到部署失败(在EJB容器初始化错误之前,我在服务器日志中发布的帖子开始处的stacktrace)

As you can see there's nothing listening on port 3820 until the deployment failes (before EJB Container initialization error I get in the server log the stacktrace posted at the beggining of the post)

推荐答案

我注意到你正在使用windows,这对于使用低端口号来传出套接字尤其不利。请参阅此处了解如何预留您想要依赖的用于glassfish的端口号。

I notice you are using windows, which is particularly bad about using low port numbers for outgoing sockets. See here for how to reserve the port number that you want to rely on using for glassfish.

这篇关于已经在使用的地址:JVM_Bind的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆