windows JBoss - ExportException:端口已在使用中:1098

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1019615/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 06:31:00  来源:igfitidea点击:

JBoss - ExportException: Port already in use: 1098

windowsnetworkingjbosstcp

提问by Tam

I'm getting the following error when I try to start JBoss

当我尝试启动 JBoss 时出现以下错误

10:10:43,298 INFO  [WebService] Using RMI server codebase: http://127.0.0.1:8083/
10:10:43,938 ERROR [AbstractKernelController] Error installing to Start: name=jboss:service=Naming state=Create mode=Manual requiredState=Installed
java.rmi.server.ExportException: Port already in use: 1098; nested exception is: 
    java.net.BindException: Address already in use: JVM_Bind
    at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:249)
    at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:184)
    at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:382)
    at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
    at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:180)
    at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:293)
    at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:256)

However When I try to see what ports are being listened to. I don't see that port!

但是,当我尝试查看正在侦听的端口时。我没有看到那个端口!

H:\>netstat -a -n -o

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       824
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:1521           0.0.0.0:0              LISTENING       2036
  TCP    0.0.0.0:3389           0.0.0.0:0              LISTENING       752
  TCP    0.0.0.0:7717           0.0.0.0:0              LISTENING       2944
  TCP    0.0.0.0:8081           0.0.0.0:0              LISTENING       1564
  TCP    0.0.0.0:31038          0.0.0.0:0              LISTENING       1436
  TCP    127.0.0.1:1038         0.0.0.0:0              LISTENING       2036
  TCP    127.0.0.1:1052         0.0.0.0:0              LISTENING       2620
  TCP    127.0.0.1:5998         127.0.0.1:5999         ESTABLISHED     4036
  TCP    127.0.0.1:5999         127.0.0.1:5998         ESTABLISHED     4036
  TCP    127.0.0.1:6000         127.0.0.1:6001         ESTABLISHED     4036
  TCP    127.0.0.1:6001         127.0.0.1:6000         ESTABLISHED     4036
  TCP    142.174.27.74:139      0.0.0.0:0              LISTENING       4
  TCP    142.174.27.74:13148    142.174.12.84:445      ESTABLISHED     4
  TCP    142.174.27.74:13253    142.174.134.33:8080    ESTABLISHED     4036
  TCP    142.174.27.74:13255    142.174.134.33:8080    ESTABLISHED     4036
  TCP    142.174.27.74:13258    142.174.134.33:8080    ESTABLISHED     4036
  TCP    142.174.27.74:13259    142.174.134.33:8080    ESTABLISHED     4036
  TCP    142.174.27.74:13260    142.174.134.33:8080    ESTABLISHED     4036
  TCP    142.174.27.74:13261    142.174.134.33:8080    ESTABLISHED     4036
  TCP    142.174.27.74:13262    142.174.134.33:8080    ESTABLISHED     4036
  TCP    142.174.27.74:13263    142.174.134.33:8080    ESTABLISHED     4036
  UDP    0.0.0.0:445            *:*                                    4
  UDP    0.0.0.0:8081           *:*                                    1564
  UDP    0.0.0.0:8082           *:*                                    1564
  UDP    0.0.0.0:19508          *:*                                    1244
  UDP    127.0.0.1:123          *:*                                    948
  UDP    127.0.0.1:1025         *:*                                    580
  UDP    127.0.0.1:1046         *:*                                    524
  UDP    127.0.0.1:1056         *:*                                    784
  UDP    127.0.0.1:1213         *:*                                    2888
  UDP    127.0.0.1:1257         *:*                                    2404
  UDP    127.0.0.1:2172         *:*                                    3736
  UDP    127.0.0.1:2310         *:*                                    2188
  UDP    142.174.27.74:123      *:*                                    948
  UDP    142.174.27.74:137      *:*                                    4
  UDP    142.174.27.74:138      *:*                                    4

H:\>

any ideas?

有任何想法吗?

Thanks,

谢谢,

Tam

采纳答案by skaffman

Try TCPView (TCPView v3.05). I get this "port already in use" quite a lot, and TCPView alwaysusually catches the culprit.

尝试 TCPView ( TCPView v3.05)。我经常得到这个“端口已在使用中”,TCPView总是能抓住罪魁祸首。

回答by prashant thakre

Go to jboss-service.xml under conf folder and change the port for RMI from 1098 to 8099

转到 conf 文件夹下的 jboss-service.xml 并将 RMI 的端口从 1098 更改为 8099

8099
重新启动服务器。

回答by vinay

The root cause is that JBOSS was not peoperly shut down. If you are using Windows, go to task manager and kill the JBOSS processes.

根本原因是 JBOSS 没有被人关闭。如果您使用的是 Windows,请转到任务管理器并终止 JBOSS 进程。

回答by don

Reserve the port 1098-1099 in registry. Restart the oracle service if running, then start the JBOss.

在注册表中保留端口 1098-1099。如果运行,则重新启动 oracle 服务,然后启动 JBOss。

回答by Sam Khawase

I guess that port is still in use. You can find that using:

我猜那个端口还在使用中。你可以发现使用:

netstat -ao

and

netstat -b

If you can't use that port, find another port and change it in the following XML file:

如果您不能使用该端口,请找到另一个端口并在以下 XML 文件中更改它:

conf/bindings-beans/META-INF/bindings-jboss-beans.xml

The JBoss 5 has a new ServiceBindingManager which uses bean injection to assign ports at runtime. Changing the port here may do the trick for you. You can also use a different ports configuration and override the ports by a factor.

JBoss 5 有一个新的 ServiceBindingManager,它使用 bean 注入在运行时分配端口。在此处更改端口可能对您有用。您还可以使用不同的端口配置并按因子覆盖端口。

回答by László van den Hoek

Based on the ports mentioned in the file referenced by Sam, and the registry key referenced by Daniel Schneller, the following should do the trick for JBoss EAP 5:

根据 Sam 引用的文件中提到的端口以及 Daniel Schneller 引用的注册表项,以下内容应该适用于 JBoss EAP 5:

1090-1090 1098-1102 1161-1162 3528-3528 4444-4448 4457-4457 4712-4714 5445-5446 8080-8083 8443-8443

1090-1090 1098-1102 1161-1162 3528-3528 4444-4448 4457-4457 4712-4714 5445-5446 8080-8083 8433-8

Translated in a .reg file:

翻译成 .reg 文件:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"ReservedPorts"=hex(7):31,00,30,00,39,00,30,00,2d,00,31,00,30,00,39,00,30,00,\
  20,00,31,00,30,00,39,00,38,00,2d,00,31,00,31,00,30,00,32,00,20,00,31,00,31,\
  00,36,00,31,00,2d,00,31,00,31,00,36,00,32,00,20,00,33,00,35,00,32,00,38,00,\
  2d,00,33,00,35,00,32,00,38,00,20,00,34,00,34,00,34,00,34,00,2d,00,34,00,34,\
  00,34,00,38,00,20,00,34,00,34,00,35,00,37,00,2d,00,34,00,34,00,35,00,37,00,\
  20,00,34,00,37,00,31,00,32,00,2d,00,34,00,37,00,31,00,34,00,20,00,35,00,34,\
  00,34,00,35,00,2d,00,35,00,34,00,34,00,36,00,20,00,38,00,30,00,38,00,30,00,\
  2d,00,38,00,30,00,38,00,33,00,20,00,38,00,34,00,34,00,33,00,2d,00,38,00,34,\
  00,34,00,33,00,00,00,00,00

回答by Daniel Schneller

We ran into this problem some time ago as well, not just with JBoss, but also MySQL. I wrote about it in more detail here:

前段时间我们也遇到过这个问题,不仅仅是JBoss,还有MySQL。我在这里更详细地描述了它:

Windows TCP Port Conflicts above 1024

Windows TCP 端口冲突高于 1024

What it comes down to is that Windows uses the port range between 1000 and 5000 for so called "ephemeral" ports. This means that it assigns ports from this range for processes that request a random port.

归根结底,Windows 将 1000 到 5000 之间的端口范围用于所谓的“临时”端口。这意味着它会为请求随机端口的进程分配此范围内的端口。

On Windows 2000/2003 Server installations as well as on Windows XP Pro you can reserve port ranges (even if they only cover a single port) for your applications. Effectively they are not reserved for anything specific, but just excluded from the dynamic allocation. To do so, create or edit the following registry value (type REG_MULTI_SZ/Multi-String Value):

在 Windows 2000/2003 Server 安装以及 Windows XP Pro 上,您可以为您的应用程序保留端口范围(即使它们只覆盖一个端口)。实际上,它们不是为任何特定的东西保留的,而是从动态分配中排除的。为此,请创建或编辑以下注册表值(类型REG_MULTI_SZ/Multi-String Value):

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\ReservedPorts

In this value specify port ranges in the format xxxx-yyyy with xxxx and yyyy being the lowest and highest port of the range to be reserved. To reserve a single port, just use the same values for both (e. g. 1099).

在此值中,以 xxxx-yyyy 格式指定端口范围,其中 xxxx 和 yyyy 是要保留的范围的最低和最高端口。要保留单个端口,只需为两者使用相同的值(例如 1099)。

回答by swapnil Mahadik

This error is also thrown by Jboss if your default IP address changes due to some problem means 121...89 to 121...90 Just check it and replace it with a newer IP address. It will work.

如果您的默认 IP 地址因某些问题而更改,则 Jboss 也会抛出此错误意味着 121 .. .89 到 121 .. .90 只需检查它并用更新的 IP 地址替换它。它会起作用。