无法创建套接字以调用我的星号服务器?

Unable to create socket so as to call to my asterisk server?

当我呼叫 asterisk 时,asterisk 给我一个拥塞状态。当我检查我的日志时,它收到以下警告:

[Mar 17 13:33:03] WARNING[657] acl.c: Cannot create socket
[Mar 17 13:33:03] ERROR[657] rtp.c: Unable to allocate socket: Too many open files
[Mar 17 13:33:03] ERROR[657] rtp.c: Unable to allocate socket: Too many open files
[Mar 17 13:33:03] WARNING[657] chan_sip.c: Unable to create RTP audio and video session: Too many open files

[Mar 17 13:33:32] WARNING[657] channel.c: Channel allocation failed: Can't create alert pipe!
[Mar 17 13:33:32] WARNING[657] chan_sip.c: Unable to allocate AST channel structure for SIP channel
[Mar 17 13:33:32] NOTICE[657] chan_sip.c: Unable to create/find SIP channel for this INVITE

我已经给了很高的 ulimit 值,但仍然出现问题。任何人都可以知道这个问题是如何出现的以及如何停止它。

1) 检查 selinux/apparmor 安全设置

2) 检查 运行 进程的限制

Check the open FD limit for a given process in Linux

3) 检查用户星号(不是 root)的系统范围限制。

https://superuser.com/questions/810951/how-do-i-check-the-ulimit-for-another-user-and-change-open-files

只需在命令行中尝试以下两行

sudo asterisk -cvvvvvvvvvvvvvvvvr

在星号 CLI 中

ulimit descriptors 180839