Kannel启动但不创建日志文件

时间:2015-09-22 17:50:28

标签: smpp kannel

当我用service kannel start启动kannel服务时,一切正常,kannel确实启动,但它不起作用。不创建日志文件,/var/log/kannel/目录为空,但我不知道原因。

我的配置如下:

group = core
admin-port = 13000
admin-password = pass
log-file = "/var/log/kannel/bearerbox.log"
log-level = 0
access-log = "/var/log/kannel/access_kannel.log"
store-file = "/var/log/kannel/store_sms"
smsbox-port = 13001
dlr-storage = internal
sms-resend-retry = 1

group = smsc
smsc-id = povoljye
smsc = smpp
host = **.***.***.***
port = 2775
smsc-username = "***"
smsc-password = "***"
address-range = ""
source-addr-ton = 0
source-addr-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
system-type = VMA
throughput = 1000
reconnect-delay = 5
connection-timeout = 120
transceiver-mode = true
denied-smsc-id = kemerovo
allowed-smsc-id = povoljye
preferred-smsc-id = povoljye

group = smsc
smsc-id = kemerovo
smsc = smpp
host = ***.***.***.***
port = 3102
smsc-username = "***"
smsc-password = "***"
address-range = ""
source-addr-ton = 0
source-add-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
system-type = VMA
throughput = 1000
reconnect-delay = 5
connection-timeout = 120
transceiver-mode = true
denied-smsc-id = povoljye
allowed-smsc-id = kemerovo
preferred-smsc-id = kemerovo

group = smsbox
bearerbox-host = localhost
sendsms-port = 13005
global-sender = 4105
log-file = /var/log/kannel/smsbox.log
log-level = 0
access-log = /var/log/kannel/access_smsbox.log

group = sendsms-user
username = "user1"
password = "pass"
concatenation = true
max-messages = 20
default-smsc = povoljye

group = sendsms-user
username = "user2"
password = "pass"
concatenation = true
max-messages = 20
default-smsc = kemerovo

group = sms-service
keyword = default
post-url = "http://domain.com/sms/%p/time/%t/coding/%c/smsc/%i"
concatenation = true
max-messages = 0

这个问题可能是什么原因以及如何找到更多?

2 个答案:

答案 0 :(得分:4)

我猜你的/var/log/kannel不能被kannel用户写入。假设安装合理的标准,您可以尝试

sudo chown -R kannel:kannel /var/log/kannel

使kannel用户成为目录的所有者。然后重新启动它,日志应该出现在那里。或者您可以尝试使用任何其他权限来使目录可写(chmod,将kannel添加到所有者组或其他内容。)

您也可以在调试模式下从命令行启动Kannel并查看是否有任何有趣的内容(有趣的是我指的是关于无法访问的目录或文件的错误消息),例如:

/usr/local/sbin/bearerbox -v 0 -- /etc/kannel/kannel.conf

(这是假设标准路径,如果你的不同,你应该改变它们。)

答案 1 :(得分:0)

两个SMSC的工作配置:

group = core
log-file = "/var/log/kannel/bearerbox.log"
log-level = 0
access-log = "/var/log/kannel/access_kannel.log"
admin-port = 13000
admin-password = pass
store-file = "/var/log/kannel/store_sms"
smsbox-port = 13001
dlr-storage = internal
sms-resend-retry = 1

group = smsc
smsc-id = receivesend
smsc = smpp
host = **.**.***.***
port = 2775
smsc-username = "***"
smsc-password = "***"
address-range = ""
source-addr-ton = 0
source-addr-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
system-type = VMA
throughput = 1000
reconnect-delay = 5
connection-timeout = 120
transceiver-mode = true
denied-smsc-id = onlysend
allowed-smsc-id = receivesend
preferred-smsc-id = receivesend

group = smsbox
bearerbox-host = localhost
sendsms-port = 13005
global-sender = 4105
log-file = /var/log/kannel/smsbox.log
log-level = 0
access-log = /var/log/kannel/access_smsbox.log

group = smsc
smsc-id = onlysend
smsc = smpp
host = **.***.***.***
port = 3102
smsc-username = "***"
smsc-password = "***"
address-range = ""
source-addr-ton = 0
source-addr-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
system-type = VMA
throughput = 1000
reconnect-delay = 5
connection-timeout = 120
transceiver-mode = true
denied-smsc-id = receivesend
allowed-smsc-id = onlysend
preferred-smsc-id = onlysend

group = sendsms-user
username = "user1"
password = "pass"
concatenation = true
max-messages = 20
default-smsc = receivesend

group = sms-service
keyword = default
post-url = "http://*****.**/sms/%p/time/%t/coding/%c/smsc/%i"
concatenation = true
max-messages = 2

group = sendsms-user
username = "user2"
password = "pass"
concatenation = true
max-messages = 20
default-smsc = onlysend