使用假短信中心通过kannel发送短信

时间:2010-02-25 10:14:30

标签: sms kannel

我将kannel配置为假短信中心。但是当我尝试发送短信时,我收到以下错误:

2010-02-24 15:12:30 [932] [12] DEBUG: send_msg: sending msg to box: 
2010-02-24 15:12:30 [932] [12] ERROR: Error writing 16 octets to fd 34:
2010-02-24 15:12:30 [932] [12] ERROR: System error 104: Connection reset by peer
2010-02-24 15:12:30 [932] [12] ERROR: Couldn't write Msg to box , disconnecting
2010-02-24 15:12:30 [932] [12] DEBUG: Thread 12 (gw/bb_boxc.c:boxc_sender) terminates.
2010-02-24 15:12:30 [932] [11] ERROR: Error writing 16 octets to fd 34:
2010-02-24 15:12:30 [932] [11] ERROR: System error 104: Connection reset by peer
2010-02-24 15:12:30 [932] [11] DEBUG: Thread 11 (gw/bb_boxc.c:function) terminates.
2010-02-24 15:12:35 [932] [15] ERROR: Error reading from fd 39:
2010-02-24 15:12:35 [932] [15] ERROR: System error 104: Connection reset by peer
2010-02-24 15:12:35 [932] [15] ERROR: Error reading from fd 39:
2010-02-24 15:12:35 [932] [15] ERROR: System error 104: Connection reset by peer

怎么了?
发送短信的网址:

http://localhost:13003/cgi-bin/sendsms?username=&password=&to=0123456&text=Hello+world

我在cygwin和red hat下运行了kannel,每个系统上的错误都是一样的。


我的kannel.conf

group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
log-file = /var/log/kannel/kannel.log
log-level = 0
access-log = /var/log/kannel/access_kannel.log
store-file = /var/log/kannel/store_sms

group = smsc
smsc = fake
port = 13004
connect-allow-ip = "*.*.*.*"

group = smsbox
bearerbox-host = localhost
sendsms-port = 13003
global-sender = 13003
smsbox-id = "my smsbox"
log-file = /var/log/kannel/smsbox.log
log-level = 0

group = sendsms-user
username = 
password = 

group = sms-service
keyword = default
text = "No service specified"

1 个答案:

答案 0 :(得分:0)

当对等关闭连接时(当kannel仍在尝试读取或发送消息时)会发生该错误,因此kannel仅在日志跟踪中向您显示此信息。

问题不在于kannel,而在于同伴。

找出对等方关闭连接的原因。 如果连接未关闭,则不应发生此错误,并且kannel应该能够读取/发送消息。

感谢。