Alejandro,
Success!!! When I added the FQDN and the trailing forward slash, it seems to be
working now with the Stable 1.4.3 version. I had tried the FQDN yesterday
without success so I believe that the trailing forward slash may be the key
(Just FYI for anyone else frantically googling like I was yesterday).
One final semi related question: What is the format of the IP list for the connect-allow-ip
parameter? I had "3.3.3.3,127.0.0.1" but it told me that 3.3.3.3 was denied. When I
changed it to just "3.3.3.3" it works, but I would like to add multiple addresses into
that list.
Thanks to everyone who responded. I really appreciate all of your help.
Brian
-------- Original Message --------
Subject: {Disarmed} Re: {Disarmed} Re: Problem with gw_gethostbyname in Stable
version 1.4.3
From: Alejandro Guerrieri <alejandro.guerri...@gmail.com>
To: Brian Rathman <br...@telrite.com>
Cc: users@kannel.org
Date: Tuesday, August 10, 2010 10:29:38 AM
Ah, or you could use:
send-url = "http://smstest.laborbridge.com
<http://smstest.laborbridge.com>:9001/"
Tthat should work (I think it gets confused with the IP + port, should
work fine with a regular fqdn).
Regards,
Alex
On Tue, Aug 10, 2010 at 4:20 PM, Brian Rathman <br...@telrite.com
<mailto:br...@telrite.com>> wrote:
Here is my /etc/hosts file:
127.0.0.1 localhost
10.20.10.6 Amstel.telrite.com <http://Amstel.telrite.com>
Amstel
2.2.2.2 smstest.laborbridge.com <http://smstest.laborbridge.com>
I can ping and resolve all of these fine. 2.2.2.2 is not the actual
IP address obviously, but I believe the problem is that function in
protected.c is trying to resolve *MailScanner warning: numerical
links are often malicious:* 2.2.2.2:9001 <http://2.2.2.2:9001>
instead of just 2.2.2.2
-------- Original Message --------
Subject: {Disarmed} Re: Problem with gw_gethostbyname in Stable
version 1.4.3
From: Abdul Basit <basit.e...@gmail.com <mailto:basit.e...@gmail.com>>
To: Nikos Balkanas <nbalka...@gmail.com <mailto:nbalka...@gmail.com>>
Cc: Brian Rathman <br...@telrite.com <mailto:br...@telrite.com>>,
users@kannel.org <mailto:users@kannel.org>
Date: Tuesday, August 10, 2010 6:27:27 AM
Nikos is right. I get this problem resolved by adding line in
/etc/hosts
127.0.0.1 localhost.localdomain localhost yourhostnamehere
or add line
2.2.2.2 yourhostname
2010/8/10 Nikos Balkanas <nbalka...@gmail.com
<mailto:nbalka...@gmail.com> <mailto:nbalka...@gmail.com
<mailto:nbalka...@gmail.com>>>
Hi,
Always use users list for such questions.
Add your server to /etc/hosts.
I don't know to which variable "name" you are referring to.
Try:
telnet 2222 9201
from a shell to see if you have connectivity to HTTP smsc. That
address 2.2.2.2 in your send-url looks mighty suspicious.
BR,
Nikos
----- Original Message ----- From: "Brian Rathman"
<br...@telrite.com <mailto:br...@telrite.com>
<mailto:br...@telrite.com <mailto:br...@telrite.com>>>
To: <de...@kannel.org <mailto:de...@kannel.org>
<mailto:de...@kannel.org <mailto:de...@kannel.org>>>
Sent: Tuesday, August 10, 2010 12:49 AM
Subject: Problem with gw_gethostbyname in Stable version 1.4.3
Hi, I am attempting to connect two Kannel servers at two
different locations via the smsc group using smsc = http.
I have
tried this on three different server and I am getting the
same
bevahior on all three (system 1: debian 5.0.5, system 2:
Ubuntu
9.04, system 3: Ubuntu 10.04). In all three cases, when I
send a
message via the sendsms-user group, I get the following
error:
2010-08-09 10:13:47 [9636] [17] ERROR: Error while
gw_gethostbyname occurs.
2010-08-09 10:13:47 [9636] [17] ERROR: System error 3: No
such
process
2010-08-09 10:13:47 [9636] [17] ERROR: gethostbyname failed
2010-08-09 10:13:47 [9636] [17] ERROR: error connecting to
server `*MailScanner warning: numerical links are often
malicious:* *MailScanner warning: numerical links are
often malicious:* 2.2.2.2:9001 <http://2.2.2.2:9001>
<*MailScanner warning: numerical links are often malicious:*
http://2.2.2.2:9001>' at port `9001'
I googled several things before bothering you guys, and even
tried adding some code to the protected.c file in the
gw_gethostbyname function to try and figure out what was
going
on. What I found, was that the "name" variable is showing
up as
*MailScanner warning: numerical links are often malicious:*
*MailScanner warning: numerical links are often
malicious:* 2.2.2.2:9001 <http://2.2.2.2:9001> <*MailScanner
warning: numerical links are often malicious:*
http://2.2.2.2:9001> instead of just 2.2.2.2. I'm
not sure if this correct or not.
Anyways, here is my config and my logs:
# HTTP administration is disabled by default. Make sure
you set the
# password if you enable it.
group = core
admin-port = 13000
admin-password = bar
admin-deny-ip = "*.*.*.*"
admin-allow-ip = ""
smsbox-port = 13001
#wapbox-port = 13002
wdp-interface-name = "*"
log-file = "/var/log/kannel/bearerbox.log"
log-level = 0 # Testing
#log-level = 1 # Production
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
#group = wapbox
#bearerbox-host = localhost
#log-file = "/var/log/kannel/wapbox.log"
group = smsc
smsc = http
system-type = kannel
smsc-id = LBSMS1
smsc-username = XXXXXXX
smsc-password = XXXXXXX
port = 9001
send-url = "*MailScanner warning: numerical links are often
malicious:* *MailScanner warning: numerical links are
often malicious:* http://2.2.2.2:9001"
#connect-allow-ip = "127.0.0.1"
group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13013
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
group = sendsms-user
username = kustc
password = XXXXXX
#default-smsc = ATTSTC
concatenation= true
max-messages = 10
group = sms-service
#keyword =
keyword-regex = .*
catch-all = yes
max-messages = 0
get-url = "*MailScanner warning: numerical links are often
malicious:* *MailScanner warning: numerical links are
often malicious:* http://10.20.10.10/test/sms?phone=%p&text=%a
<http://10.20.10.10/test/sms?phone=%p&text=%a>
<*MailScanner warning: numerical links are often
malicious:* http://10.20.10.10/test/sms?phone=%p&text=%a
<http://10.20.10.10/test/sms?phone=%p&text=%a>>"
Logs:
/var/logs/kannel/bearerbox:
2010-08-09 17:42:23 [17821] [0] INFO: Added logfile
`/var/log/kannel/bearerbox.log' with level `0'.
2010-08-09 17:42:23 [17821] [0] INFO: HTTP: Opening server at
port 13000.
2010-08-09 17:42:23 [17821] [1] DEBUG: Thread 1
(gwlib/fdset.c:poller) maps to pid 17821.
2010-08-09 17:42:23 [17821] [0] DEBUG: Started thread 1
(gwlib/fdset.c:poller)
2010-08-09 17:42:23 [17821] [2] DEBUG: Thread 2
(gwlib/http.c:server_thread) maps to pid 17821.
2010-08-09 17:42:23 [17821] [0] DEBUG: Started thread 2
(gwlib/http.c:server_thread)
2010-08-09 17:42:23 [17821] [3] DEBUG: Thread 3
(gw/bb_http.c:httpadmin_run) maps to pid 17821.
2010-08-09 17:42:23 [17821] [0] DEBUG: Started thread 3
(gw/bb_http.c:httpadmin_run)
2010-08-09 17:42:23 [17821] [0] DEBUG: starting smsbox
connection module
2010-08-09 17:42:23 [17821] [0] INFO: BOXC:
'smsbox-max-pending'
not set, using default (100).
2010-08-09 17:42:23 [17821] [4] DEBUG: Thread 4
(gw/bb_boxc.c:sms_to_smsboxes) maps to pid 17821.
2010-08-09 17:42:23 [17821] [0] DEBUG: Started thread 4
(gw/bb_boxc.c:sms_to_smsboxes)
2010-08-09 17:42:23 [17821] [5] DEBUG: Thread 5
(gw/bb_boxc.c:smsboxc_run) maps to pid 17821.
2010-08-09 17:42:23 [17821] [0] DEBUG: Started thread 5
(gw/bb_boxc.c:smsboxc_run)
2010-08-09 17:42:23 [17821] [0] INFO: Set SMS resend
frequency
to 60 seconds.
2010-08-09 17:42:23 [17821] [0] INFO: SMS resend retry set to
unlimited.
2010-08-09 17:42:23 [17821] [0] DEBUG: smsbox MO concatenated
message handling enabled
2010-08-09 17:42:23 [17821] [0] INFO: DLR rerouting for
smsc id
<LBSMS1> disabled.
2010-08-09 17:42:23 [17821] [0] INFO: HTTP: Opening server at
port 9001.
2010-08-09 17:42:23 [17821] [6] DEBUG: Thread 6
(gw/smsc/smsc_http.c:httpsmsc_receiver) maps to pid 17821.
2010-08-09 17:42:23 [17821] [0] DEBUG: Started thread 6
(gw/smsc/smsc_http.c:httpsmsc_receiver)
2010-08-09 17:42:23 [17821] [7] DEBUG: Thread 7
(gw/smsc/smsc_http.c:httpsmsc_send_cb) maps to pid 17821.
2010-08-09 17:42:23 [17821] [0] DEBUG: Started thread 7
(gw/smsc/smsc_http.c:httpsmsc_send_cb)
2010-08-09 17:42:23 [17821] [0] INFO: HTTP[LBSMS1]: Initiated
and ready
2010-08-09 17:42:23 [17821] [8] DEBUG: Thread 8
(gw/bb_smscconn.c:sms_router) maps to pid 17821.
2010-08-09 17:42:23 [17821] [0] DEBUG: Started thread 8
(gw/bb_smscconn.c:sms_router)
2010-08-09 17:42:23 [17821] [0] DEBUG: starting UDP
sender/receiver module
2010-08-09 17:42:23 [17821] [0] INFO: Adding interface *
2010-08-09 17:42:23 [17821] [0] DEBUG: udpc_create: Bound
to UDP
<*MailScanner warning: numerical links are often malicious:*
*MailScanner warning: numerical links are often
malicious:* 0.0.0.0:9200 <http://0.0.0.0:9200> <*MailScanner
warning: numerical links are often malicious:* http://0.0.0.0:9200>>
2010-08-09 17:42:23 [17821] [9] DEBUG: Thread 9
(gw/bb_udp.c:udp_receiver) maps to pid 17821.
2010-08-09 17:42:23 [17821] [0] DEBUG: Started thread 9
(gw/bb_udp.c:udp_receiver)
2010-08-09 17:42:23 [17821] [10] DEBUG: Thread 10
(gw/bb_udp.c:udp_sender) maps to pid 17821.
2010-08-09 17:42:23 [17821] [0] DEBUG: Started thread 10
(gw/bb_udp.c:udp_sender)
2010-08-09 17:42:23 [17821] [0] DEBUG: udpc_create: Bound
to UDP
<*MailScanner warning: numerical links are often malicious:*
*MailScanner warning: numerical links are often
malicious:* 0.0.0.0:9201 <http://0.0.0.0:9201> <*MailScanner
warning: numerical links are often malicious:* http://0.0.0.0:9201>>
2010-08-09 17:42:23 [17821] [11] DEBUG: Thread 11
(gw/bb_udp.c:udp_receiver) maps to pid 17821.
2010-08-09 17:42:23 [17821] [0] DEBUG: Started thread 11
(gw/bb_udp.c:udp_receiver)
2010-08-09 17:42:23 [17821] [12] DEBUG: Thread 12
(gw/bb_udp.c:udp_sender) maps to pid 17821.
2010-08-09 17:42:23 [17821] [0] DEBUG: Started thread 12
(gw/bb_udp.c:udp_sender)
2010-08-09 17:42:23 [17821] [0] DEBUG: starting wapbox
connection module
2010-08-09 17:42:23 [17821] [0] ERROR: Missing wapbox-port
variable, cannot start WAP
2010-08-09 17:42:23 [17821] [0] DEBUG: starting WDP router
2010-08-09 17:42:23 [17821] [13] DEBUG: Thread 13
(gw/bearerbox.c:wdp_router) maps to pid 17821.
2010-08-09 17:42:23 [17821] [13] DEBUG: udp_die: removing
producers from udp-lists
2010-08-09 17:42:23 [17821] [13] DEBUG: Thread 13
(gw/bearerbox.c:wdp_router) terminates.
2010-08-09 17:42:23 [17821] [0] DEBUG: Started thread 13
(gw/bearerbox.c:wdp_router)
2010-08-09 17:42:23 [17821] [0] INFO:
----------------------------------------
2010-08-09 17:42:23 [17821] [0] INFO: Kannel bearerbox II
version 1.4.3 starting
2010-08-09 17:42:23 [17821] [0] INFO: MAIN: Start-up done,
entering mainloop
2010-08-09 17:42:24 [17821] [5] INFO: Client connected from
<127.0.0.1>
2010-08-09 17:42:24 [17821] [5] DEBUG: Started thread 14
(gw/bb_boxc.c:function)
2010-08-09 17:42:24 [17821] [14] DEBUG: Thread 14
(gw/bb_boxc.c:function) maps to pid 17821.
2010-08-09 17:42:24 [17821] [15] DEBUG: Thread 15
(gw/bb_boxc.c:boxc_sender) maps to pid 17821.
2010-08-09 17:42:24 [17821] [14] DEBUG: Started thread 15
(gw/bb_boxc.c:boxc_sender)
2010-08-09 17:42:46 [17821] [14] DEBUG: boxc_receiver:
sms received
2010-08-09 17:42:46 [17821] [14] DEBUG: HTTP[LBSMS1]:
Start request
2010-08-09 17:42:46 [17821] [14] DEBUG: Started thread 16
(gwlib/fdset.c:poller)
2010-08-09 17:42:46 [17821] [14] DEBUG: Started thread 17
(gwlib/http.c:write_request_thread)
2010-08-09 17:42:46 [17821] [14] DEBUG: send_msg: sending
msg to
box: <127.0.0.1>
2010-08-09 17:42:46 [17821] [17] DEBUG: Thread 17
(gwlib/http.c:write_request_thread) maps to pid 17821.
2010-08-09 17:42:46 [17821] [17] DEBUG: Queue contains 0
pending
requests.
2010-08-09 17:42:46 [17821] [17] DEBUG: Parsing URL
`*MailScanner has detected a possible fraud attempt from
"*MailScanner warning: numerical links are often
malicious:* 2.2.2.2:9001 <http://2.2.2.2:9001>" claiming to be*
*MailScanner has detected a possible fraud attempt from
"2.2.2.2:9001" claiming to be*
http://2.2.2.2:9001?username=XXXXXX&password=XXXXXX&to=7706051489&text=TestMessage1&from=28874544&coding=0&charset=UTF-8&dlr-url=&dlr-mask=31
<http://2.2.2.2:9001?username=XXXXXX&password=XXXXXX&to=7706051489&text=TestMessage1&from=28874544&coding=0&charset=UTF-8&dlr-url=&dlr-mask=31>
<*MailScanner has detected a possible fraud attempt from
"2.2.2.2:9001" claiming to be*
http://2.2.2.2:9001?username=XXXXXX&password=XXXXXX&to=7706051489&text=TestMessage1&from=28874544&coding=0&charset=UTF-8&dlr-url=&dlr-mask=31
<http://2.2.2.2:9001?username=XXXXXX&password=XXXXXX&to=7706051489&text=TestMessage1&from=28874544&coding=0&charset=UTF-8&dlr-url=&dlr-mask=31>>':
2010-08-09 17:42:46 [17821] [17] DEBUG: Scheme: http://
2010-08-09 17:42:46 [17821] [17] DEBUG: Host: *MailScanner
warning: numerical links are often malicious:*
*MailScanner warning: numerical links are often malicious:*
2.2.2.2:9001 <http://2.2.2.2:9001>
<*MailScanner warning: numerical links are often
malicious:* http://2.2.2.2:9001>
2010-08-09 17:42:46 [17821] [17] DEBUG: Port: 9001
2010-08-09 17:42:46 [17821] [17] DEBUG: Username: (null)
2010-08-09 17:42:46 [17821] [17] DEBUG: Password: (null)
2010-08-09 17:42:46 [17821] [17] DEBUG: Path: /
2010-08-09 17:42:46 [17821] [17] DEBUG: Query:
username=XXXXXX&password=XXXXXX&to=7706051489&text=TestMessage1&from=28874544&coding=0&charset=UTF-8&dlr-url=&dlr-mask=31
2010-08-09 17:42:46 [17821] [17] DEBUG: Fragment: (null)
2010-08-09 17:42:46 [17821] [17] ERROR: Error while
gw_gethostbyname occurs.
2010-08-09 17:42:46 [17821] [17] ERROR: System error 3:
No such
process
2010-08-09 17:42:46 [17821] [17] ERROR: gethostbyname failed
2010-08-09 17:42:46 [17821] [17] ERROR: error connecting to
server `*MailScanner warning: numerical links are often
malicious:* *MailScanner warning: numerical links are
often malicious:* 2.2.2.2:9001 <http://2.2.2.2:9001>
<*MailScanner warning: numerical links are often malicious:*
http://2.2.2.2:9001>' at port `9001'
2010-08-09 17:42:46 [17821] [17] DEBUG: HTTP: Opening
connection
to `2.2.2.2:9001:9001' (fd=0).
2010-08-09 17:42:46 [17821] [17] ERROR: Couldn't send
request to
<*MailScanner has detected a possible fraud attempt from
"*MailScanner warning: numerical links are often
malicious:* 2.2.2.2:9001 <http://2.2.2.2:9001>" claiming to be*
*MailScanner has detected a possible fraud attempt from
"2.2.2.2:9001" claiming to be*
http://2.2.2.2:9001?username=XXXXXX&password=XXXXXX&to=7706051489&text=TestMessage1&from=28874544&coding=0&charset=UTF-8&dlr-url=&dlr-mask=31
<http://2.2.2.2:9001?username=XXXXXX&password=XXXXXX&to=7706051489&text=TestMessage1&from=28874544&coding=0&charset=UTF-8&dlr-url=&dlr-mask=31>
<*MailScanner has detected a possible fraud attempt from
"2.2.2.2:9001" claiming to be*
http://2.2.2.2:9001?username=XXXXXX&password=XXXXXX&to=7706051489&text=TestMessage1&from=28874544&coding=0&charset=UTF-8&dlr-url=&dlr-mask=31
<http://2.2.2.2:9001?username=XXXXXX&password=XXXXXX&to=7706051489&text=TestMessage1&from=28874544&coding=0&charset=UTF-8&dlr-url=&dlr-mask=31>>>
2010-08-09 17:42:46 [17821] [16] DEBUG: Thread 16
(gwlib/fdset.c:poller) maps to pid 17821.
2010-08-09 17:42:46 [17821] [7] ERROR: HTTP[LBSMS1]: Couldn't
connect to SMS center (retrying in 10 seconds).
SMSBox Log:
2010-08-09 17:42:24 [17840] [0] INFO: Added logfile
`/var/log/kannel/smsbox.log' with level `0'.
2010-08-09 17:42:24 [17840] [0] INFO: HTTP: Opening server at
port 13013.
2010-08-09 17:42:24 [17840] [0] DEBUG: Started thread 1
(gwlib/fdset.c:poller)
2010-08-09 17:42:24 [17840] [0] DEBUG: Started thread 2
(gwlib/http.c:server_thread)
2010-08-09 17:42:24 [17840] [0] INFO: Set up send sms
service at
port 13013
2010-08-09 17:42:24 [17840] [0] DEBUG: Started thread 3
(gw/smsbox.c:sendsms_thread)
2010-08-09 17:42:24 [17840] [0] DEBUG:
----------------------------------------------
2010-08-09 17:42:24 [17840] [0] DEBUG: Kannel smsbox version
1.4.3 starting
2010-08-09 17:42:24 [17840] [1] DEBUG: Thread 1
(gwlib/fdset.c:poller) maps to pid 17840.
2010-08-09 17:42:24 [17840] [2] DEBUG: Thread 2
(gwlib/http.c:server_thread) maps to pid 17840.
2010-08-09 17:42:24 [17840] [3] DEBUG: Thread 3
(gw/smsbox.c:sendsms_thread) maps to pid 17840.
2010-08-09 17:42:24 [17840] [0] DEBUG: dumping group
(sendsms-user):
2010-08-09 17:42:24 [17840] [0] DEBUG: <group> =
<sendsms-user>
2010-08-09 17:42:24 [17840] [0] DEBUG: <max-messages>
= <10>
2010-08-09 17:42:24 [17840] [0] DEBUG: <username> =
<xxxxx>
2010-08-09 17:42:24 [17840] [0] DEBUG:
<concatenation> = <true>
2010-08-09 17:42:24 [17840] [0] DEBUG: <password> = <xxx>
2010-08-09 17:42:24 [17840] [4] DEBUG: Thread 4
(gw/smsbox.c:obey_request_thread) maps to pid 17840.
2010-08-09 17:42:24 [17840] [0] DEBUG: Started thread 4
(gw/smsbox.c:obey_request_thread)
2010-08-09 17:42:24 [17840] [5] DEBUG: Thread 5
(gw/smsbox.c:url_result_thread) maps to pid 17840.
2010-08-09 17:42:24 [17840] [0] DEBUG: Started thread 5
(gw/smsbox.c:url_result_thread)
2010-08-09 17:42:24 [17840] [6] DEBUG: Thread 6
(gw/smsbox.c:http_queue_thread) maps to pid 17840.
2010-08-09 17:42:24 [17840] [0] DEBUG: Started thread 6
(gw/smsbox.c:http_queue_thread)
2010-08-09 17:42:24 [17840] [0] INFO: Connected to
bearerbox at
127.0.0.1 port 13001.
2010-08-09 17:42:24 [17840] [7] DEBUG: Thread 7
(gw/heartbeat.c:heartbeat_thread) maps to pid 17840.
2010-08-09 17:42:24 [17840] [0] DEBUG: Started thread 7
(gw/heartbeat.c:heartbeat_thread)
2010-08-09 17:42:46 [17840] [2] DEBUG: HTTP: Creating
HTTPClient
for `10.20.10.75'.
2010-08-09 17:42:46 [17840] [2] DEBUG: HTTP: Created
HTTPClient
area 0x8b0c118.
2010-08-09 17:42:46 [17840] [3] INFO: smsbox: Got HTTP
request
</cgi-bin/sendsms> from <10.20.10.75>
2010-08-09 17:42:46 [17840] [3] INFO: sendsms used by <xxxxx>
2010-08-09 17:42:46 [17840] [3] INFO: sendsms
sender:<xxxxx:28874544> (10.20.10.75) to:<7706051489>
msg:<TestMessage1>
2010-08-09 17:42:46 [17840] [3] DEBUG: Stored UUID
107619bd-3596-4c70-8053-5fe6ef92f66d
2010-08-09 17:42:46 [17840] [3] DEBUG: message length 12,
sending 1 messages
2010-08-09 17:42:46 [17840] [3] DEBUG: Status: 202
Answer: <Sent.>
2010-08-09 17:42:46 [17840] [3] DEBUG: Delayed reply -
wait for
bearerbox
2010-08-09 17:42:46 [17840] [0] DEBUG: Got ACK (0) of
107619bd-3596-4c70-8053-5fe6ef92f66d
2010-08-09 17:42:46 [17840] [0] DEBUG: HTTP: Resetting
HTTPClient for `10.20.10.75'.
2010-08-09 17:43:46 [17840] [1] DEBUG: Timeout for fd:23
appeares.
2010-08-09 17:43:46 [17840] [1] DEBUG: HTTP: Destroying
HTTPClient area 0x8b0c118.
2010-08-09 17:43:46 [17840] [1] DEBUG: HTTP: Destroying
HTTPClient for `10.20.10.75'.
--
Regards,
Abdul Basit | +92 32 1416 4196 | Aaqoo Technologies