Eiffel Web Framework,在Linux上运行的应用引发了“地址已在使用中:引发IO_FAILURE" [英] Eiffel Web Framework, app run on linux raises `Address already in use: IO_FAILURE raised`

查看:81
本文介绍了Eiffel Web Framework,在Linux上运行的应用引发了“地址已在使用中:引发IO_FAILURE"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在停止EWF应用并在已经使用的地址中再次启动它之后:c_bind Address already in use: IO_FAILURE raised

After stopping an EWF app and starting it again in a Address already in use: c_bind Address already in use: IO_FAILURE raised

此处所述,TCP套接字超时在操作系统释放之前似乎不可用

As explained here, it seems that TCP socket timeout is not available for some time before being released by OS.

推荐答案

我发现的最佳解决方法是

The best workaround I found is

sudo sh -c 'echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle'

此答案的信用

我相信程序无法使用套接字的想法是允许任何仍在传输中的TCP数据段到达并被内核丢弃.也就是说,应用程序可以在套接字上调用close(2),但是路由延迟或意外情况会控制数据包,或者您可以允许TCP连接的另一端发送数据一段时间.该应用程序已表明它不再希望处理TCP数据段,因此内核应在传入数据时将其丢弃.

I believe that the idea of the socket being unavailable to a program is to allow any TCP data segments still in transit to arrive, and get discarded by the kernel. That is, it's possible for an application to call close(2) on a socket, but routing delays or mishaps to control packets or what have you can allow the other side of a TCP connection to send data for a while. The application has indicated it no longer wants to deal with TCP data segments, so the kernel should just discard them as they come in.

改变了一切.第二个开瓶器"仅用了3秒钟就获得了新的插槽.

did change things. The second "opener" only took about 3 seconds to get its new socket.

这篇关于Eiffel Web Framework,在Linux上运行的应用引发了“地址已在使用中:引发IO_FAILURE"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆