That error comes in fact from the PGSql layer, being invoked from kannel's
dbpool.
I assume something's wrong with your pgsql configuration(s?) and it's taking
36 as the default port somehow, though your pgsql engine is obviously not
taking that value to boot.
Try setting "port = 5432" on your pgsql-connection group, it should solve
your problem.

(BTW, I've just noticed this is not documented on the userguide!)

Hope it helps,

Alejandro

On Thu, Jun 18, 2009 at 12:07 PM, Tshimanga Minkoka <
[email protected]> wrote:

> Hi,
>
> I am setting up a kannel box with
> SMS Gateway cvs-20090525
> SQLBox version 0.7.2
> Postgres 8.3.7-1PGDG.rhel5
> RHEL 5.3 kernel 2.6.18-128.el5
>
> Everything has been compiled and installed successfully.
>
> I can start bearerbox without problem. It is when I start sqlbox that it
> complains with
>
> <screen>
>
> [r...@vaskannel kannel]# sqlbox -v 0 kannel_sqlbox.conf
> 2009-06-18 10:50:52 [11071] [0] INFO: Debug_lvl = 0, log_file = <none>,
> log_lvl = 0
> 2009-06-18 10:50:52 [11071] [0] DEBUG: Kannel sqlbox version
> `cvs-20090525'.
> Build `May 29 2009 11:11:51', compiler `4.1.2 20080704 (Red Hat
> 4.1.2-44)'.
> System Linux, release 2.6.18-128.el5, version #1 SMP Wed Dec 17 11:42:39
> EST 2008, machine i686.
> Hostname vaskannel, IP 127.0.0.1.
> Libxml version 2.6.26.
> Using OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008.
> Using native malloc.
>
> 2009-06-18 10:50:52 [11071] [0] INFO: Starting to log to file
> /tmp/kannel/sqlbox.log level 0
> 2009-06-18 10:50:52 [11071] [0] INFO: Added logfile
> `/tmp/kannel/sqlbox.log' with level `0'.
> 2009-06-18 10:50:52 [11071] [0] ERROR: PGSQL: connection to database
> 'kannel' failed!
> 2009-06-18 10:50:52 [11071] [0] PANIC: PGSQL: could not connect to
> server: Connection refused
>        Is the server running on host "localhost" and accepting
>        TCP/IP connections on port 36?
>
> 2009-06-18 10:50:52 [11071] [0] PANIC: sqlbox(gw_panic+0xc2) [0x806e722]
> 2009-06-18 10:50:52 [11071] [0] PANIC: sqlbox [0x80623e1]
> 2009-06-18 10:50:52 [11071] [0] PANIC: sqlbox(dbpool_increase+0xa7)
> [0x8061887]
> 2009-06-18 10:50:52 [11071] [0] PANIC: sqlbox(dbpool_create+0x7f)
> [0x8061d0f]
> 2009-06-18 10:50:52 [11071] [0] PANIC: sqlbox(sqlbox_init_pgsql+0x2fb)
> [0x805123b]
> 2009-06-18 10:50:52 [11071] [0] PANIC: sqlbox(main+0x3b1) [0x804ff31]
> 2009-06-18 10:50:52 [11071] [0] PANIC:
> /lib/libc.so.6(__libc_start_main+0xdc) [0x125e8c]
> 2009-06-18 10:50:52 [11071] [0] PANIC: sqlbox [0x804fa21]
>
> </screen>
>
> Of course, postgresql is running and listening and accepting connection
> on default port 5432!
> I cannot see where does sqlbox pick up the port 36 it tries to connect
> to!
> I looked in all the kannel and postgresql configuration files without
> seeing where I can modify or change something.
>
> Below are the bearerbox and sqlbox configuration files used.
>
> Any help will be appreciated.
>
> Regards,
>
> Tshimanga Minkoka.
>
> <kannel_bearerbox.conf>
>
> # CORE
> group = core
> admin-port = 13010
> admin-password = foo
> status-password = bar
> #admin-deny-ip = ""
> admin-allow-ip = "*.*.*.*"
> log-file = "/tmp/kannel/01_core_log_file.log"
> log-level = 0
> access-log = "/tmp/kannel/01_core_access_log.log"
> #http-proxy-host = "127.0.0.1"
> #http-proxy-port = 8080
> #http-proxy-exceptions = "127.0.0.1"
> #http-proxy-username = "user"
> #http-proxy-password = "password"
> #ssl-certkey-file = "mycertandprivkeyfile.pem"
> # Smsbox related
> smsbox-port = 13011
> #box-deny-ip = "*.*.*.*"
> box-allow-ip = "*.*.*.*"
> #unified-prefix = "00358,0"
> #white-list = "http://127.0.0.1/white-list.txt";
> #black-list = "http://127.0.0.1/black-list.txt";
> #store-file = "/var/log/kannel/01_core_store_file.log"
> #store-dump-freq = 10
> # Wapbox related
> #wapbox-port = 13012
> #udp-deny-ip = "*.*.*.*"
> #udp-allow-ip = "127.0.0.1"
> #wdp-interface-name = "*"
>
>
>
> # SMSC CONNECTIONS - GLOBAL FIELDS
> #group = smsc
> #smsc =
> #smsc-id = 01_ID
> #denied-smsc-id = "X;Y"
> #allowed-smsc-id = "Z"
> #preferred-smsc-id = "W"
> #allowed-prefix = "040;050"
> #denied-prefix = "060;070"
> #alt-charset =
>
>
> # SMSC SMPP
> group = smsc
> smsc = smpp
> smsc-id = 01_smpp_csmsc01_vastest
> host = 1.2.3.4
> port = 6200
> receive-port = 6200
> smsc-username = foo
> smsc-password = bar
> system-type = ST
> #address-range =
> interface-version = "33"
> my-number = 1234
> #source-addr-ton =
> #source-addr-npi =
> #source-addr-autodetect = true
> #dest-addr-ton =
> #dest-addr-ton =
> #bind-addr-npi =
> #bind-addr-npi =
> #msg-id-type =
> log-file = "/tmp/kannel/smpp_log_file.log"
> log-level = 0
>
>
>
> # SMSBOX SETUP
> group = smsbox
> bearerbox-host = localhost
> #smsbox-id = smsbox
> #bearerbox-port = smsbox-port found in core group
> sendsms-port = 13013
> #sendsms-chars = "0123456789 +-"
> #global-sender = +243815160684
> #global-sender = 1234
> #log-file = "/tmp/kannel/smsbox_log_file.log"
> #log-level = 0
> #access-log = "/tmp/kannel/smsbox_access_log.log"
> #white-list =
> #black-list =
> #reply-couldnotfetch =
> #reply-couldnotrepresent =
> #reply-requestfailed =
> #reply-emptymessage =
> </kannel_bearerbox.conf>
>
> <kannel_sqlbox.conf>
>
> group = sqlbox
> id = sqlbox-db
> smsbox-id = sqlbox
> #global-sender = ""
> bearerbox-host = localhost
> bearerbox-port = 13011
> smsbox-port = 13012
> smsbox-port-ssl = false
> sql-log-table = sent_sms
> sql-insert-table = send_sms
> log-file = "/tmp/kannel/sqlbox.log"
> log-level = 0
> #ssl-client-certkey-file = ""
> #ssl-server-cert-file = ""
> #ssl-server-key-file = ""
> #ssl-trusted-ca-file = ""
>
> # Example POSTGRESQL Connection
> group = pgsql-connection
> id = sqlbox-db
> username = postgres
> password = foobar
> database = kannel
> host = localhost
>
> </kannel_sqlbox.conf>
>
>
>
>
>

Reply via email to