connection to server not accepted (but no error) only after several hours

seb sebastien.thur at laposte.net
Wed Jan 17 03:08:52 EST 2007


Hi Dennis,

I am using indeed using python logging in the appel_log2 module.
But I wanted to keep it extremly simple while accepting connection from
different processes or thread.

Regarding my main problem, I did some more testing :

1) I have enabled one time server that can be run as a service (R C C
time server) and this service is responding correctly, when at the same
time (before I kill it ) the python time server is not responding.

2) I have also tried two python time server downloaded from effbot
site. Both are not responding after the "non response from the time
server I rn" even for the first interrogation once they are started.
(Of course I have killed my time server when I run a new one).
Same behaviour no response given but no error neither.

3)
If I try to start the R c c time server when the python time server is
running there is an error (from the rcc service)
The python time server program is really bound to port 37.

if we look at the previous tests :

4)
The same python program runned on port 38 aftter the blocking is
working properly from the start.

5)
There is no exception on the python time server whether it is
responding or not.

--------------------------
partial conclusion
-------------------------

It is only python programs that are listening from the port 37 that are
blocked at a certain time.
How is it possible (without firewall enabled) ?

Thanks .
Sebastien.


Dennis Lee Bieber a écrit :
> On 16 Jan 2007 07:39:35 -0800, "seb" <sebastien.thur at laposte.net>
> declaimed the following in comp.lang.python:
>
> >
> > Once it is blocked, I killes it, wait for about 15 minutes without
> > running the server and then started again but this gives me the same
> > behaviour (no response).
> >
> 	Can't help with the lock-up problem... but...
> >
> > import socket
> > import struct, time
> > import threading
> > import os
> > import appel_log2 as appel_log
> > import sys
> >
> >
> > class TimeServer(threading.Thread) :
> > 	def __init__(self):
> > 		nom_function_actuelle= str(sys._getframe().f_code.co_filename)
> > +"___"+str(sys._getframe().f_code.co_name)
> > 		try :
> > 			threading.Thread.__init__(self)
> > 			self.log_file="timeserverlog.txt"
> > 			self.PORT=37
> > 			self.TIME1970=2208988800L
> > 			self._continue=1
> > 			self.time_shift=0
> > 			message=nom_function_actuelle+"\t "+"STARTED OK "
> > 			appel_log.write_log("info",message)
>
> 	Have you considered using Python's logging module?
> > 	while 1==1 :
>
> 	Redundant test...
>
> 	In all historical versions of Python
>
> 	while 1:
>
> sufficed, and newer versions have
>
> 	while True:
> --
> 	Wulfraed	Dennis Lee Bieber		KD6MOG
> 	wlfraed at ix.netcom.com		wulfraed at bestiaria.com
> 		HTTP://wlfraed.home.netcom.com/
> 	(Bestiaria Support Staff:		web-asst at bestiaria.com)
> 		HTTP://www.bestiaria.com/




More information about the Python-list mailing list