`
轩风之逸
  • 浏览: 28910 次
  • 性别: Icon_minigender_1
  • 来自: 揭阳
社区版块
存档分类
最新评论

运行james run.bat 处理抛端口被占用的异常

阅读更多
INFO    2009-10-28 09:48:43.593 [Phoenix ] (): Logger started
WARN    2009-10-28 09:48:43.609 [Phoenix ] (): Phoenix was not started by the daemon thus it will not be possible to restart the JVM via the Management interface.
INFO    2009-10-28 09:48:43.734 [Phoenix.] (): Installing Sar located at file:/D:/james-2.3.2/apps/james.sar.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file conf/sqlResources.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\conf\sqlResources.xml because there is a file in the way.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file conf/james-fetchmail.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\conf\james-fetchmail.xml because there is a file in the way.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file conf/james-smtphandlerchain.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\conf\james-smtphandlerchain.xml because there is a file in the way.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file conf/miResources.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\conf\miResources.xml because there is a file in the way.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file conf/james-listmanager.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\conf\james-listmanager.xml because there is a file in the way.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file conf/james-liststores.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\conf\james-liststores.xml because there is a file in the way.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file conf/samples/fetchmail/maxMessageSize.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\conf\samples\fetchmail\maxMessageSize.xml because there is a file in the way.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file conf/samples/fetchmail/oneAccountManyUsers.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\conf\samples\fetchmail\oneAccountManyUsers.xml because there is a file in the way.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file conf/samples/fetchmail/oneAccountManyUsersDynamic.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\conf\samples\fetchmail\oneAccountManyUsersDynamic.xml because there is a file in the way.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file conf/samples/fetchmail/oneAccountPerUser.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\conf\samples\fetchmail\oneAccountPerUser.xml because there is a file in the way.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file conf/samples/fetchmail/oneAccountPerUserDynamic.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\conf\samples\fetchmail\oneAccountPerUserDynamic.xml because there is a file in the way.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file conf/samples/fetchmail/remoteReceivedHeader.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\conf\samples\fetchmail\remoteReceivedHeader.xml because there is a file in the way.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file SAR-INF/config.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\SAR-INF\config.xml because there is a file in the way.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file SAR-INF/assembly.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\SAR-INF\assembly.xml because there is a file in the way.
WARN    2009-10-28 09:48:43.921 [Phoenix.] (): The file SAR-INF/environment.xml can not be extracted from the Sar "file:/D:/james-2.3.2/apps/james.sar" into directory D:\james-2.3.2\apps\james\SAR-INF\environment.xml because there is a file in the way.
INFO    2009-10-28 09:48:44.171 [Phoenix.] (): Verifying that all key-stores have valid names.
INFO    2009-10-28 09:48:44.171 [Phoenix.] (): Verify that any keystore names used by grant or permission reference actual keystores
INFO    2009-10-28 09:48:44.171 [Phoenix.] (): Verify that if target is null then actions is null.
INFO    2009-10-28 09:48:44.484 [Phoenix.] (): Verifying that the name specified for Blocks and BlockListeners are valid.
INFO    2009-10-28 09:48:44.500 [Phoenix.] (): Verifying that the names specified for Component are valid.
INFO    2009-10-28 09:48:44.500 [Phoenix.] (): Verifying that the names specified for the Components are unique.
INFO    2009-10-28 09:48:44.500 [Phoenix.] (): Verifying that the dependency mapping is valid according to ComponentInfos.
INFO    2009-10-28 09:48:44.500 [Phoenix.] (): Verifying that the dependency mapping for every Component is valid with respect to other components.
INFO    2009-10-28 09:48:44.500 [Phoenix.] (): Verifying that there are no circular dependencies between Components.
INFO    2009-10-28 09:48:44.500 [Phoenix.] (): Verifying that the name specified for Blocks and BlockListeners are unique.
INFO    2009-10-28 09:48:44.500 [Phoenix.] (): Verifying that the specified Blocks have valid types.
INFO    2009-10-28 09:48:44.531 [Phoenix.] (): Verifying that the specified BlockListeners have valid types.
INFO    2009-10-28 09:48:44.578 [Phoenix.] (): 20 Blocks to process for phase "startup". Order of processing = [dnsserver, database-connections, mailstore, users-store, localusersrepository, spoolrepository, sockets, thread-manager, scheduler, James, mailetpackages, matcherpackages, spoolmanager, connections, remotemanager, pop3server, smtpserver, nntp-repository, nntpserver, fetchmail].
ERROR   2009-10-28 09:48:44.906 [Phoenix.] (): Component named "smtpserver" failed to pass through the Starting stage. (Reason: java.net.BindException: Address already in use: JVM_Bind).
ERROR   2009-10-28 09:48:44.906 [Phoenix.] (): There was an error running phase "startup" for Block named "smtpserver". (Reason: Component named "smtpserver" failed to pass through the Starting stage. (Reason: java.net.BindException: Address already in use: JVM_Bind).).
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException: Component named "smtpserver" failed to pass through the Starting stage. (Reason: java.net.BindException: Address already in use: JVM_Bind).
at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:226)
at org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:530)
at org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:478)
at org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
at org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:180)
at org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:260)
rethrown from
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at org.apache.avalon.cornerstone.blocks.sockets.DefaultServerSocketFactory.createServerSocket(DefaultServerSocketFactory.java:74)
at org.apache.james.core.AbstractJamesService.initialize(AbstractJamesService.java:337)
at org.apache.james.smtpserver.SMTPServer.initialize(SMTPServer.java:256)
INFO    2009-10-28 09:48:44.906 [Phoenix.] (): exception while starting:Component named "smtpserver" failed to pass through the Starting stage. (Reason: java.net.BindException: Address already in use: JVM_Bind).

WARN    2009-10-28 09:48:44.906 [Phoenix.] (): Failed to start application james.
org.apache.avalon.framework.CascadingException: Failed to start application james.
at org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(DefaultKernel.java:313)
at org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication(DefaultKernel.java:376)
at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:357)
at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:542)
at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:535)
at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(DefaultEmbeddor.java:520)
at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultApplications(DefaultEmbeddor.java:509)
rethrown from
org.apache.avalon.phoenix.interfaces.ApplicationException: Component named "smtpserver" failed to pass through the Starting stage. (Reason: java.net.BindException: Address already in use: JVM_Bind).
at org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:186)
at org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:260)
at org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(DefaultKernel.java:295)
at org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication(DefaultKernel.java:376)
at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:357)
at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:542)
at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:535)
rethrown from
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException: Component named "smtpserver" failed to pass through the Starting stage. (Reason: java.net.BindException: Address already in use: JVM_Bind).
at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:226)
at org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:530)
at org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:478)
at org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
at org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:180)
at org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:260)
rethrown from
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at org.apache.avalon.cornerstone.blocks.sockets.DefaultServerSocketFactory.createServerSocket(DefaultServerSocketFactory.java:74)
at org.apache.james.core.AbstractJamesService.initialize(AbstractJamesService.java:337)
at org.apache.james.smtpserver.SMTPServer.initialize(SMTPServer.java:256)
WARN    2009-10-28 09:48:44.953 [Phoenix.] (): Error deleting Work Directory "D:\james-2.3.2\work\james-1256694523734". (Reason: File D:\james-2.3.2\work\james-1256694523734\SAR-INF\lib\mailet-api-2.3.jar unable to be deleted.)
java.io.IOException: File D:\james-2.3.2\work\james-1256694523734\SAR-INF\lib\mailet-api-2.3.jar unable to be deleted.
at org.apache.avalon.excalibur.io.FileUtil.forceDelete(FileUtil.java:743)
at org.apache.avalon.excalibur.io.FileUtil.cleanDirectory(FileUtil.java:910)
at org.apache.avalon.excalibur.io.FileUtil.deleteDirectory(FileUtil.java:866)
at org.apache.avalon.excalibur.io.FileUtil.forceDelete(FileUtil.java:735)
at org.apache.avalon.excalibur.io.FileUtil.cleanDirectory(FileUtil.java:910)
at org.apache.avalon.excalibur.io.FileUtil.deleteDirectory(FileUtil.java:866)
at org.apache.avalon.excalibur.io.FileUtil.forceDelete(FileUtil.java:735)
WARN    2009-10-28 09:48:45.125 [Phoenix.] (): Failed to stop application james as it is not initialized/started.


大家有有遇到过这种异常吗?最近我要做一个邮件系统。因此要使用一个服务器来支持运行收发邮件的功能,一开始启动服务没有问题~~可是当要改localhost为自己的域名,改完后就狂报错~~就是上面那个错误,我看了在james根目录下一个logs;里面的日志文件里面的异常,才知道是占用了端口号~~可是就是不知道占用了那么端口~~,因此在网上找找看有什么好的解决方法,找了很久都不知道个所以然,我也的机子也重启了不少次,就是还没有解决,郁闷了整个晚上,隔天还是继续找那个问题~~到最后在一个csdn论坛上找到了一个启发点就是,IIS默认是会启动开启了IIS自带的SMTP服务,就是这困扰我一晚上,呵呵,现在终于解决了,好了接下来就说说我是怎么解决这个问题的,还有一点就是可以使用 netstat doc命令来查看那么端口在启动。
上面那个异常的解决方案:
首先我们打开window的控制面板,接下就是找到管理工具双击进去,找到服务这个项,双击进去,查看服务IIS Admin这一个服务把他停掉就没事了,原因是因为IIS默认是启动smtp服务的因此就是因为这个原因困扰了我一晚,还先重装系统现在不用了~~呵呵很高兴~~这是我第一次在javaeye里发表自己的的博文,呵呵写的不是很好希望大家见谅,希望这篇文章对大家有帮助~~呵呵~~如果没有装IIS的一般不会出现这种问题~~本人是这样认为的~~.就这样~~嘻嘻
  • 大小: 105.2 KB
0
0
分享到:
评论
3 楼 黑白配 2014-03-28  
   我一定要赞  因为我找了一下午 不知道是哪个端口
2 楼 a545807638 2011-06-15  
好厉害
1 楼 695w 2009-11-18  
嗯,写的不错,我查了半天也没看到哪个把端口占了,呵呵,谢谢你的分享!

相关推荐

    JMail操作详解apache-james-2.3.2.zip

    3. **启动James**: 进入到Apache James的bin目录,运行相应的启动脚本(如`run.sh`或`run.bat`),根据提示进行配置。注意,你可能需要修改`server.xml`等配置文件以适应你的网络环境和需求。 4. **配置SMTP和POP3...

    用JAMES实现自己的邮件服务器.docx

    - **启动服务**:通过运行`bin`目录下的`run.bat`或`run.sh`文件启动JAMES服务。启动后,控制台会显示出各种服务的启动状态,包括远程管理服务(Remote Manager Service)、POP3服务、SMTP服务、NNTP服务等。 #####...

    James邮件服务器简介与配置

    然后,只需运行James的启动脚本(如run.bat),即可启动服务器。成功启动后,可以通过控制台界面进行管理和操作,而关闭服务器则可以通过输入Ctrl+C。 配置James涉及多个方面,包括但不限于设置服务器监听端口、...

    james服务器安装文件:james-2.3.0

    4. **启动与停止**:在`bin`目录下,有对应的启动脚本(如`run.sh`或`run.bat`),根据操作系统类型执行相应的脚本来启动James服务器。停止服务可以通过执行`stop.sh`或`stop.bat`。 5. **SMTP、POP3和IMAP**:...

    纯java邮件服务器james配置说明汇编.pdf

    4. 在D:\james-2.3.1\bin目录下运行run.bat脚本启动James服务器。成功启动后,控制台会显示相关信息,包括SMTP、POP3和NNTP服务的端口号。 端口配置与冲突处理: James的SMTP服务默认在25端口运行,POP3在110端口,...

    纯java邮件服务器james配置说明.pdf

    如果这些端口已被其他服务占用,可能会影响James的正常运行。在这种情况下,你需要关闭占用这些端口的服务,例如Windows中的Microsoft SMTP服务。 为了配置Apache James能够与外部邮件服务器通信,例如向163邮箱...

    纯java邮件服务器james配置说明归类.pdf

    2. 启动James服务器,可以通过双击运行D:\james-2.3.1\bin目录下的run.bat文件。如果成功启动,控制台将显示相关信息,包括使用的JAVA_HOME路径、端口号等。 3. 关注SMTP服务(默认端口25)、POP3服务(默认端口110...

    Apache 邮件服务器 James 简单配置.doc

    在命令行中切换至James的`bin`目录,执行`run.bat`脚本。如果一切正常,控制台将显示James各服务的启动状态,如`Remote Manager Service started plain:4555`、`POP3 Service started plain:110`等,这表明James已经...

    apache James使用入门

    - **直接运行**: 双击 `C:\james\bin\run.bat`。 - 成功启动后会显示如下信息: ``` Using PHOENIX_HOME: C:\james Using PHOENIX_TMPDIR: C:\jamestemp Using JAVA_HOME: Phoenix4.0.1 James 2.1 ...

    james-server3.0

    1. 打开命令行窗口,导航到James的bin目录,运行`run.bat`启动服务器。 2. 启动成功后,可以在浏览器中访问管理界面,默认地址是`http://localhost:8080/james/`,使用在`server.xml`中配置的管理员邮箱和密码登录。...

    James搭建邮件服务器

    启动 James 服务器,你可以通过在解压目录的 bin 文件夹下运行 run.bat 脚本来进行。如果你的机器上已经有一个 SMTP 服务在运行,可能需要先关闭它,因为两个邮件服务器无法同时监听同一个端口。 如果遇到启动报错...

    James mail server&client installation&configuration

    运行`run.bat`文件后,如果看到类似以下的提示,则表示James邮件服务器启动成功: ``` Using PHOENIX_HOME: D:\tools\james-2.3.0 Using PHOENIX_TMPDIR: D:\tools\james-2.3.0\temp Using JAVA_HOME: D:\jdk...

    用ApacheJames搭建邮件服务器来收发邮件实践归类.pdf

    - 双击或在命令行下执行`D:\james-2.3.1\bin`目录下的`run.bat`文件。 - 成功启动后,控制台将显示相关信息,例如: ``` Using PHOENIX_HOME: D:\james-2.3.1 Using PHOENIX_TMPDIR: D:\james-2.3.1\temp ...

    James+Javamail构建邮件服务

    进入解压缩后的bin目录,运行run.bat脚本。如果Java环境变量配置无误,服务器将成功启动,并在控制台显示启动成功的信息。 ##### 配置与管理 - **配置文件位置** 启动成功后,James会在apps目录下根据james.sar...

    james外网配置及使用MYSQL数据库存储邮件内容

    进入James的根目录,运行`bin/run.sh`(Linux/Mac)或`bin\run.bat`(Windows)。如果一切配置正确,James应该能够成功启动并开始监听指定的端口。 为了测试外网访问,你可以创建一个测试邮箱并发送邮件。可以使用...

    james详细配置及问题解决

    - **启动服务**:使用命令行进入解压后的bin目录(`C:\James\james-2.1\bin`),执行`run.bat`脚本,此时会看到James服务启动的日志输出。 #### 二、配置文件详解 James的服务启动依赖于多个配置文件,其中最重要...

Global site tag (gtag.js) - Google Analytics