Hi Fourat,

please test add the line "port=5432" or "port=the_port_of_postgres" in
the pgsql-connection group.

;p

On 7/14/06, Fourat Zouari <[EMAIL PROTECTED]> wrote:
It's ok, i got the sqlbox working
But still have one problem :
I have PGSQL going on the server, created a user owning a database and
configured my db group to fit that, the db connexion is ok, but sqlbox throw
an error in sqlbox.log :
-------------------------------------------------------------------------
2006-07-14 16:19:16 [7744] [0] INFO: Added logfile
`/var/log/smgs/sqlbox.log' with level `0'.
2006-07-14 16:19:16 [7744] [0] ERROR: PGSQL: connection to database
'smgstest' failed!
2006-07-14 16:19:16 [7744] [0] PANIC: PGSQL: could not connect to server:
Connection refused
        Is the server running on host "localhost" and accepting
        TCP/IP connections on port 1735355439?

2006-07-14 16:19:16 [7744] [0] PANIC:
/usr/local/sbin/sqlbox(gw_panic+0xe1) [0x806c030]
2006-07-14 16:19:16 [7744] [0] PANIC: /usr/local/sbin/sqlbox [0x8060731]
2006-07-14 16:19:16 [7744] [0] PANIC:
/usr/local/sbin/sqlbox(dbpool_increase+0xe1) [0x8060cf0]
2006-07-14 16:19:16 [7744] [0] PANIC:
/usr/local/sbin/sqlbox(dbpool_create+0x79) [0x8060dba]
2006-07-14 16:19:16 [7744] [0] PANIC:
/usr/local/sbin/sqlbox(sqlbox_init_pgsql+0x2f4) [0x80538b5]
2006-07-14 16:19:16 [7744] [0] PANIC:
/usr/local/sbin/sqlbox(main+0x379) [0x805087f]
2006-07-14 16:19:16 [7744] [0] PANIC:
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xd2)
[0xb7b39ea2]
2006-07-14 16:19:16 [7744] [0] PANIC: /usr/local/sbin/sqlbox [0x804f911]
-------------------------------------------------------------------------

Verifying with netstat, postgresql is listening, and i can log into db and
create any table i want.
here's my conf :

--SQLBOX----------------------------------------------------------------------
 group = sqlbox
# id corresponds to id in group = mysql-connection.
# this is analogous to id in group = dlr-db
id = dlr-01-db
# smsbox-id indicates the box where SQL-injected messages appear to be
coming from
smsbox-id = smsbox-01
# bearerbox host to connect to
bearerbox-host = "127.0.0.1"
# smsbox port to be listening on
smsbox-port = 13002
smsbox-port-ssl = false
 # sql-log-table is the table used to log all sent messages
sql-log-table = sent_sms
# sql-insert-table is the table that is monitored for new messages to send
sql-insert-table = send_sms
# global sender: If no sender is specified in sql-insert-table then this
# value is used.
global-sender = 06121
log-file = "/var/log/smgs/sqlbox.log"
log-level = 0
# ssl-client-certkey-file = ""
# ssl-server-cert-file = ""
# ssl-server-key-file = ""
# ssl-trusted-ca-file = ""
--SQLBOX----------------------------------------------------------------------

--SMSBOX----------------------------------------------------------------------
smsbox.conf     smsc.conf       smsc-fake.conf
[EMAIL PROTECTED]:/etc/smgs# cat smsbox.conf
group = smsbox
bearerbox-host = "localhost"
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
mo-recode = true
http-request-retry = 10
http-queue-delay = 60
smsbox-id = smsbox-01
sendsms-port = 13002
bearerbox-is-sqlbox=true
--SMSBOX----------------------------------------------------------------------

--BEARERBOX----------------------------------------------------------------------
 group = core
admin-port = 13000
admin-password = fxxbar
status-password = sTtx
admin-deny-ip = "*.*.*.*"
admin-allow-ip = 127.0.0.1
box-deny-ip = "*.*.*.*"
box-allow-ip = 127.0.0.1
wdp-interface-name = "*"
log-file = "/var/log/kannel/bearerbox.log"
log-level = 0
access-log = "/var/log/kannel/access.log"
smsbox-port = 13001
store-file = "/var/log/kannel/store"
dlr-storage = pgsql
--BEARERBOX----------------------------------------------------------------------

--SMSC----------------------------------------------------------------------
 group = smsc
smsc = fake
smsc-id = SMPP-01-FAKE
port = 10000
connect-allow-ip = 127.0.0.1
--SMSC----------------------------------------------------------------------

--PGSQLCONNEXION----------------------------------------------------------------------
 group = pgsql-connection
id = dlr-01-db
host = localhost
username = test
password = test
database = test
max-connections = 6
--PGSQLCONNEXION----------------------------------------------------------------------

--DLR-DB----------------------------------------------------------------------
 group = dlr-db
id = dlr-01-db
table = dlr
field-smsc = smsc
field-timestamp = date
field-destination = da
field-source = soa
field-service = service
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxcid
--DLR-DB----------------------------------------------------------------------

--
Humberto Figuera - Using Linux 2.6.17
Usuario GNU/Linux 369709
Caracas - Venezuela
GPG Key Fingerprint = 5AAC DF0C 00F4 2834 28BA  37AD 3364 01D1 74CA 0603

Reply via email to