3

我无法正常运行 kannel(一个开源短信网关)。每次我尝试我都会得到这个错误。错误:系统错误 98:地址已在使用中

这是我的 kannel.conf

group = core
admin-port = 13000
admin-password = 123
status-password = 123
smsbox-port = 13003
wapbox-port = 13004
log-file = "/home/eclipse/kannel_core.log"
log-level = 1
wdp-interface-name = "*"

#group = smsc
#smsc = fake
#port = 1000

group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13013
log-file = "/home/eclipse/kannel_smsbox.log"
log-level = 1

group = wapbox
bearerbox-host = 127.0.0.1
log-file = "/home/eclipse/kannel_wapbox.log"

group = sendsms-user
username = 123
password = 123
user-allow-ip = "127.0.0.1"

group = sms-service
url="http://localhost/sms/send.php?sender=%s&&text=%t"
accept-x-kannel-headers = true

和核心的日志文件:

2012-02-23 21:26:36 [9194] [0] INFO: Added logfile `/home/eclipse/kannel_core.log' with level `1'.
2012-02-23 21:26:36 [9194] [0] INFO: HTTP: Opening server at port 13000.
2012-02-23 21:26:36 [9194] [0] ERROR: bind failed
2012-02-23 21:26:36 [9194] [0] ERROR: System error 98: Address already in use
2012-02-23 21:26:36 [9194] [0] INFO: Adding interface *
2012-02-23 21:26:36 [9194] [0] ERROR: Couldn't bind a UDP socket to port 9200
2012-02-23 21:26:36 [9194] [0] ERROR: System error 98: Address already in use
2012-02-23 21:26:36 [9194] [0] ERROR: Couldn't bind a UDP socket to port 9201
2012-02-23 21:26:36 [9194] [0] ERROR: System error 98: Address already in use
2012-02-23 21:26:36 [9194] [0] INFO: ----------------------------------------
2012-02-23 21:26:36 [9194] [0] INFO: Kannel bearerbox II version 1.4.3 starting
2012-02-23 21:26:36 [9194] [7] ERROR: bind failed
2012-02-23 21:26:36 [9194] [7] ERROR: System error 98: Address already in use
2012-02-23 21:26:36 [9194] [7] PANIC: Could not open wapbox port 13004
2012-02-23 21:26:36 [9194] [0] INFO: MAIN: Start-up done, entering mainloop
2012-02-23 21:26:36 [9194] [7] PANIC: /usr/sbin/bearerbox(gw_panic+0xd2) [0x80d1b62]
2012-02-23 21:26:36 [9194] [7] PANIC: /usr/sbin/bearerbox() [0x8055bc0]
2012-02-23 21:26:36 [9194] [7] PANIC: /usr/sbin/bearerbox() [0x80c8bbb]
2012-02-23 21:26:36 [9194] [7] PANIC: /lib/i386-linux-gnu/libpthread.so.0(+0x6d31) [0x7a5d31]
2012-02-23 21:26:36 [9194] [7] PANIC: /lib/i386-linux-gnu/libc.so.6(clone+0x5e) [0xbba0ce]

我试图做很多改变,但没有成功。请让我知道我错过了哪一点。谢谢。

4

2 回答 2

9

端口 13000、9200、9201 和 13004 上正在运行其他东西——很可能是另一个 kannel 实例。

看看它是什么sudo netstat -lanp过程。

于 2012-02-23T18:31:44.117 回答
0

尝试停止 kannel 服务并在几秒钟后/etc/init.d/kannel stop启动它。/etc/init.d/kannel start我发现有时如果你停止 kannel 服务,需要几秒钟才能完全关闭。

于 2020-10-17T21:43:36.397 回答