当前位置: 首页 > 面试题库 >

已使用的地址:JVM_Bind

丁韬
2023-03-14
问题内容

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

我不知道我的环境到底发生了什么变化,但是当我尝试部署企业应用程序(ejb模块+应用程序客户端模块)时,我立即获得了该堆栈跟踪信息。

除Glassfish之外,端口3820上没有任何运行。

这可能是什么原因?一些内部过程冲突?

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

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"

编辑 这正是我尝试过的:

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)


问题答案:

我注意到您正在使用Windows,这对于将低端口号用于传出套接字特别不利。请参阅此处以了解如何保留要用于glassfish的端口号。



 类似资料:
  • 问题内容: 有时,每当我重新启动基于Java Struts Mysql和Jboss 4.05版本构建的应用程序时,都会收到以下错误消息: 地址已在使用中:JVM_Bind 我知道的唯一解决方法是重新启动计算机,然后重试,它将起作用。否则,有时我执行Ctrl-Alt-Del并停止所有与Java相关的过程,有时这也可行。 但是,确切的原因是什么,我们如何预防这个问题呢? 问题答案: 已使用的地址:JV

  • 服务器程序: 客户端程序: 当我执行这个程序时。我收到了这样的错误“java.net.BindException:地址已在使用中:JVM_Bind”但在它正常工作之前。有人能帮我解决这个问题吗?

  • 问题内容: 我正在遵循http://docs.oracle.com/javase/tutorial/networking/datagrams/broadcasting.html上的UDP教程,现在我已经复制并编译了所有代码,如果我先编译客户端然后再编译服务器,服务器在控制台中将其打印出来 QuoteServerThread行19是 MulticastServerThread行10是 Multica

  • 我已经编写了这两个类,一个用于客户端,另一个用于服务器。当我运行这两个类时,我收到以下错误: 问题是什么?我也使用TCPview软件,只有两个使用同一端口。这两个进程属于应用程序。 代码如下: 服务器代码 客户代码

  • 在运行tomcat进程时,我一直在日志中得到这个绑定异常。它并没有从一开始就禁止我的进程,但这仍然是一个问题。 05-Oct-2017 13:42:47.896严重[main]org.apache.coyote.abstractProtocol.init无法初始化与ProtocolHandler关联的endpoint [“http-nio-*********-不是8080端口”]java.net.

  • 问题内容: 运行webdriver时,运行3分钟后,出现以下异常,导致Webdriver崩溃。 我仅使用一个webdriver实例和一个FirefoxDriver配置文件。 问题答案: 您的出站端口已用完。这意味着您在两分钟之内执行了数千个出站连接。解决方案:使用连接池,或降低程序速度。