由于8081端口的sunproxyadmin,不能包装反应本机吗?

时间:2022-05-17 20:52:32

when I run this in terminal:

当我在终端运行时:

lsof -n -i4TCP:8081

lsof - n -i4TCP:8081

I get this

我得到这个

node      10901 me   28u  IPv6 0xbcad49      0t0  TCP *:sunproxyadmin (LISTEN)
foo 11957 me   15u  IPv4 0xbcad49      0t0  TCP 127.0.0.1:61127->127.0.0.1:sunproxyadmin (CLOSE_WAIT)

What is this sunproxyadmin?

这是什么sunproxyadmin ?

3 个解决方案

#1


11  

Per http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=8081, TCP port 8081 is the well known port for sunproxyadmin the same way 80 is the well known port for http. In this case, you have a node process that is listening on port 8081, but lsof is trying to be helpful and show the well known port for this. Under linux, this is defined in /etc/services; I would expect OS X is similar.

每http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?搜索=8081,TCP端口8081是众所周知的sunproxyadmin端口,同样的方式80是众所周知的http端口。在本例中,您有一个在端口8081上监听的节点进程,但是lsof正在尝试提供帮助,并显示这个众所周知的端口。在linux下,这是在/etc/services中定义的;我希望OS X是类似的。

Edit 1: Note that per Apple Man Pages, passing -P

编辑1:注意每个苹果页面,通过-P。

inhibits the conversion of port numbers to port names for network files.
Inhibiting the conversion may make lsof run a little faster. It is also useful when port name lookup is not working properly.

禁止将端口号转换为网络文件的端口名称。抑制转换可能会使lsof运行得更快一些。当端口名称查找不能正常工作时,它也很有用。

This should cause lsof to not print out the confusing sunproxyadmin for something that just happens to use the port that Sun registered.

这将导致lsof不能打印出令人困惑的sunproxyadmin,因为它恰好使用了Sun注册的端口。

Edit 2: The second column in your response (e.g. 10901 in the first row, which is the one you want, and 11957 in the second row) should be the process ID. If you do ps aux | grep 10901 (or ps elf | grep [pid], as I can't remember which works right for OSX and don't have it handy) you should get something like:

编辑2:第二列在您的响应(例如10901在第一行,这是你想要的,和11957年在第二行)应该是进程ID的。如果你10901 ps辅助| grep(或ps精灵| grep(pid),因为我不记得工作对OSX和没有方便的)你应该得到类似:

apache 19783 0.0 0.2 251888 8580 ? S Oct07 0:00 /usr/sbin/httpd -DFOREGROUND

apache 19783 0.0 0.2 251888 8580 ?S Oct07 0:00 /usr/sbin/httpd - d前台。

(or to make something up:

(或编造一些东西:

nodeuser 10901 0.0 0.2 251888 8580 ? S Oct07 0:00 node index.js

nodeuser 10901 0.0 0.2 251888 8580 ?S Oct07 0:00 node index.js。

)

)

You can kill it with kill -9 10901 (or whatever the PID was) though you might find it comes back if it's running as a service or what.

你可以用kill -9 10901(或者其他的PID)来杀死它,不过你可能会发现如果它是作为一个服务运行或者是什么,它会回来。

This is useful enough to add to your bash profile:

这很有用,可以添加到您的bash配置文件中:

function findbyport()
{
  sudo lsof -P -iTCP:$1 -sTCP:LISTEN
}

#2


1  

Kill it, do in your terminal

杀了它,在你的终端。

sudo lsof -i :8081

from there get the PID number and then run

从那里得到PID号然后运行。

kill -9 <PID NUMBER>

You can check on FB documentation for more info

你可以查看FB文档了解更多信息。

#3


0  

If you don't want to kill sunproxyadmin process, let try to start React native in different port with command: react-native start --port your_port

如果您不想杀死sunproxyadmin过程,那么让尝试在不同的端口上使用命令来响应本地的本地操作:从本地开始——端口your_port。

Then open Dev settings (see how to open dev menu), and modify Debug server host & port for device to: your_local_ip:your_port

然后打开Dev设置(查看如何打开Dev菜单),并将调试服务器主机和端口修改为:your_local_ip:your_port。

#1


11  

Per http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=8081, TCP port 8081 is the well known port for sunproxyadmin the same way 80 is the well known port for http. In this case, you have a node process that is listening on port 8081, but lsof is trying to be helpful and show the well known port for this. Under linux, this is defined in /etc/services; I would expect OS X is similar.

每http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?搜索=8081,TCP端口8081是众所周知的sunproxyadmin端口,同样的方式80是众所周知的http端口。在本例中,您有一个在端口8081上监听的节点进程,但是lsof正在尝试提供帮助,并显示这个众所周知的端口。在linux下,这是在/etc/services中定义的;我希望OS X是类似的。

Edit 1: Note that per Apple Man Pages, passing -P

编辑1:注意每个苹果页面,通过-P。

inhibits the conversion of port numbers to port names for network files.
Inhibiting the conversion may make lsof run a little faster. It is also useful when port name lookup is not working properly.

禁止将端口号转换为网络文件的端口名称。抑制转换可能会使lsof运行得更快一些。当端口名称查找不能正常工作时,它也很有用。

This should cause lsof to not print out the confusing sunproxyadmin for something that just happens to use the port that Sun registered.

这将导致lsof不能打印出令人困惑的sunproxyadmin,因为它恰好使用了Sun注册的端口。

Edit 2: The second column in your response (e.g. 10901 in the first row, which is the one you want, and 11957 in the second row) should be the process ID. If you do ps aux | grep 10901 (or ps elf | grep [pid], as I can't remember which works right for OSX and don't have it handy) you should get something like:

编辑2:第二列在您的响应(例如10901在第一行,这是你想要的,和11957年在第二行)应该是进程ID的。如果你10901 ps辅助| grep(或ps精灵| grep(pid),因为我不记得工作对OSX和没有方便的)你应该得到类似:

apache 19783 0.0 0.2 251888 8580 ? S Oct07 0:00 /usr/sbin/httpd -DFOREGROUND

apache 19783 0.0 0.2 251888 8580 ?S Oct07 0:00 /usr/sbin/httpd - d前台。

(or to make something up:

(或编造一些东西:

nodeuser 10901 0.0 0.2 251888 8580 ? S Oct07 0:00 node index.js

nodeuser 10901 0.0 0.2 251888 8580 ?S Oct07 0:00 node index.js。

)

)

You can kill it with kill -9 10901 (or whatever the PID was) though you might find it comes back if it's running as a service or what.

你可以用kill -9 10901(或者其他的PID)来杀死它,不过你可能会发现如果它是作为一个服务运行或者是什么,它会回来。

This is useful enough to add to your bash profile:

这很有用,可以添加到您的bash配置文件中:

function findbyport()
{
  sudo lsof -P -iTCP:$1 -sTCP:LISTEN
}

#2


1  

Kill it, do in your terminal

杀了它,在你的终端。

sudo lsof -i :8081

from there get the PID number and then run

从那里得到PID号然后运行。

kill -9 <PID NUMBER>

You can check on FB documentation for more info

你可以查看FB文档了解更多信息。

#3


0  

If you don't want to kill sunproxyadmin process, let try to start React native in different port with command: react-native start --port your_port

如果您不想杀死sunproxyadmin过程,那么让尝试在不同的端口上使用命令来响应本地的本地操作:从本地开始——端口your_port。

Then open Dev settings (see how to open dev menu), and modify Debug server host & port for device to: your_local_ip:your_port

然后打开Dev设置(查看如何打开Dev菜单),并将调试服务器主机和端口修改为:your_local_ip:your_port。