我正在尝试运行一个泊坞窗图片,它说的是已经在使用的地址
driver failed programming external connectivity on endpoint jovial_saha (c79c98cbcef6340cd7867571278f401c9cbea1fd7137a39fe5d7de1c454d4e6e): Error starting userland proxy: listen tcp 0.0.0.0:9042: bind: address already in use.
然而,我删除了所有容器和图像,然后即使我打电话来运行我的图像
docker run -d -p 9042:9042 myimage . i get above error. what should i do ?
答案 0 :(得分:7)
为了扩展罗伯特·莫斯卡尔的答案,你需要杀死那个端口上的任何东西:
fuser -k 9042/tcp
快乐狩猎!
答案 1 :(得分:2)
我与sudo
一起使用。它对我有用。
sudo fuser -k 9042/tcp
我检查端口状态:
$ netstat -pna | grep 9042
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
答案 2 :(得分:0)
在主机上使用fuser
不能为我解决问题。
我解决了,
在docker和用户psmisc
上安装fuser
。
$ apt-get install psmisc
$ fuser -k 9042/tcp