Yes, please do. Everything else seems OK. BR, Nikos ----- Original Message ----- From: chini lion To: Nikos Balkanas Cc: [email protected] Sent: Friday, August 14, 2009 12:21 PM Subject: Re: No solution worked: Error while gw_gethostbyname occurs. please help
Hi Nikos, I have just installed gateway 1.4.3 And the problem still persists. telnet localhost 13001 localhost:~ # telnet localhost 13001 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Please find below my config file # # THIS IS A SAMPLE CONFIGURATION FOR SMS KANNEL # # This basic version is used for system testing. It expects 'fakesmsc' to # send messages which are replied with simple fixed text message. # It is run like this: # # 1% gw/bearerbox gw/smskannel.conf # 2% gw/smsbox gw/smskannel.conf # 3% test/fakesmsc -i 0.1 -m 100 "123 345 text nop" # # ..all 3 commands in separate shells (or screen sessions) # Note that you can run them in different machines but have to # add certain command line argument and configuration variables then # # # For any modifications to this file, see Kannel User Guide # If that does not help, see Kannel web page (http://www.kannel.org) and # various online help and mailing list archives # # Notes on those who base their configuration on this: # 1) check security issues! (allowed IPs, passwords and ports) # 2) groups cannot have empty rows inside them! # 3) read the user guide # # Kalle Marjola for Kannel project 2001, 2004 #--------------------------------------------- # CORE # # There is only one core group and it sets all basic settings # of the bearerbox (and system). You should take extra notes on # configuration variables like 'store-file' (or 'store-dir'), # 'admin-allow-ip' and 'access.log' group = core admin-port = 13000 smsbox-port = 13001 admin-password = bar #status-password = foo #admin-deny-ip = "" #admin-allow-ip = "" #log-file = "/tmp/kannel.log" #log-level = 0 box-deny-ip = "*.*.*.*" box-allow-ip = "127.0.0.1" #unified-prefix = "+358,00358,0;+,00" #access-log = "/tmp/access.log" #store-file = "kannel.store" #ssl-server-cert-file = "cert.pem" #ssl-server-key-file = "key.pem" #ssl-certkey-file = "mycertandprivkeyfile.pem" #--------------------------------------------- # SMSC CONNECTIONS # # SMSC connections are created in bearerbox and they handle SMSC specific # protocol and message relying. You need these to actually receive and send # messages to handset, but can use GSM modems as virtual SMSCs # This is a fake smsc connection, _only_ used to test the system and services. # It really cannot relay messages to actual handsets! group = smsc smsc = fake smsc-id = FAKE port = 10000 connect-allow-ip = 127.0.0.1 #--------------------------------------------- # SMSBOX SETUP # # Smsbox(es) do higher-level SMS handling after they have been received from # SMS centers by bearerbox, or before they are given to bearerbox for delivery group = smsbox bearerbox-host = localhost sendsms-port = 13013 global-sender = 13013 #sendsms-chars = "0123456789 +-" #log-file = "/tmp/smsbox.log" #log-level = 0 #access-log = "/tmp/access.log" #--------------------------------------------- # SEND-SMS USERS # # These users are used when Kannel smsbox sendsms interface is used to # send PUSH sms messages, i.e. calling URL like # http://kannel.machine:13013/cgi-bin/sendsms?username=tester&password=foobar... group = sendsms-user username = tester password = foobar #user-deny-ip = "" #user-allow-ip = "" #--------------------------------------------- # SERVICES # # These are 'responses' to sms PULL messages, i.e. messages arriving from # handsets. The response is based on message content. Only one sms-service is # applied, using the first one to match. group = sms-service keyword = nop text = "You asked nothing and I did it!" # There should be always a 'default' service. This service is used when no # other 'sms-service' is applied. group = sms-service keyword = default text = "No service specified" Here is my bearerbox Log: localhost:/usr/local/kannel # sbin/bearerbox -v 0 smskannel.conf & [1] 28182 localhost:/usr/local/kannel # 2009-08-14 10:13:49 [28182] [0] ERROR: Error while gw_gethostbyname occurs. 2009-08-14 10:13:49 [28182] [0] ERROR: Can't find out official hostname for this host, using `localhost' instead. 2009-08-14 10:13:49 [28182] [0] INFO: Debug_lvl = 0, log_file = <none>, log_lvl = 0 2009-08-14 10:13:49 [28182] [0] WARNING: DLR: using default 'internal' for storage type. 2009-08-14 10:13:49 [28182] [0] INFO: DLR using storage type: internal 2009-08-14 10:13:49 [28182] [0] DEBUG: Kannel bearerbox version `1.4.3'. Build `Aug 14 2009 09:52:56', compiler `3.3.3 (SuSE Linux)'. System Linux, release 2.6.5-7.201-bigsmp, version #1 SMP Sun Feb 5 16:58:22 CST 2006, machine i686. Hostname localhost, IP 127.0.0.1. Libxml version 2.6.30. Using OpenSSL 0.9.7d 17 Mar 2004. Using native malloc. 2009-08-14 10:13:49 [28182] [0] INFO: HTTP: Opening server at port 13000. 2009-08-14 10:13:49 [28182] [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller) 2009-08-14 10:13:49 [28182] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps to pid 28182. 2009-08-14 10:13:49 [28182] [0] DEBUG: Started thread 2 (gwlib/http.c:server_thread) 2009-08-14 10:13:49 [28182] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) maps to pid 28182. 2009-08-14 10:13:49 [28182] [0] DEBUG: Started thread 3 (gw/bb_http.c:httpadmin_run) 2009-08-14 10:13:49 [28182] [3] DEBUG: Thread 3 (gw/bb_http.c:httpadmin_run) maps to pid 28182. 2009-08-14 10:13:49 [28182] [0] DEBUG: starting smsbox connection module 2009-08-14 10:13:49 [28182] [0] INFO: BOXC: 'smsbox-max-pending' not set, using default (100). 2009-08-14 10:13:49 [28182] [0] DEBUG: Started thread 4 (gw/bb_boxc.c:sms_to_smsboxes) 2009-08-14 10:13:49 [28182] [4] DEBUG: Thread 4 (gw/bb_boxc.c:sms_to_smsboxes) maps to pid 28182. 2009-08-14 10:13:49 [28182] [0] DEBUG: Started thread 5 (gw/bb_boxc.c:smsboxc_run) 2009-08-14 10:13:49 [28182] [5] DEBUG: Thread 5 (gw/bb_boxc.c:smsboxc_run) maps to pid 28182. 2009-08-14 10:13:49 [28182] [0] INFO: Set SMS resend frequency to 60 seconds. 2009-08-14 10:13:49 [28182] [0] INFO: SMS resend retry set to unlimited. 2009-08-14 10:13:49 [28182] [0] DEBUG: smsbox MO concatenated message handling enabled 2009-08-14 10:13:49 [28182] [0] INFO: DLR rerouting for smsc id <FAKE> disabled. 2009-08-14 10:13:49 [28182] [0] DEBUG: Started thread 6 (gw/smsc/smsc_fake.c:fake_listener) 2009-08-14 10:13:49 [28182] [6] DEBUG: Thread 6 (gw/smsc/smsc_fake.c:fake_listener) maps to pid 28182. 2009-08-14 10:13:49 [28182] [0] DEBUG: Started thread 7 (gw/bb_smscconn.c:sms_router) 2009-08-14 10:13:49 [28182] [7] DEBUG: Thread 7 (gw/bb_smscconn.c:sms_router) maps to pid 28182. 2009-08-14 10:13:49 [28182] [0] INFO: ---------------------------------------- 2009-08-14 10:13:49 [28182] [0] INFO: Kannel bearerbox II version 1.4.3 starting 2009-08-14 10:13:49 [28182] [0] INFO: MAIN: Start-up done, entering mainloop 2009-08-14 10:13:49 [28182] [0] DEBUG: smsc_fake: start called 2009-08-14 10:15:44 [28182] [5] INFO: Client connected from <127.0.0.1> 2009-08-14 10:15:44 [28182] [5] DEBUG: Started thread 8 (gw/bb_boxc.c:function) 2009-08-14 10:15:44 [28182] [8] DEBUG: Thread 8 (gw/bb_boxc.c:function) maps to pid 28182. 2009-08-14 10:15:44 [28182] [8] DEBUG: Started thread 9 (gw/bb_boxc.c:boxc_sender) 2009-08-14 10:15:44 [28182] [9] DEBUG: Thread 9 (gw/bb_boxc.c:boxc_sender) maps to pid 28182. 2009-08-14 10:16:21 [28182] [8] WARNING: conn_read_withlen: got negative length, skipping 2009-08-14 10:16:21 [28182] [8] PANIC: gwlib/octstr.c:353: octstr_copy_real: Assertion `len >= 0' failed. 2009-08-14 10:16:21 [28182] [8] PANIC: sbin/bearerbox(gw_panic+0xa4) [0x80bdf54] 2009-08-14 10:16:21 [28182] [8] PANIC: sbin/bearerbox(octstr_copy_real+0x102) [0x80c2442] 2009-08-14 10:16:21 [28182] [8] PANIC: sbin/bearerbox [0x80aec71] 2009-08-14 10:16:21 [28182] [8] PANIC: sbin/bearerbox(conn_read_withlen+0x1b3) [0x80af483] 2009-08-14 10:16:21 [28182] [8] PANIC: sbin/bearerbox [0x8055fa2] 2009-08-14 10:16:21 [28182] [8] PANIC: sbin/bearerbox [0x805756e] 2009-08-14 10:16:21 [28182] [8] PANIC: sbin/bearerbox [0x80b5f80] 2009-08-14 10:16:21 [28182] [8] PANIC: /lib/tls/libpthread.so.0 [0x40102a13] 2009-08-14 10:16:21 [28182] [8] PANIC: /lib/tls/libc.so.6(__clone+0x5a) [0x403d79da] Here is my SMSbox Log: localhost:/usr/local/kannel # 2009-08-14 10:14:14 [28252] [0] ERROR: Error while gw_gethostbyname occurs. 2009-08-14 10:14:14 [28252] [0] ERROR: Can't find out official hostname for this host, using `localhost' instead. 2009-08-14 10:14:14 [28252] [0] INFO: Debug_lvl = 0, log_file = <none>, log_lvl = 0 2009-08-14 10:14:14 [28252] [0] DEBUG: Kannel smsbox version `1.4.3'. Build `Aug 14 2009 09:52:56', compiler `3.3.3 (SuSE Linux)'. System Linux, release 2.6.5-7.201-bigsmp, version #1 SMP Sun Feb 5 16:58:22 CST 2006, machine i686. Hostname localhost, IP 127.0.0.1. Libxml version 2.6.30. Using OpenSSL 0.9.7d 17 Mar 2004. Using native malloc. 2009-08-14 10:14:14 [28252] [0] INFO: Service global sender set as '13013' 2009-08-14 10:14:14 [28252] [0] INFO: HTTP: Opening server at port 13013. 2009-08-14 10:14:14 [28252] [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller) 2009-08-14 10:14:14 [28252] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps to pid 28252. 2009-08-14 10:14:14 [28252] [0] DEBUG: Started thread 2 (gwlib/http.c:server_thread) 2009-08-14 10:14:14 [28252] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) maps to pid 28252. 2009-08-14 10:14:14 [28252] [0] INFO: Set up send sms service at port 13013 2009-08-14 10:14:14 [28252] [0] DEBUG: Started thread 3 (gw/smsbox.c:sendsms_thread) 2009-08-14 10:14:14 [28252] [3] DEBUG: Thread 3 (gw/smsbox.c:sendsms_thread) maps to pid 28252. 2009-08-14 10:14:14 [28252] [0] DEBUG: ---------------------------------------------- 2009-08-14 10:14:14 [28252] [0] DEBUG: Kannel smsbox version 1.4.3 starting 2009-08-14 10:14:14 [28252] [0] DEBUG: dumping group (sendsms-user): 2009-08-14 10:14:14 [28252] [0] DEBUG: <group> = <sendsms-user> 2009-08-14 10:14:14 [28252] [0] DEBUG: <username> = <tester> 2009-08-14 10:14:14 [28252] [0] DEBUG: <password> = <foobar> 2009-08-14 10:14:14 [28252] [0] DEBUG: Started thread 4 (gw/smsbox.c:obey_request_thread) 2009-08-14 10:14:14 [28252] [4] DEBUG: Thread 4 (gw/smsbox.c:obey_request_thread) maps to pid 28252. 2009-08-14 10:14:14 [28252] [0] DEBUG: Started thread 5 (gw/smsbox.c:url_result_thread) 2009-08-14 10:14:14 [28252] [5] DEBUG: Thread 5 (gw/smsbox.c:url_result_thread) maps to pid 28252. 2009-08-14 10:14:14 [28252] [0] DEBUG: Started thread 6 (gw/smsbox.c:http_queue_thread) 2009-08-14 10:14:14 [28252] [6] DEBUG: Thread 6 (gw/smsbox.c:http_queue_thread) maps to pid 28252. 2009-08-14 10:14:14 [28252] [0] ERROR: Error while gw_gethostbyname occurs. 2009-08-14 10:14:14 [28252] [0] ERROR: gethostbyname failed 2009-08-14 10:14:14 [28252] [0] ERROR: error connecting to server `localhost' at port `13001' 2009-08-14 10:14:14 [28252] [0] PANIC: Couldn't connect to the bearerbox. 2009-08-14 10:14:14 [28252] [0] PANIC: sbin/smsbox(gw_panic+0xa4) [0x80828a4] 2009-08-14 10:14:14 [28252] [0] PANIC: sbin/smsbox(main+0xce0) [0x8053cd0] 2009-08-14 10:14:14 [28252] [0] PANIC: /lib/tls/libc.so.6(__libc_start_main+0xe0) [0x40335260] 2009-08-14 10:14:14 [28252] [0] PANIC: sbin/smsbox [0x8052991] Do i still go ahead to edit the gwlib/protected.c? ------------------------------------------------------------------------------ From: Nikos Balkanas <[email protected]> To: chini lion <[email protected]> Cc: [email protected] Sent: Wednesday, August 12, 2009 7:56:06 PM Subject: Re: No solution worked: Error while gw_gethostbyname occurs. please help Hi, You have the correct version for linux. Since ping localhost works, libc is fine. From smsbox server type (with bbox running): telnet localhost 13001 and post the response you get. Also post configuration file. There should be no problem with kannel and gethostbyname or libc. If others fail, do the following: Edit gwlib/protected.c Goto #if HAVE_FUNC_GETHOSTBYNAME_R_6 Comment out line: // error(herr, "Error while gw_gethostbyname occurs."); and add right below it: error(herr, "Error while gw_gethostbyname occurs. herr = %d, res = %d, tmphp = %p.", herr, res, tmphp); make, make install and post smsmbox logs with error to get more info about it. And since you are at it, why don't you download and install latest cvs? 1.4.1 is ~3 years old. BR, Nikos ----- Original Message ----- From: chini lion To: Nikos Balkanas Cc: [email protected] Sent: Wednesday, August 12, 2009 6:35 PM Subject: Re: No solution worked: Error while gw_gethostbyname occurs. please help Hi Nikos, I am using localhost for bearer box and it can be reached. gethostbyname entry in gw-config.h : /* Define for various gethostbyname_r functions */ #define HAVE_FUNC_GETHOSTBYNAME_R_6 1 /* #undef HAVE_FUNC_GETHOSTBYNAME_R_5 */ /* #undef HAVE_FUNC_GETHOSTBYNAME_R_3 */ I am using: ldconfig (GNU libc) 2.3.3 Copyright (C) 2004 Free Software Foundation, Inc. SUSE LINUX Enterprise Server 9 (i586) VERSION = 9 PATCHLEVEL = 2 kannel 1.4.1 Any ideas.? Lioness ---------------------------------------------------------------------------- From: Nikos Balkanas <[email protected]> To: [email protected] Cc: [email protected] Sent: Wednesday, August 12, 2009 3:18:34 PM Subject: Re: No solution worked: Error while gw_gethostbyname occurs. please help Hi, About that, what is your bearerbox-host entry in your smsbox configuration? Can you ping it from smsbox? If not, you should declare it in /etc/hosts. If yes, what is your OS, and what is your gethostbyname entry in gw-config.h? BR, Nikos ----- Original Message ----- From: "Henri Hovi" <[email protected]> To: "Users mailing list" <[email protected]> Sent: Wednesday, August 12, 2009 3:41 PM Subject: Re: No solution worked: Error while gw_gethostbyname occurs. please help > First thing popped up to my mind, do You use FQDN for bearerbox-host > and does that host resolve correctly ? > > > -- > Henri > > On Wed, Aug 12, 2009 at 3:25 PM, lionesschi<[email protected]> wrote: >> >> Please help, been having this issue for 2 weeks and cant move any further >> despite all searches and solutions. >> >> Please i need this for work and its been delayed for so long >> >> 2009-07-31 11:51:13 [11118] [0] INFO: HTTP: Opening server at port 13000. >> 2009-07-31 11:51:13 [11118] [0] DEBUG: Started thread 1 >> (gwlib/fdset.c:poller) >> 2009-07-31 11:51:13 [11118] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps >> to pid 11118. >> 2009-07-31 11:51:13 [11118] [0] DEBUG: Started thread 2 >> (gwlib/http.c:server_thread) >> 2009-07-31 11:51:13 [11118] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) >> maps to pid 11118. >> 2009-07-31 11:51:13 [11118] [0] DEBUG: Started thread 3 >> (gw/bb_http.c:httpadmin_run) >> 2009-07-31 11:51:13 [11118] [3] DEBUG: Thread 3 (gw/bb_http.c:httpadmin_run) >> maps to pid 11118. >> 2009-07-31 11:51:13 [11118] [0] DEBUG: starting smsbox connection module >> 2009-07-31 11:51:13 [11118] [0] INFO: BOXC: 'smsbox-max-pending' not set, >> using default (100). >> 2009-07-31 11:51:13 [11118] [0] DEBUG: Started thread 4 >> (gw/bb_boxc.c:sms_to_smsboxes) >> 2009-07-31 11:51:13 [11118] [4] DEBUG: Thread 4 >> (gw/bb_boxc.c:sms_to_smsboxes) maps to pid 11118. >> 2009-07-31 11:51:13 [11118] [0] DEBUG: Started thread 5 >> (gw/bb_boxc.c:smsboxc_run) >> 2009-07-31 11:51:13 [11118] [5] DEBUG: Thread 5 (gw/bb_boxc.c:smsboxc_run) >> maps to pid 11118. >> 2009-07-31 11:51:13 [11118] [0] INFO: Set SMS resend frequency to 60 >> seconds. >> 2009-07-31 11:51:13 [11118] [0] INFO: SMS resend retry set to unlimited. >> 2009-07-31 11:51:13 [11118] [0] INFO: DLR rerouting for smsc id <FAKE> >> disabled. >> 2009-07-31 11:51:13 [11118] [0] DEBUG: Started thread 6 >> (gw/smsc/smsc_fake.c:fake_listener) >> 2009-07-31 11:51:13 [11118] [6] DEBUG: Thread 6 >> (gw/smsc/smsc_fake.c:fake_listener) maps to pid 11118. >> 2009-07-31 11:51:13 [11118] [0] DEBUG: Started thread 7 >> (gw/bb_smscconn.c:sms_router) >> 2009-07-31 11:51:13 [11118] [7] DEBUG: Thread 7 >> (gw/bb_smscconn.c:sms_router) maps to pid 11118. >> 2009-07-31 11:51:13 [11118] [0] INFO: >> ---------------------------------------- >> 2009-07-31 11:51:13 [11118] [7] DEBUG: sms_router: time to sleep 30.00 secs. >> 2009-07-31 11:51:13 [11118] [0] INFO: Kannel bearerbox II version 1.4.1 >> starting >> 2009-07-31 11:51:13 [11118] [0] INFO: MAIN: Start-up done, entering mainloop >> 2009-07-31 11:51:13 [11118] [0] DEBUG: smsc_fake: start called >> 2009-07-31 11:51:13 [11118] [7] DEBUG: sms_router: gwlist_len = 0 >> >> >> >> >> 2009-07-31 11:52:05 [11279] [0] INFO: Service global sender set as '13013' >> 2009-07-31 11:52:05 [11279] [0] INFO: HTTP: Opening server at port 13013. >> 2009-07-31 11:52:05 [11279] [0] DEBUG: Started thread 1 >> (gwlib/fdset.c:poller) >> 2009-07-31 11:52:05 [11279] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps >> to pid 11279. >> 2009-07-31 11:52:05 [11279] [0] DEBUG: Started thread 2 >> (gwlib/http.c:server_thread) >> 2009-07-31 11:52:05 [11279] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) >> maps to pid 11279. >> 2009-07-31 11:52:05 [11279] [0] INFO: Set up send sms service at port 13013 >> 2009-07-31 11:52:05 [11279] [0] DEBUG: Started thread 3 >> (gw/smsbox.c:sendsms_thread) >> 2009-07-31 11:52:05 [11279] [3] DEBUG: Thread 3 (gw/smsbox.c:sendsms_thread) >> maps to pid 11279. >> 2009-07-31 11:52:05 [11279] [0] DEBUG: >> ---------------------------------------------- >> 2009-07-31 11:52:05 [11279] [0] DEBUG: Kannel smsbox version 1.4.1 starting >> 2009-07-31 11:52:05 [11279] [0] DEBUG: Started thread 4 >> (gw/smsbox.c:obey_request_thread) >> 2009-07-31 11:52:05 [11279] [4] DEBUG: Thread 4 >> (gw/smsbox.c:obey_request_thread) maps to pid 11279. >> 2009-07-31 11:52:05 [11279] [0] DEBUG: Started thread 5 >> (gw/smsbox.c:url_result_thread) >> 2009-07-31 11:52:05 [11279] [5] DEBUG: Thread 5 >> (gw/smsbox.c:url_result_thread) maps to pid 11279. >> 2009-07-31 11:52:05 [11279] [0] DEBUG: Started thread 6 >> (gw/smsbox.c:http_queue_thread) >> 2009-07-31 11:52:05 [11279] [6] DEBUG: Thread 6 >> (gw/smsbox.c:http_queue_thread) maps to pid 11279. >> 2009-07-31 11:52:05 [11279] [0] ERROR: Error while gw_gethostbyname occurs. >> 2009-07-31 11:52:05 [11279] [0] ERROR: gethostbyname failed >> 2009-07-31 11:52:05 [11279] [0] ERROR: error connecting to server >> `127.0.0.1' at port `13001' >> 2009-07-31 11:52:05 [11279] [0] PANIC: Couldn't connect to the bearerbox. >> 2009-07-31 11:52:05 [11279] [0] PANIC: sbin/smsbox(gw_panic+0xa5) >> [0x80811a5] >> 2009-07-31 11:52:05 [11279] [0] PANIC: sbin/smsbox(main+0xcb2) [0x8053742] >> 2009-07-31 11:52:05 [11279] [0] PANIC: >> /lib/tls/libc.so.6(__libc_start_main+0xe0) [0x40335260] >> 2009-07-31 11:52:05 [11279] [0] PANIC: sbin/smsbox [0x8052421] >> >> -- >> View this message in context: http://www.nabble.com/No-solution-worked%3A-Error-while-gw_gethostbyname-occurs.-please-help-tp24902902p24902902.html >> Sent from the Kannel - User mailing list archive at Nabble.com. >> >> >> > > > > -- Henri Hovi > http://www.patidure.com > >
