Article delegate-en/3957 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Socket inheritance problem on Windows (Re: news proxy under windows)
22 Apr 2008 01:25:04 GMT (Yutaka Sato)
The DeleGate Project


On 04/07/08(19:13) you "damir" <> wrote
in <_A3952@delegate-en.ML_>
 |> In message <_A3926@delegate-en.ML_> on 02/12/08(22:27:10)
 |> you "damir" <> wrote:
 |>  |Hm now I realy have troubles starting delegate under windows.
 |> ...
 |>  |Everything looks normal , cashe and other subdirectories is created,
 |service is also started , but it is not working.
 |>  |I use Windows 2000 with latest updates (same under windows XP) , and
 |nod32 antivirus (which I also try to disable - and still not working).
 |>  |I was connected to internet trought Mikrotik router ...
 |>  |In the same time I was connect and read directly with outlook expres
 |every mounted news server except
 |>  |Cashe dir is empty (also not created subdirectories) ... errors.log is
 |also empty only in file 119 i see some errors an here is copy paste:
 |> ...
 |>  |02/11 20:14:44.38 [756] 0+0: --INITIALIZATION DONE-08021120+0100: 9.8.1
 |on WindowsNT--
 |>  |(WIN) 14:48.093 [ 740] connectsocket(-1) bad port number
 |>  |(WIN) 14:48.093 [ 740] CANNOT CONNECT TO PARENT
 |>  |(WIN) 14:48.093 [ 756] spawn(D:\news\\dg9_8_1.exe) = 652,
 |no response from child, -1,1/-1
 |>  |(WIN) 14:48.093 [ 756] ERROR closesocketX(2161,-1) = -1
 |>  |02/11 20:14:48.09 [756] 1+0: #{TR}# ? cannot fork Onetime (2)
 |>  |02/11 20:14:48.09 [756] 1+0: CANNOT FORK Onetime (2)
 |> ...
 |>  |This is realy strange for me because before few months some older versio
 |of delegate is working ... now I have fresh instalation with all windows
 |updates and now is not working.
 |> In the single process mode, I know the current implementation of NNTP
 |> of DeleGate is not multi-thread safe, but at least it will work for
 |> a single session (single user) at a time:)
 |> Also the CRON parameter (to cause a process spawining) might cause in the
 |> mode and should be fixed.
 |Ok I was try like you say , so I make bat script like this:
 |dg9_8_2-pre19.exe -P119 -d1+7 SERVER=nntp EXPIRE=10d CRON="0 * * * * -expire
 |10d" MOUNT="= nntp://" MOUNT="=
 |nntp://user:pass@motzarella../" MOUNT="= nntp://"
 |CACHE=do DGROOT="D:\news\" ADMIN=""
 |Now in the begining everythig work but only for short time ...
 |subdirectories are created some massages are cashed ... but not for long ...
 |just few days ...
 |Now I have on my e-mail this massage:
 |Some help ? or just wait another release ?

Current implementation of "-d1" option (parallel sessions in a single
process) is not complete and is not recommended to be used with complex
configuration as your case.  Here are some way that might be helpful
to solve your problem.

A) with "-d1":

 0) without CRON
    don't use CRON (if necessary, use it with another DeleGate just for CRON)

B) without "-d1":

 1) with "-dW"
    the error message "connectsocket(-1)" implies that a socket-pair to be
    uses for the communication between the parent process and child process
    is not inherited to the child.  the problem can be escaped with the "-dW"

 the following options are available in DeleGate/9.8.2-pre26 and after:

 2) with "-Eis"
    this option explicitly turns on the inheritance of handles of sockets
    (by DuplicateHandle()) and might be effective in some cases

 3) with "-Eid"
    this option forces passing socket handle not by inheritance but by
    copying with WSADuplicateSocket() and WSASocket()

 4) with "-n8" (together with "-Dis")
    this option "-nN" means serving with a fixed number processes (N).
    With this option DeleGate does not need inheritance or duplication of
    socket handle between processes thus it should work in any environment,
    but it might fail accepting connections under non-light load situation.

9.8.2-pre26 is the latest version at this time.

 |> The executable files of 9.8.2 are available at:

  9 9   Yutaka Sato <>
 ( ~ )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]