Re: Can't talk HTTP to cygwin build

"Ben Blaukopf" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <034b01c28af4$c4e54bd0$6500000a@BENVAIO>
----- Original Message -----
From: "Schaich, Peter" <[email protected]>
To: <[email protected]>
Sent: Wednesday, November 13, 2002 8:25 AM
Subject: RE: Can't talk HTTP to cygwin build

> Are you really sure you using the 1.2.1 version?
Yes.

> I have built and run the 1.2.1 version on Windows 2000
> without any problems and it works.
> But my log output looks totally different than yours,
> for example (anonymized):
I quoted some sections of strace output, not debug output.

However, here is my debug output, which I should have provided previously
(with debug level 0, not 1 as before). Interposed with yours, with my
commentary
in square brackets.

2002-11-13 09:01:19 [0] INFO: Debug_lvl = 0, log_file = <none>, log_lvl = 0
2002-11-13 09:01:19 [0] DEBUG: Kannel smsbox version `1.2.1'.
System CYGWIN_NT-5.0, release 1.3.13(0.62/3/2), version 2002-10-13 23:15,
machin
e i686.
Hostname xxx, IP xxx.
Libxml version 20423.
Using OpenSSL 0.9.6g 9 Aug 2002.
Using native malloc.

[ As you'll note, my version of cygwin is slightly different ]
> 2002-11-12 14:24:02 [0] INFO: Debug_lvl = 0, log_file = <none>, log_lvl =
0
> 2002-11-12 14:24:02 [0] DEBUG: Kannel smsbox version `1.2.1'.
> System CYGWIN_NT-5.0, release 1.3.12(0.54/3/2), version 2002-07-06 02:16,
> machin
> e i686.
> Hostname xxxxxxx, IP xx.xxx.xxx.xxx.
> Libxml version 20423.
> Using OpenSSL 0.9.6g 9 Aug 2002.
> Using native malloc.

2002-11-13 09:01:19 [0] INFO: Service global sender set as '13013'
2002-11-13 09:01:19 [0] DEBUG: HTTP: Opening server at port 13013.
2002-11-13 09:01:19 [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)
2002-11-13 09:01:19 [0] DEBUG: Started thread 2 (gwlib/http.c:server_thread)
2002-11-13 09:01:19 [0] INFO: Set up send sms service at port 13013
2002-11-13 09:01:19 [0] DEBUG: Started thread 3 (gw/smsbox.c:sendsms_thread)
2002-11-13 09:01:19 [0]
DEBUG: ----------------------------------------------
2002-11-13 09:01:19 [0] DEBUG: Kannel smsbox version 1.2.1 starting
2002-11-13 09:01:19 [0] DEBUG: Started thread 4
(gw/smsbox.c:obey_request_thread
)
2002-11-13 09:01:19 [0] DEBUG: Started thread 5
(gw/smsbox.c:url_result_thread)
2002-11-13 09:01:19 [0] DEBUG: Started thread 6
(gw/smsbox.c:http_queue_thread)
2002-11-13 09:01:19 [0] INFO: Connected to bearerbox at localhost port
13001.
2002-11-13 09:01:19 [0] DEBUG: Started thread 7
(gw/heartbeat.c:heartbeat_thread

[ These bits are obviously driven by differences in our conf file]
> 2002-11-12 14:24:02 [0] INFO: Starting to log to file smsbox.log level 0
> 2002-11-12 14:24:02 [0] INFO: Added logfile `smsbox.log' with level `0'.
> 2002-11-12 14:24:02 [0] INFO: Service global sender set as
'+49xxxxxxxxxxx'

> 2002-11-12 14:24:02 [0] DEBUG: HTTP: Opening server at port 13013.
> 2002-11-12 14:24:02 [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)
> 2002-11-12 14:24:02 [0] DEBUG: Started thread 2
(gwlib/http.c:server_thread)
> 2002-11-12 14:24:02 [0] INFO: Set up send sms service at port 13013
> 2002-11-12 14:24:02 [0] DEBUG: Started thread 3
(gw/smsbox.c:sendsms_thread)
> 2002-11-12 14:24:02 [0] DEBUG:
> ----------------------------------------------
> 2002-11-12 14:24:02 [0] DEBUG: Kannel smsbox version 1.2.1 starting
> 2002-11-12 14:24:02 [0] DEBUG: Started thread 4
> (gw/smsbox.c:obey_request_thread
> )
> 2002-11-12 14:24:02 [0] DEBUG: Started thread 5
> (gw/smsbox.c:url_result_thread)
> 2002-11-12 14:24:02 [0] DEBUG: Started thread 6
> (gw/smsbox.c:http_queue_thread)
> 2002-11-12 14:24:02 [0] INFO: Connected to bearerbox at localhost port
> 13001.
> 2002-11-12 14:24:02 [0] DEBUG: Started thread 7
> (gw/heartbeat.c:heartbeat_thread
> )

[ So effectively identical up to this point. Now I connect to port 13013 by
telnet, web browser,
anything. But I never get any more debug output lines ]

> 2002-11-12 14:49:42 [2] DEBUG: HTTP: Creating HTTPClient for `127.0.0.1'.
> 2002-11-12 14:49:43 [3] INFO: smsbox: Got HTTP request </cgi-bin/sendsms>
> from <
> 127.0.0.1>
> 2002-11-12 14:49:43 [3] INFO: sendsms used by <xxxxx>
> 2002-11-12 14:49:43 [3] INFO: sendsms sender:<xxx:+49xxxxxxxxxxxx>
> (127.0.0.1) to:
> <+49xxxxxxxxxxx> msg:<Hello>
> 2002-11-12 14:49:43 [3] DEBUG: message length 5, sending 1 messages
> 2002-11-12 14:49:44 [3] DEBUG: Status: 202 Answer: <Sent.>
> 2002-11-12 14:49:44 [3] DEBUG: HTTP: Resetting HTTPClient for `127.0.0.1'.
> 2002-11-12 14:49:44 [1] DEBUG: HTTP: Destroying HTTPClient area
0x100dba50.
> 2002-11-12 14:49:44 [1] DEBUG: HTTP: Destroying HTTPClient for
`127.0.0.1'.
>
> -----Original Message-----
> From: Ben Blaukopf [mailto:[email protected]]
> Sent: Dienstag, 12. November 2002 18:38
> To: [email protected]
> Subject: Can't talk HTTP to cygwin build
>
>
> Code is 1.2.1 and I built on cygwin running on windows 2000 (SP2). Not
> entirely sure
> how to get the version, but I downloaded and installed on 28/10/02. When I
> run
> bearerbox and smsbox with smskannel.conf I can't use the HTTP interface
for
> sending SMSes, because I get no output from it.
>
> Having built with a simple
> ./configure
> make
>
> I then took smskannel.conf and edited the section
>
> # SMSC CONNECTIONS
>
> group = smsc
> smsc = at
> modemtype = wavecom
> device = /dev/ttyS0
>
> This runs fine on linux.
>
> I then
> cd gw
> ./bearerbox -v 1 smskannel.conf
>
> This starts up fine, including configuring the modem
>
> Then (in a separate bash shell)
>
> ./smsbox - v 1 smskannel.conf
>
> Again, this works fine, and connects to the bearerbox.
>
> On my linux build I can now connect with a webbrowser to
> http://localhost:13013/
>
> and get an appropriate error message. However, if I connect
> to the windows build I get nothing at all.
>
> I tried using gdb on the smsbox but it crashed as soon as
> I tried to 'run'. However strace worked.
>
> strace shows that before I 'telnet localhost 13013' the smsbox
> is doing a select on the port with a timeout of 30 seconds.
> 1367 145735859 [unknown (0x5CC)] smsbox 832 select_stuff::cleanup: calling

> cle
> nup routines
>  3528 145739387 [unknown (0x5CC)] smsbox 832 select_stuff::~select_stuff:
> delet
> ng select records
>  3547 145742934 [unknown (0x5CC)] smsbox 832 time: 1037121707 = time (0)
>  1589 145744523 [unknown (0x5CC)] smsbox 832 cygwin_select: 20,
0x227BF2C4,
> 0x2
> 7BF2B4, 0x227BF2A4, 0x227BF314
>  3637 145748160 [unknown (0x5CC)] smsbox 832 dtable::select_read:
/dev/piper
> fd
> 19
>  3394 145751554 [unknown (0x5CC)] smsbox 832 cygwin_select: to->tv_sec 30,
> to->
> v_usec 0, ms 30000
>  3267 145754821 [unknown (0x5CC)] smsbox 832 cygwin_select:
sel.always_ready
> 0
>  2218 145757039 [unknown (0x5CC)] smsbox 832 select_stuff::wait: m 2, ms
> 30000
>
> Immediately after the telnet command is made, the strace output
> then shows the smsbox doing lots of select calls. These continue even
after
> I have closed the telnet connection - having left the strace session going
> for
> several minutes it doesn't appear to be an issue of taking a long time
> to display that amount of text on screen. I'll follow up if it does stop -
> I'll
> leave it overnight.  So what's going on? Why doesn't it just accept the
> connection,
> and handle my GET request? Any ideas gratefully received!
>
>  2204 461753655 [unknown (0xD4)] smsbox 832 socket_cleanup: si 0x100D4B78
> si->th
> read 0x610C67DC
>  3528 461757183 [unknown (0xD4)] smsbox 832 socket_cleanup: connection to
> si->ex
> itsock 0x334
>  4904 461762087 [unknown (0xD4)] smsbox 832 socket_cleanup: returning
>  1882 461763969 [unknown (0xD4)] smsbox 832 peek_socket: considering
handle
> 0x22
> 8
>  3517 461767486 [unknown (0xD4)] smsbox 832 set_bits: me 0x100D4B18,
testing
> fd
> 5 (/dev/tcp)
>  3577 461771063 [unknown (0xD4)] smsbox 832 set_bits: ready 1
>  1793 461772856 [unknown (0xD4)] smsbox 832 select_stuff::poll: returning
1
>  1589 461774445 [unknown (0xD4)] smsbox 832 select_stuff::cleanup: calling
> clean
> up routines
>  3788 461778233 [unknown (0xD4)] smsbox 832 select_stuff::~select_stuff:
> deletin
> g select records
>  3753 461781986 [unknown (0xD4)] smsbox 832 wsock_event::prepare:
568061968
> = ws
> ock_event::prepare ()
>  3416 461785402 [unknown (0xD4)] smsbox 832 __set_winsock_errno:
> recvfrom:715 -
> winsock error 10057 -> errno 128
>  3942 461789344 [unknown (0xD4)] smsbox 832 cygwin_select: 9, 0x21DBF084,
> 0x21DB
> F074, 0x21DBF064, 0x0
>  3652 461792996 [unknown (0xD4)] smsbox 832 dtable::select_read: /dev/tcp
fd
> 5
>  1849 461794845 [unknown (0xD4)] smsbox 832 dtable::select_read:
/dev/piper
> fd 8
>
>  3887 461798732 [unknown (0xD4)] smsbox 832 cygwin_select: to NULL, ms
> FFFFFFFF
>  1804 461800536 [unknown (0xD4)] smsbox 832 cygwin_select:
sel.always_ready
> 0
>  2088 461802624 [unknown (0xD4)] smsbox 832 start_thread_socket: Handle
> 0x228
>  1891 461804515 [unknown (0xD4)] smsbox 832 start_thread_socket: Added to
> readfd
> s
>  3844 461808359 [unknown (0xD4)] smsbox 832 start_thread_socket: exitsock
> 0x334
>  1798 461810157 [unknown (0xD4)] smsbox 832 start_thread_socket:
stuff_start
> 0x2
> 1DBEF80
>  3767 461813924 [unknown (0xD4)] smsbox 832 select_stuff::wait: m 3, ms
> 42949672
> 95
>  3885 461817809 [select_socket] smsbox 832 thread_socket: stuff_start
> 0x100D7B9C
>
>  3268 461821077 [select_socket] smsbox 832 thread_socket: Win32 select
> returned
> 1
>  3448 461824525 [select_socket] smsbox 832 thread_socket: s 0x100D4B18,
> testing
> fd 5 (/dev/tcp)
>  3511 461828036 [select_socket] smsbox 832 thread_socket: read_ready
>  1961 461829997 [unknown (0xD4)] smsbox 832 select_stuff::wait: woke up.
> wait_r
> et 2.  verifying
>  3209 461833206 [unknown (0xD4)] smsbox 832 select_stuff::wait: gotone 1
>  1939 461835145 [unknown (0xD4)] smsbox 832 select_stuff::wait: returning
0
>  1748 461836893 [unknown (0xD4)] smsbox 832 select_stuff::cleanup: calling
> clean
> up routines
>  3806 461840699 [select_pipe] smsbox 832 thread_pipe: stopping
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.