FreeBSD has default timeout for connections 75 seconds: mail#sysctl net.inet.tcp.keepinit net.inet.tcp.keepinit: 75000
So, I set CF_TIMEOUT to 80 seconds and have no problem. >> But I don't really understand why the time-out >>occurs in your network. In your example, the connection seems to fail >>anyway, so the only difference lies in when cfengine gives up as >>opposed to the local TCP timeout default. I will try to explain. I have some tens servers at cfrun.hosts. Then I try to do some jobs at them: cfrun -- -D important_job_for_many_servers But one of my server(in the middle of list) is down(or with the stopped service cfservd) So, when cfrun try connect to this broken host cfrun will be terminated. And its job was stopped. But after change CF_TIMEOUT all works - after broken server cfrun continue its job With best regards, Alexander Shkurko -----Original Message----- From: Mark Burgess [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2008 2:40 PM To: Alexander Shkurko/Шкурко Александр Cc: [email protected] Subject: Re: Socket timeout problem There is nothing wrong with increasing the value of the internal time-out as you did. But I don't really understand why the time-out occurs in your network. In your example, the connection seems to fail anyway, so the only difference lies in when cfengine gives up as opposed to the local TCP timeout default. In either case a time-out happens. Is there a firewall blocking the connection, or just a very slow router? M Alexander Shkurko/Шкурко Александр wrote: > I use cfengine 2.2.7 at FreeBSD 6.3 Stable. > I try it will be connected to a "bad" host(without cfengine): > > cfrun 91.198.36.12 -d20 > > and I have the following: > ...skipped... > IPV4 address > sockaddr_ntop(91.198.36.12) > Connect to 91.198.36.12 = 91.198.36.12 on port 5308 > cfrun:mail.midland.com.ua: Time out of process 0 > Terminated > > > Problem in the "ip.c": > if (response2) > { > freeaddrinfo(response2); > } > } > > > signal(SIGALRM,(void *)TimeOut); > > alarm(CF_TIMEOUT); > -------------------------------------------------->!!!! > > if ((connect(CONN->sd,ap->ai_addr,ap->ai_addrlen)) >= > 0)------------->!!!! > { > connected = true; > alarm(0); > signal(SIGALRM,SIG_DFL); > break; > }; > > I try to use "dirty" hack and increase CF_TIMEOUT to 200 and have good > message: > ....skipped.... > IPV4 address > sockaddr_ntop(91.198.36.12) > Connect to 91.198.36.12 = 91.198.36.12 on port 5308 > cfrun:mail.midland.com.ua: No reponse hailing 91.198.36.12 > cfrun:mail.midland.com.ua: socket: Operation timed out > Connection refused... > > wait result pid = 56448 number 1 > > Can someone confirm that this is good workaround? > > With best regards, > Alexander Shkurko > > _______________________________________________ > Bug-cfengine mailing list > [email protected] > https://cfengine.org/mailman/listinfo/bug-cfengine -- Mark Burgess Web: http://www.iu.hio.no/~mark Tlf: +47 22453272 _______________________________________________ Bug-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/bug-cfengine
