RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-06-24 Thread GOMEZ Henri

I allways use read/write on Unix instead of recv/send.
It works way better.

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Sunday, June 23, 2002 8:56 AM
>To: [EMAIL PROTECTED]
>Subject: cvs commit: jakarta-tomcat-connectors/jk/native2/common
>jk_channel_socket.c
>
>
>mturk   2002/06/22 23:55:56
>
>  Modified:jk/native2/common jk_channel_socket.c
>  Log:
>  Costin changed it to use read/write instead of send/receive.
>  Unfortunaly that doesn't work on WIN32 cause read/write 
>cannot operate on sockets.
>  Perhaps we shoud reverse that unless there is a strong 
>reason to use the
>  read/write on unix.
>  
>  Revision  ChangesPath
>  1.35  +20 -2 
>jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
>  
>  Index: jk_channel_socket.c
>  ===
>  RCS file: 
>/home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channe
>l_socket.c,v
>  retrieving revision 1.34
>  retrieving revision 1.35
>  diff -u -r1.34 -r1.35
>  --- jk_channel_socket.c  20 Jun 2002 18:45:01 -  1.34
>  +++ jk_channel_socket.c  23 Jun 2002 06:55:55 -  1.35
>  @@ -355,9 +355,13 @@
>   len=msg->len;
>   b=msg->buf;
>   
>  -
>  +
>   while(sent < len) {
>  +#ifdef WIN32
>  +int this_time = send(sd, (char *)b + sent , len - sent, 0);
>  +#else
>   int this_time = write(sd, (char *)b + sent , len - sent);
>  +#endif
>   if(0 == this_time) {
>   return -2;
>   }
>  @@ -393,9 +397,16 @@
>   if( sd<0 ) return JK_ERR;
>   
>   while(rdlen < len) {
>  +#ifdef WIN32
>  +/* WIN32 read cannot operate on sockets */
>  +int this_time = recv(sd, 
>  + (char *)b + rdlen, 
>  + len - rdlen, 0);   
>  +#else
>   int this_time = read(sd, 
>(char *)b + rdlen, 
>len - rdlen);  
>  +#endif
>   if(-1 == this_time) {
>   #ifdef WIN32
>   if(SOCKET_ERROR == this_time) { 
>  @@ -430,9 +441,16 @@
>   if( sd<0 ) return JK_ERR;
>   
>   while(rdlen < minLen ) {
>  +#ifdef WIN32
>  +/* WIN32 read cannot operate on sockets */
>  +int this_time = recv(sd, 
>  + (char *)b + rdlen, 
>  + maxLen - rdlen, 0);
>  +#else
>   int this_time = read(sd, 
>(char *)b + rdlen, 
>  - maxLen - rdlen);
>  + maxLen - rdlen);   
>  +#endif
>   /* fprintf(stderr, "XXX received %d\n", this_time ); */
>   if(-1 == this_time) {
>   #ifdef WIN32
>  
>  
>  
>
>--
>To unsubscribe, e-mail:   

For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-06-24 Thread andre . powroznik

You may use #idef WIN32 in order to choose one or the other solution.

-Original Message-
From: GOMEZ Henri [mailto:[EMAIL PROTECTED]]
Sent: 24 June 2002 10:18
To: Tomcat Developers List
Subject: RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common
jk_channel_socket.c


I allways use read/write on Unix instead of recv/send.
It works way better.

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Sunday, June 23, 2002 8:56 AM
>To: [EMAIL PROTECTED]
>Subject: cvs commit: jakarta-tomcat-connectors/jk/native2/common
>jk_channel_socket.c
>
>
>mturk   2002/06/22 23:55:56
>
>  Modified:jk/native2/common jk_channel_socket.c
>  Log:
>  Costin changed it to use read/write instead of send/receive.
>  Unfortunaly that doesn't work on WIN32 cause read/write 
>cannot operate on sockets.
>  Perhaps we shoud reverse that unless there is a strong 
>reason to use the
>  read/write on unix.
>  
>  Revision  ChangesPath
>  1.35  +20 -2 
>jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
>  
>  Index: jk_channel_socket.c
>  ===
>  RCS file: 
>/home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channe
>l_socket.c,v
>  retrieving revision 1.34
>  retrieving revision 1.35
>  diff -u -r1.34 -r1.35
>  --- jk_channel_socket.c  20 Jun 2002 18:45:01 -  1.34
>  +++ jk_channel_socket.c  23 Jun 2002 06:55:55 -  1.35
>  @@ -355,9 +355,13 @@
>   len=msg->len;
>   b=msg->buf;
>   
>  -
>  +
>   while(sent < len) {
>  +#ifdef WIN32
>  +int this_time = send(sd, (char *)b + sent , len - sent, 0);
>  +#else
>   int this_time = write(sd, (char *)b + sent , len - sent);
>  +#endif
>   if(0 == this_time) {
>   return -2;
>   }
>  @@ -393,9 +397,16 @@
>   if( sd<0 ) return JK_ERR;
>   
>   while(rdlen < len) {
>  +#ifdef WIN32
>  +/* WIN32 read cannot operate on sockets */
>  +int this_time = recv(sd, 
>  + (char *)b + rdlen, 
>  + len - rdlen, 0);   
>  +#else
>   int this_time = read(sd, 
>(char *)b + rdlen, 
>len - rdlen);  
>  +#endif
>   if(-1 == this_time) {
>   #ifdef WIN32
>   if(SOCKET_ERROR == this_time) { 
>  @@ -430,9 +441,16 @@
>   if( sd<0 ) return JK_ERR;
>   
>   while(rdlen < minLen ) {
>  +#ifdef WIN32
>  +/* WIN32 read cannot operate on sockets */
>  +int this_time = recv(sd, 
>  + (char *)b + rdlen, 
>  + maxLen - rdlen, 0);
>  +#else
>   int this_time = read(sd, 
>(char *)b + rdlen, 
>  - maxLen - rdlen);
>  + maxLen - rdlen);   
>  +#endif
>   /* fprintf(stderr, "XXX received %d\n", this_time ); */
>   if(-1 == this_time) {
>   #ifdef WIN32
>  
>  
>  
>
>--
>To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

 DISCLAIMER  
"This e-mail and any attachments thereto may contain information 
which is confidential and/or protected by intellectual property 
rights and are intended for the sole use of the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, 
total or partial reproduction, communication or distribution in any form) 
by persons other than the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either 
by telephone or by e-mail and delete the material from any computer. 
Thank you for your cooperation."


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-06-24 Thread GOMEZ Henri

That's what Mladen commited ;)

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Monday, June 24, 2002 10:30 AM
>To: [EMAIL PROTECTED]
>Subject: RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common
>jk_channel_socket.c
>
>
>You may use #idef WIN32 in order to choose one or the other solution.
>
>-Original Message-
>From: GOMEZ Henri [mailto:[EMAIL PROTECTED]]
>Sent: 24 June 2002 10:18
>To: Tomcat Developers List
>Subject: RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common
>jk_channel_socket.c
>
>
>I allways use read/write on Unix instead of recv/send.
>It works way better.
>
>-
>Henri Gomez ___[_]
>EMAIL : [EMAIL PROTECTED](. .) 
>PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
>PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 
>
>
>
>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>>Sent: Sunday, June 23, 2002 8:56 AM
>>To: [EMAIL PROTECTED]
>>Subject: cvs commit: jakarta-tomcat-connectors/jk/native2/common
>>jk_channel_socket.c
>>
>>
>>mturk   2002/06/22 23:55:56
>>
>>  Modified:jk/native2/common jk_channel_socket.c
>>  Log:
>>  Costin changed it to use read/write instead of send/receive.
>>  Unfortunaly that doesn't work on WIN32 cause read/write 
>>cannot operate on sockets.
>>  Perhaps we shoud reverse that unless there is a strong 
>>reason to use the
>>  read/write on unix.
>>  
>>  Revision  ChangesPath
>>  1.35  +20 -2 
>>jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
>>  
>>  Index: jk_channel_socket.c
>>  ===
>>  RCS file: 
>>/home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channe
>>l_socket.c,v
>>  retrieving revision 1.34
>>  retrieving revision 1.35
>>  diff -u -r1.34 -r1.35
>>  --- jk_channel_socket.c 20 Jun 2002 18:45:01 -  1.34
>>  +++ jk_channel_socket.c 23 Jun 2002 06:55:55 -  1.35
>>  @@ -355,9 +355,13 @@
>>   len=msg->len;
>>   b=msg->buf;
>>   
>>  -
>>  +
>>   while(sent < len) {
>>  +#ifdef WIN32
>>  +int this_time = send(sd, (char *)b + sent , len - sent, 0);
>>  +#else
>>   int this_time = write(sd, (char *)b + sent , len - sent);
>>  +#endif
>>  if(0 == this_time) {
>>  return -2;
>>  }
>>  @@ -393,9 +397,16 @@
>>   if( sd<0 ) return JK_ERR;
>>   
>>   while(rdlen < len) {
>>  +#ifdef WIN32
>>  +   /* WIN32 read cannot operate on sockets */
>>  +   int this_time = recv(sd, 
>>  +(char *)b + rdlen, 
>>  +len - rdlen, 0);   
>>  +#else
>>  int this_time = read(sd, 
>>   (char *)b + rdlen, 
>>   len - rdlen);  
>>  +#endif
>>  if(-1 == this_time) {
>>   #ifdef WIN32
>>  if(SOCKET_ERROR == this_time) { 
>>  @@ -430,9 +441,16 @@
>>   if( sd<0 ) return JK_ERR;
>>   
>>   while(rdlen < minLen ) {
>>  +#ifdef WIN32
>>  +   /* WIN32 read cannot operate on sockets */
>>  +   int this_time = recv(sd, 
>>  +(char *)b + rdlen, 
>>  +maxLen - rdlen, 0);
>>  +#else
>>  int this_time = read(sd, 
>>   (char *)b + rdlen, 
>>  -maxLen - rdlen);
>>  +maxLen - rdlen);   
>>  +#endif
>>   /* fprintf(stderr, "XXX received %d\n", this_time ); */
>>  if(-1 == this_time) {
>>   #ifdef WIN32
>>  
>>  
>>  
>>
>>--
>>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

 DISCLAIMER  
"This e-mail and any attachments thereto may contain information 
which is confidential and/or protected by intellectual property 
rights and are intended for the sole use of the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, 
total or partial reproduction, communication or distribution in any form) 
by persons other than the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either 
by telephone or by e-mail and delete the material from any computer. 
Thank you for your cooperation."


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-06-24 Thread andre . powroznik

Sorry, im dumb ;-)

-Original Message-
From: GOMEZ Henri [mailto:[EMAIL PROTECTED]]
Sent: 24 June 2002 11:10
To: Tomcat Developers List
Subject: RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common
jk_channel_socket.c


That's what Mladen commited ;)

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Monday, June 24, 2002 10:30 AM
>To: [EMAIL PROTECTED]
>Subject: RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common
>jk_channel_socket.c
>
>
>You may use #idef WIN32 in order to choose one or the other solution.
>
>-Original Message-
>From: GOMEZ Henri [mailto:[EMAIL PROTECTED]]
>Sent: 24 June 2002 10:18
>To: Tomcat Developers List
>Subject: RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common
>jk_channel_socket.c
>
>
>I allways use read/write on Unix instead of recv/send.
>It works way better.
>
>-
>Henri Gomez ___[_]
>EMAIL : [EMAIL PROTECTED](. .) 
>PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
>PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 
>
>
>
>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>>Sent: Sunday, June 23, 2002 8:56 AM
>>To: [EMAIL PROTECTED]
>>Subject: cvs commit: jakarta-tomcat-connectors/jk/native2/common
>>jk_channel_socket.c
>>
>>
>>mturk   2002/06/22 23:55:56
>>
>>  Modified:jk/native2/common jk_channel_socket.c
>>  Log:
>>  Costin changed it to use read/write instead of send/receive.
>>  Unfortunaly that doesn't work on WIN32 cause read/write 
>>cannot operate on sockets.
>>  Perhaps we shoud reverse that unless there is a strong 
>>reason to use the
>>  read/write on unix.
>>  
>>  Revision  ChangesPath
>>  1.35  +20 -2 
>>jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
>>  
>>  Index: jk_channel_socket.c
>>  ===
>>  RCS file: 
>>/home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channe
>>l_socket.c,v
>>  retrieving revision 1.34
>>  retrieving revision 1.35
>>  diff -u -r1.34 -r1.35
>>  --- jk_channel_socket.c 20 Jun 2002 18:45:01 -  1.34
>>  +++ jk_channel_socket.c 23 Jun 2002 06:55:55 -  1.35
>>  @@ -355,9 +355,13 @@
>>   len=msg->len;
>>   b=msg->buf;
>>   
>>  -
>>  +
>>   while(sent < len) {
>>  +#ifdef WIN32
>>  +int this_time = send(sd, (char *)b + sent , len - sent, 0);
>>  +#else
>>   int this_time = write(sd, (char *)b + sent , len - sent);
>>  +#endif
>>  if(0 == this_time) {
>>  return -2;
>>  }
>>  @@ -393,9 +397,16 @@
>>   if( sd<0 ) return JK_ERR;
>>   
>>   while(rdlen < len) {
>>  +#ifdef WIN32
>>  +   /* WIN32 read cannot operate on sockets */
>>  +   int this_time = recv(sd, 
>>  +(char *)b + rdlen, 
>>  +len - rdlen, 0);   
>>  +#else
>>  int this_time = read(sd, 
>>   (char *)b + rdlen, 
>>   len - rdlen);  
>>  +#endif
>>  if(-1 == this_time) {
>>   #ifdef WIN32
>>  if(SOCKET_ERROR == this_time) { 
>>  @@ -430,9 +441,16 @@
>>   if( sd<0 ) return JK_ERR;
>>   
>>   while(rdlen < minLen ) {
>>  +#ifdef WIN32
>>  +   /* WIN32 read cannot operate on sockets */
>>  +   int this_time = recv(sd, 
>>  +(char *)b + rdlen, 
>>  +maxLen - rdlen, 0);
>>  +#else
>>  int this_time = read(sd, 
>>   (char *)b + rdlen, 
>>  -maxLen - rdlen);
>>  +maxLen - rdlen);   
>>  +#endif
>>   /* fprintf(stderr, "XXX received %d\n", this_time ); */
>>  if(-1 == this_time) {
>>   #ifdef WIN32
>>  
>>  
>>  
>>
>>--
>>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

 DISCLAIMER  
"This e-mai

Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-06-25 Thread jean-frederic clere

GOMEZ Henri wrote:
> I allways use read/write on Unix instead of recv/send.
> It works way better.

Why better?
recv/send on BS2000 goes directly to the network through the socket libraries 
and read/write does with an additional POSIX layer.


> 
> -
> Henri Gomez ___[_]
> EMAIL : [EMAIL PROTECTED](. .) 
> PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
> PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 
> 
> 
> 
> 
>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>>Sent: Sunday, June 23, 2002 8:56 AM
>>To: [EMAIL PROTECTED]
>>Subject: cvs commit: jakarta-tomcat-connectors/jk/native2/common
>>jk_channel_socket.c
>>
>>
>>mturk   2002/06/22 23:55:56
>>
>> Modified:jk/native2/common jk_channel_socket.c
>> Log:
>> Costin changed it to use read/write instead of send/receive.
>> Unfortunaly that doesn't work on WIN32 cause read/write 
>>cannot operate on sockets.
>> Perhaps we shoud reverse that unless there is a strong 
>>reason to use the
>> read/write on unix.
>> 
>> Revision  ChangesPath
>> 1.35  +20 -2 
>>jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
>> 
>> Index: jk_channel_socket.c
>> ===
>> RCS file: 
>>/home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channe
>>l_socket.c,v
>> retrieving revision 1.34
>> retrieving revision 1.35
>> diff -u -r1.34 -r1.35
>> --- jk_channel_socket.c  20 Jun 2002 18:45:01 -  1.34
>> +++ jk_channel_socket.c  23 Jun 2002 06:55:55 -  1.35
>> @@ -355,9 +355,13 @@
>>  len=msg->len;
>>  b=msg->buf;
>>  
>> -
>> +
>>  while(sent < len) {
>> +#ifdef WIN32
>> +int this_time = send(sd, (char *)b + sent , len - sent, 0);
>> +#else
>>  int this_time = write(sd, (char *)b + sent , len - sent);
>> +#endif
>>  if(0 == this_time) {
>>  return -2;
>>  }
>> @@ -393,9 +397,16 @@
>>  if( sd<0 ) return JK_ERR;
>>  
>>  while(rdlen < len) {
>> +#ifdef WIN32
>> +/* WIN32 read cannot operate on sockets */
>> +int this_time = recv(sd, 
>> + (char *)b + rdlen, 
>> + len - rdlen, 0);   
>> +#else
>>  int this_time = read(sd, 
>>   (char *)b + rdlen, 
>>   len - rdlen);  
>> +#endif
>>  if(-1 == this_time) {
>>  #ifdef WIN32
>>  if(SOCKET_ERROR == this_time) { 
>> @@ -430,9 +441,16 @@
>>  if( sd<0 ) return JK_ERR;
>>  
>>  while(rdlen < minLen ) {
>> +#ifdef WIN32
>> +/* WIN32 read cannot operate on sockets */
>> +int this_time = recv(sd, 
>> + (char *)b + rdlen, 
>> + maxLen - rdlen, 0);
>> +#else
>>  int this_time = read(sd, 
>>   (char *)b + rdlen, 
>> - maxLen - rdlen);
>> + maxLen - rdlen);   
>> +#endif
>>  /* fprintf(stderr, "XXX received %d\n", this_time ); */
>>  if(-1 == this_time) {
>>  #ifdef WIN32
>> 
>> 
>> 
>>
>>--
>>To unsubscribe, e-mail:   
> 
> 
> For additional commands, e-mail: 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-06-25 Thread GOMEZ Henri

>GOMEZ Henri wrote:
>> I allways use read/write on Unix instead of recv/send.
>> It works way better.
>
>Why better?
>recv/send on BS2000 goes directly to the network through the 
>socket libraries 
>and read/write does with an additional POSIX layer.

Hi JF,

History, history ;)

I switched from recv/send to read/write many years ago
when I got strange behaviour on Sun 0S 4.1 ;)

BTW, a socket is an I/O descriptor, so it's still
valid to use it with read/write

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-09-28 Thread Ignacio J. Ortega

The comment is wrong, the problem is with the loadbalancer logic, if one
of the configured instances got lost, connect returns WSAECONNREFUSED,
with Malden's patch, the thread gots stuck in a loop trying to connectto
a non existing tc instance.. 

Incidentally i have this config to test tc4 in port 8019 and tc33 in
8009, i normally dont have the 2 versions working at the same time, so i
continually get WSAECONNREFUSED.. hence the problem.. 

Saludos ,
Ignacio J. Ortega


> -Mensaje original-
> De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Enviado el: 28 de septiembre de 2002 22:06
> Para: [EMAIL PROTECTED]
> Asunto: cvs commit: jakarta-tomcat-connectors/jk/native2/common
> jk_channel_socket.c
> 
> 
> nacho   2002/09/28 13:06:19
> 
>   Modified:jk/native2/common jk_channel_socket.c
>   Log:
>   Reverted a prior fix, it seems that hangs w2k IIS, it's 
> starts to stuck threads in this loop until exhausted or max 
> connections reached..
>   
>   Revision  ChangesPath
>   1.41  +3 -4  
> jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
>   
>   Index: jk_channel_socket.c
>   ===
>   RCS file: 
> /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_chann
> el_socket.c,v
>   retrieving revision 1.40
>   retrieving revision 1.41
>   diff -u -r1.40 -r1.41
>   --- jk_channel_socket.c 24 Sep 2002 22:36:28 -  1.40
>   +++ jk_channel_socket.c 28 Sep 2002 20:06:19 -  1.41
>   @@ -328,12 +328,11 @@
>
>#ifdef WIN32
>if(SOCKET_ERROR == ret) { 
>   -errno = WSAGetLastError();
>   +errno = WSAGetLastError() - WSABASEERR;
>}
>   -} while (ret == -1 && errno == WSAECONNREFUSED);
>   -#else
>   -} while (-1 == ret && EINTR == errno);
>#endif /* WIN32 */
>   +
>   +} while (-1 == ret && EINTR == errno);
>
>/* Check if we connected */
>if(ret != 0 ) {
>   
>   
>   
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-09-28 Thread Mladen Turk



> -Original Message-
> From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]] 
 
> 
> The comment is wrong, the problem is with the loadbalancer 
> logic, if one of the configured instances got lost, connect 
> returns WSAECONNREFUSED, with Malden's patch, the thread gots 
> stuck in a loop trying to connectto a non existing tc instance.. 
> 

Like I said you don't know if its non existing or just refusing more
connections due to maximum connections reached.
So what we need here is timout check inside connection phase, and not
giving up on the first failed connection request.
On the high load this will give you lots of 404's that are simply caused
by the fact that the TC is too busy refusing more concurent connections.

> Incidentally i have this config to test tc4 in port 8019 and 
> tc33 in 8009, i normally dont have the 2 versions working at 
> the same time, so i continually get WSAECONNREFUSED.. hence 
> the problem.. 
> 

If we put the timeout check inside the connection phase of the socket,
after that time we could mark the worker as disabled, or skip the
timeout testing for this worker, failing on the first connection error.
If the connection gets valid again, then we can check the timeout over
again.

MT.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-09-30 Thread Henri Gomez

Did you source tarball include latest patches from Nacho ?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-09-30 Thread Mladen Turk

No, they don' t.
The socket code is now reverted to the 4.1.12 tag.
It needs lot of work to make the entire logic work as It should (well,
that's my opinion), not just bug-fixing. The concept is wrong, not the
code.


Either we'll retag that as 2_0_0 or 2_0_1.
What do you think?

I would like to make that as JK2_2_0_1, and rerelease, as 2.0.1

MT.

> -Original Message-
> From: Henri Gomez [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, September 30, 2002 10:18 AM
> To: Tomcat Developers List
> Subject: Re: cvs commit: 
> jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c
> 
> 
> Did you source tarball include latest patches from Nacho ?
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For 
> additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-09-30 Thread Henri Gomez

> Either we'll retag that as 2_0_0 or 2_0_1.

> What do you think?

2_0_0_rel, as I did for JK 1.2.0

> 
> I would like to make that as JK2_2_0_1, and rerelease, as 2.0.1

It's just a fix, so make a new tarball and tell you get it from
2_0_0_rel (unless you put an announce to tomcat-user which in
that case make greated audience and the 2.0.1 is really required)





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-09-30 Thread Mladen Turk



> -Original Message-
> From: Henri Gomez
 
> > Either we'll retag that as 2_0_0 or 2_0_1.
> 
> > What do you think?
> 
> 2_0_0_rel, as I did for JK 1.2.0
> 

OK, its going to be 2_0_0_rel, and the sources will go to the Jakarta
(I've got the account) as 2.0.0.

MT.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-11-07 Thread Mladen Turk

Personally don't like hardcoded defines.
Could that be guessed or forced in makefiles?

>
>   +/* affects include files on Solaris (for FIONBIO on Solaris 8) */
>   +#define BSD_COMP

MT.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-11-07 Thread Henri Gomez
Mladen Turk wrote:

Personally don't like hardcoded defines.


me too.


Could that be guessed or forced in makefiles?


I searched thru Apache 2.0.43 source and find these
included by hand in files, but configure specialists
should be able to fix it.

JF ?



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-11-07 Thread jean-frederic clere
Mladen Turk wrote:

Personally don't like hardcoded defines.
Could that be guessed or forced in makefiles?


It must be guessed in the configure...





  
 +/* affects include files on Solaris (for FIONBIO on Solaris 8) */
 +#define BSD_COMP


MT.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-11-07 Thread jean-frederic clere
Henri Gomez wrote:

Mladen Turk wrote:


Personally don't like hardcoded defines.



me too.


Could that be guessed or forced in makefiles?



I searched thru Apache 2.0.43 source and find these
included by hand in files, but configure specialists
should be able to fix it.

JF ?


Yes, but FIONBIO does not exist everywhere so we need more than checking for 
FIONBIO. I will have a look.




--
To unsubscribe, e-mail:   

For additional commands, e-mail: 







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-11-07 Thread Mladen Turk


> -Original Message-
> From: jean-frederic clere 
> 
> It must be guessed in the configure...
> 

Why? Think we just add the -DBSD_COMP to the JK_CFLAGS in Makefile.in

MT.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-11-07 Thread Henri Gomez
Mladen Turk wrote:



-Original Message-
From: jean-frederic clere 

It must be guessed in the configure...



Why? Think we just add the -DBSD_COMP to the JK_CFLAGS in Makefile.in


Sure but it's not very clean and didn't take use of configure 
"detection" features.

BTW: we'll need to find a way to add it to jkant for those who want to 
use ant to build native code ;{



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-11-07 Thread Mladen Turk


> -Original Message-
> From: Henri Gomez
> > 
> > Why? Think we just add the -DBSD_COMP to the JK_CFLAGS in 
> Makefile.in
> 
> Sure but it's not very clean and didn't take use of configure 
> "detection" features.
> 
> BTW: we'll need to find a way to add it to jkant for those 
> who want to 
> use ant to build native code ;{
> 

Agreed, but the entire purpose of the ioctl is to disable the
nonblocking socket.
We can use the fcntl for that.
 

int fd_flags;
fd_flags = fcntl(sd, F_GETFL, 0);
#if defined(O_NONBLOCK)
fd_flags &= ~O_NONBLOCK;
#elif defined(O_NDELAY)
fd_flags &= ~O_NDELAY;
#elif defined(FNDELAY)
fd_flags &= ~O_FNDELAY;
#else
/* : this breaks things, but an alternative isn't obvious...*/
return -1;
#endif
if (fcntl(sd, F_SETFL, fd_flags) == -1) {
return errno;
}


That's how its done in apr.

MT.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-11-07 Thread Brzezinski, Paul J
What about doing something like this:

#ifdef SOLARIS2 == 8
#define BSD_COMP
#endif


The problem is that the BSD_COMP flag is only needed for ONE of the native
source files for each connector type (JK, JK2).  I don't know, haven't
investigated if turning this on activates any other conditional includes
which may change the behavior of the connectors...

Paul




: -Original Message-
: From: jean-frederic clere 
: [mailto:jfrederic.clere@;fujitsu-siemens.com] 
: Sent: Thursday, November 07, 2002 10:51 AM
: To: Tomcat Developers List
: Subject: Re: cvs commit: 
: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c
: 
: 
: Mladen Turk wrote:
: > Personally don't like hardcoded defines.
: > Could that be guessed or forced in makefiles?
: 
: It must be guessed in the configure...
: 
: > 
: > 
: >>   
: >>  +/* affects include files on Solaris (for FIONBIO on 
: Solaris 8) */  
: >> +#define BSD_COMP
: > 
: > 
: > MT.
: > 
: > 
: > 
: > --
: > To unsubscribe, e-mail:   
: <mailto:tomcat-dev-: [EMAIL PROTECTED]>
: > For 
: additional commands, 
: e-mail: 
: > <mailto:tomcat-dev-help@;jakarta.apache.org>
: > 
: > 
: 
: 
: 
: 
: --
: To unsubscribe, e-mail:   
: <mailto:tomcat-dev-: [EMAIL PROTECTED]>
: For 
: additional commands, 
: e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>
: 

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>




Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-11-07 Thread jean-frederic clere
Mladen Turk wrote:



-Original Message-
From: jean-frederic clere 

It must be guessed in the configure...



Why? Think we just add the -DBSD_COMP to the JK_CFLAGS in Makefile.in


Well... I will do nearly the same but in configure.in after testing if needed or 
 not. (BSD_COMP may break something in other platforms).


MT.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-11-07 Thread Henri Gomez
Mladen Turk wrote:



-Original Message-
From: Henri Gomez


Why? Think we just add the -DBSD_COMP to the JK_CFLAGS in 

Makefile.in

Sure but it's not very clean and didn't take use of configure 
"detection" features.

BTW: we'll need to find a way to add it to jkant for those 
who want to 
use ant to build native code ;{



Agreed, but the entire purpose of the ioctl is to disable the
nonblocking socket.
We can use the fcntl for that.
 

int fd_flags;
fd_flags = fcntl(sd, F_GETFL, 0);
#if defined(O_NONBLOCK)
fd_flags &= ~O_NONBLOCK;
#elif defined(O_NDELAY)
fd_flags &= ~O_NDELAY;
#elif defined(FNDELAY)
fd_flags &= ~O_FNDELAY;
#else
/* : this breaks things, but an alternative isn't obvious...*/
return -1;
#endif
if (fcntl(sd, F_SETFL, fd_flags) == -1) {
return errno;
}


That's how its done in apr.

So let use it that way, APR is a reference in native code implementation  ;)




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2002-11-07 Thread Mladen Turk


> -Original Message-
> From: Henri Gomez

> > Agreed, but the entire purpose of the ioctl is to disable the 
> > nonblocking socket. We can use the fcntl for that.
> So let use it that way, APR is a reference in native code 
> implementation  ;)

I was looking at the docs and see no reason at all to call that at the
first place.
Since we are sure that the socket is created in the blocking mode, then
seting timeout doesn't need to set the socket to the blocking mode at
the first place.
Think that I copied that code from the APR at the first place (seting
socket timeout), but in the apr you cannot be sure that if the socket is
blocking or not, so you have to set it to the correct mode.

I'll #if 0 that setting, so we can check that.

MT.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2004-02-03 Thread Mladen Turk
 

> From: mmanders
> 
>   Modified:jk/native2/common jk_channel_socket.c
>   Log:
>   Fix problem with port higher than 32K.  Provided by Guenter 
> Knauf.  Fixed compile problem for NetWare even though this 
> isn't built for NetWare (or any other platform.)
>   

jk_channel_socket is depriciated, and it won't compile at all.

at line 74 you have:
#error "jk_channel_socket is deprecated"

the entire file should be removed from CVS.

MT.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2004-02-03 Thread Mike Anderson
+1.  Two reasons I haven't
1.  I'm not a CVS expert and don't want to screw it up :-)
2.  The only reason I patched it was because someone else (Henri I
believe) was concerned about removing it and this was a more
conservative approach.

I did comment out that line to make sure that it would compile, but
left it active when I checked it in.

Mike Anderson

>>> [EMAIL PROTECTED] 2/3/2004 8:11:34 AM >>>
 

> From: mmanders
> 
>   Modified:jk/native2/common jk_channel_socket.c
>   Log:
>   Fix problem with port higher than 32K.  Provided by Guenter 
> Knauf.  Fixed compile problem for NetWare even though this 
> isn't built for NetWare (or any other platform.)
>   

jk_channel_socket is depriciated, and it won't compile at all.

at line 74 you have:
#error "jk_channel_socket is deprecated"

the entire file should be removed from CVS.

MT.


-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2004-02-03 Thread Henri Gomez
Mike Anderson a écrit :

+1.  Two reasons I haven't
1.  I'm not a CVS expert and don't want to screw it up :-)
2.  The only reason I patched it was because someone else (Henri I
believe) was concerned about removing it and this was a more
conservative approach.
I did comment out that line to make sure that it would compile, but
left it active when I checked it in.
Ok, I remove it from CVS right now :)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2004-02-03 Thread jean-frederic clere
Henri Gomez wrote:
Mike Anderson a écrit :

+1.  Two reasons I haven't
1.  I'm not a CVS expert and don't want to screw it up :-)
2.  The only reason I patched it was because someone else (Henri I
believe) was concerned about removing it and this was a more
conservative approach.
I did comment out that line to make sure that it would compile, but
left it active when I checked it in.


Ok, I remove it from CVS right now :)
I am too slow... :-)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2004-02-03 Thread Henri Gomez
jean-frederic clere a écrit :

Henri Gomez wrote:

Mike Anderson a écrit :

+1.  Two reasons I haven't
1.  I'm not a CVS expert and don't want to screw it up :-)
2.  The only reason I patched it was because someone else (Henri I
believe) was concerned about removing it and this was a more
conservative approach.
I did comment out that line to make sure that it would compile, but
left it active when I checked it in.


Ok, I remove it from CVS right now :)


I am too slow... :-)
Next time you pay me a beer :)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

2004-02-03 Thread jean-frederic clere
Henri Gomez wrote:
jean-frederic clere a écrit :

Henri Gomez wrote:

Mike Anderson a écrit :

+1.  Two reasons I haven't
1.  I'm not a CVS expert and don't want to screw it up :-)
2.  The only reason I patched it was because someone else (Henri I
believe) was concerned about removing it and this was a more
conservative approach.
I did comment out that line to make sure that it would compile, but
left it active when I checked it in.




Ok, I remove it from CVS right now :)


I am too slow... :-)


Next time you pay me a beer :)
No problems :-))

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]