DNS Deafness

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

DNS Deafness

Trevor Borgmeier
Many of you have experienced the issue of DNS deafness with Lasso 8.5.  
I'm not sure if Lasso 8.6 suffers from the same problem, but I know
Lassosoft was having difficulties in reproducing this issue and couldn't
find any clear problem with the code. As far as I know, this issue only
effected the OS X version of lasso but not windows or Linux.

Recently, we were re-configuring an OS X box and installing apache and
php from source.  Ditching the stock apple installs so that we could
update in a timely manner and control them more directly.  In doing so,
we were experiencing a similar DNS deafness but with Apache/PHP.  Sites
using PHP's file_get_contents tag would fail after a short while...
which is similar to lasso's include_url tag. All in all, it smelled a
lot like Lasso's DNS Deafness issue.

In researching the issue for PHP, I came across this:

https://bugs.php.net/bug.php?id=50807

and found this particular entry of interest...

> [2010-01-26 04:14 UTC] skasun at tucson dot com
> Just a follow up, it is indeed not PHP's fault (thanks Rasmus, your
> response helped us determine the true cause).
>
> We have determined that launching a background process (apache for  
> example) from the command line and then logging out will cause OSX to
> flag that process's Context for garbage collection. That will prevent  
> that process's children from looking up Mach ports, which will cause
> getaddrinfo to return EAI_AGAIN. Since not all children are GC'd, some
> apache processes work, others fail.
>
> Apparently this affects Leopard and Snow Leopard.  Our fix was as
> simple  as running Apache from GNU screen.

So after finding this info and sharing it with my colleague, he started
playing with this idea and launched apachectl using "nohup sudo
apachectl start". it seemed to help... a lot.

With this server, PHP's DNS Deafness would come early -- after
minutes/hours of starting apache.  After starting Apache using nohup as
described above, the issue went away all together.

Anyway, I took this info we found when troubleshooting PHP and for now
I've edited the Lasso8Service.sh file here (/Applications/Lasso\
Professional\ 8/LassoAdmin/Lasso8Service.sh)

by changing this line (34):
     sudo -u lasso ./Lasso8Service > /private/tmp/LassoService8.out 2>&1
to:
     nohup sudo -u lasso ./Lasso8Service >
/private/tmp/LassoService8.out 2>&1

I've only had this modified LassoService.sh script in place for a couple
of days and haven't had an occurrence of Lasso's DNS Deafness issue
since, but from previous experience that's not long enough to be definitive.

Perhaps there is an answer in how Apple launches it's stock apache
installation or the apachectl script they include.  I'm not sure, but
thought I'd share our findings in case this helps anyone, or can lead to
a better fix by more knowledgeable people.  I'm not familiar enough with
nohup to know if there would be any bad side-effects to using it, but I
haven't noticed any.  Assuming this nohup solution works, it may not be
the best approach. I don't know... Time should tell if the nohup
launching of LassoService works.  For now, my fingers are crossed.

-Trevor
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: DNS Deafness

Jonathan Guthrie-3
Great news Trevor.
Please keep us updated with progress, and if it is successful (or not) - I am sure it would be of great interest to everyone running servers on OS X!

Thanks, and great work!!!
Jono

On Jan 22, 2014, at 3:09 PM, Trevor Borgmeier <[hidden email]> wrote:

> Many of you have experienced the issue of DNS deafness with Lasso 8.5.  I'm not sure if Lasso 8.6 suffers from the same problem, but I know Lassosoft was having difficulties in reproducing this issue and couldn't find any clear problem with the code. As far as I know, this issue only effected the OS X version of lasso but not windows or Linux.
>
> Recently, we were re-configuring an OS X box and installing apache and php from source.  Ditching the stock apple installs so that we could update in a timely manner and control them more directly.  In doing so, we were experiencing a similar DNS deafness but with Apache/PHP.  Sites using PHP's file_get_contents tag would fail after a short while... which is similar to lasso's include_url tag. All in all, it smelled a lot like Lasso's DNS Deafness issue.
>
> In researching the issue for PHP, I came across this:
>
> https://bugs.php.net/bug.php?id=50807
>
> and found this particular entry of interest...
>
>> [2010-01-26 04:14 UTC] skasun at tucson dot com
>> Just a follow up, it is indeed not PHP's fault (thanks Rasmus, your response helped us determine the true cause).
>>
>> We have determined that launching a background process (apache for  example) from the command line and then logging out will cause OSX to flag that process's Context for garbage collection. That will prevent  that process's children from looking up Mach ports, which will cause getaddrinfo to return EAI_AGAIN. Since not all children are GC'd, some apache processes work, others fail.
>>
>> Apparently this affects Leopard and Snow Leopard.  Our fix was as simple  as running Apache from GNU screen.
>
> So after finding this info and sharing it with my colleague, he started playing with this idea and launched apachectl using "nohup sudo apachectl start". it seemed to help... a lot.
>
> With this server, PHP's DNS Deafness would come early -- after minutes/hours of starting apache.  After starting Apache using nohup as described above, the issue went away all together.
>
> Anyway, I took this info we found when troubleshooting PHP and for now I've edited the Lasso8Service.sh file here (/Applications/Lasso\ Professional\ 8/LassoAdmin/Lasso8Service.sh)
>
> by changing this line (34):
>    sudo -u lasso ./Lasso8Service > /private/tmp/LassoService8.out 2>&1
> to:
>    nohup sudo -u lasso ./Lasso8Service > /private/tmp/LassoService8.out 2>&1
>
> I've only had this modified LassoService.sh script in place for a couple of days and haven't had an occurrence of Lasso's DNS Deafness issue since, but from previous experience that's not long enough to be definitive.
>
> Perhaps there is an answer in how Apple launches it's stock apache installation or the apachectl script they include.  I'm not sure, but thought I'd share our findings in case this helps anyone, or can lead to a better fix by more knowledgeable people.  I'm not familiar enough with nohup to know if there would be any bad side-effects to using it, but I haven't noticed any.  Assuming this nohup solution works, it may not be the best approach. I don't know... Time should tell if the nohup launching of LassoService works.  For now, my fingers are crossed.
>
> -Trevor


Jono

----------------------------
Jonathan Guthrie
[hidden email]
@iamjono
LassoSoft Inc.
AIM Chatroom: lassochat
IRC/freenode #lasso

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: DNS Deafness

Seth Ganahl
In reply to this post by Trevor Borgmeier
If this works Trevor you have saved me countless hours of grief.


On 1/22/14, 2:09 PM, "Trevor Borgmeier" <[hidden email]> did quoth:
> Anyway, I took this info we found when troubleshooting PHP and for now
> I've edited the Lasso8Service.sh file here (/Applications/Lasso\
> Professional\ 8/LassoAdmin/Lasso8Service.sh)
>
> by changing this line (34):
>      sudo -u lasso ./Lasso8Service > /private/tmp/LassoService8.out 2>&1
> to:
>      nohup sudo -u lasso ./Lasso8Service >
> /private/tmp/LassoService8.out 2>&1


-------------------------------------------------------
Seth C Ganahl (501) 282-4867
Ganahl Consulting ­ Web Applications
http://www.ganahlconsulting.com/
[hidden email]
-------------------------------------------------------


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: DNS Deafness

Peter D Bethke
Seconded - I read the php article and trevor’s line of reasoning makes perfect sense. Interesting response on that thread:

[2010-01-26 04:20 UTC] [hidden email]
That sounds really odd.  You are saying that Apache is essentially
broken on OSX by default.  Interesting.

He seems to have a point - though wouldn’t this then effect any scripting language that gets it’s information from low-level calls - python, ruby, you name it. I’d have thought this “bug” would have made a much bigger impact in the greater scripting universe.

If it does turn out to be the issue - I think we all owe Trevor a drink or two.

Peter


On Jan 22, 2014, at 7:20 PM, Seth Ganahl <[hidden email]> wrote:

> If this works Trevor you have saved me countless hours of grief.
>
>
> On 1/22/14, 2:09 PM, "Trevor Borgmeier" <[hidden email]> did quoth:
>> Anyway, I took this info we found when troubleshooting PHP and for now
>> I've edited the Lasso8Service.sh file here (/Applications/Lasso\
>> Professional\ 8/LassoAdmin/Lasso8Service.sh)
>>
>> by changing this line (34):
>>     sudo -u lasso ./Lasso8Service > /private/tmp/LassoService8.out 2>&1
>> to:
>>     nohup sudo -u lasso ./Lasso8Service >
>> /private/tmp/LassoService8.out 2>&1
>
>
> -------------------------------------------------------
> Seth C Ganahl (501) 282-4867
> Ganahl Consulting ­ Web Applications
> http://www.ganahlconsulting.com/
> [hidden email]
> -------------------------------------------------------
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: DNS Deafness

Sean Stephens-2

> If it does turn out to be the issue - I think we all owe Trevor a drink or two.


If it does turn out to be the case, I'll be the first in line.  We've poured more than a few drinks on that issue over the past decade, I'll happily personally pour one more.

(Might have to buy Rasmus a drink too)

Sean Stephens
CEO
LassoSoft Inc.
http://www.lassosoft.com

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: DNS Deafness

French, Shelane
Anecdotal evidence: maybe the reason I never experienced this problem with
my 8.5 OS X installation is that we don't log out. It runs the server OS
in a rack mount in our data center, so no need for us to log out.

I hope this was the answer for everyone who has suffered this issue.

On 1/22/14 8:44 PM, "Sean Stephens" <[hidden email]> wrote:

>
>> If it does turn out to be the issue - I think we all owe Trevor a drink
>>or two.
>
>
>If it does turn out to be the case, I'll be the first in line.  We've
>poured more than a few drinks on that issue over the past decade, I'll
>happily personally pour one more.
>
>(Might have to buy Rasmus a drink too)
>
>Sean Stephens
>CEO
>LassoSoft Inc.
>http://www.lassosoft.com
>
>#############################################################
>This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
>Official list archives available at http://www.lassotalk.com
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: DNS Deafness

Trevor Borgmeier
on 1/23/14, 10:11 AM French, Shelane wrote:
> Anecdotal evidence: maybe the reason I never experienced this problem with
> my 8.5 OS X installation is that we don't log out. It runs the server OS
> in a rack mount in our data center, so no need for us to log out.
Yes.  I think this would explain why sometimes it works for long periods
of time without issue, and then seemingly randomly would start recurring
quite frequently.  When a server gets a hard reboot, Lasso is launched
and that user never logs out, but if you ever restart lasso through SSH
(and then log out of SSH), that's when the DNS Deafness starts becoming
an issue.  That was actually our first test with troubleshooting the
issue with PHP before we implemented nohup.  We logged in and restarted
apache via SSH and simply didn't log out...

-Trevor

> I hope this was the answer for everyone who has suffered this issue.
>
> On 1/22/14 8:44 PM, "Sean Stephens" <[hidden email]> wrote:
>
>>> If it does turn out to be the issue - I think we all owe Trevor a drink
>>> or two.
>>
>> If it does turn out to be the case, I'll be the first in line.  We've
>> poured more than a few drinks on that issue over the past decade, I'll
>> happily personally pour one more.
>>
>> (Might have to buy Rasmus a drink too)
>>
>> Sean Stephens
>> CEO
>> LassoSoft Inc.
>> http://www.lassosoft.com
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>   the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
> #############################################################
> This message is sent to you because you are subscribed to
>    the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>
>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: DNS Deafness

Trevor Borgmeier

on 1/23/14, 10:27 AM Trevor Borgmeier wrote:

> on 1/23/14, 10:11 AM French, Shelane wrote:
>> Anecdotal evidence: maybe the reason I never experienced this problem
>> with
>> my 8.5 OS X installation is that we don't log out. It runs the server OS
>> in a rack mount in our data center, so no need for us to log out.
> Yes.  I think this would explain why sometimes it works for long
> periods of time without issue, and then seemingly randomly would start
> recurring quite frequently.  When a server gets a hard reboot, Lasso
> is launched and that user never logs out, but if you ever restart
> lasso through SSH (and then log out of SSH), that's when the DNS
> Deafness starts becoming an issue.  That was actually our first test
> with troubleshooting the issue with PHP before we implemented nohup.  
> We logged in and restarted apache via SSH and simply didn't log out...

(I probably shouldn't have ended with the ellipsis there)

.. and then it worked flawlessly for days -- until we logged out of the
SSH session.


>
> -Trevor
>
>> I hope this was the answer for everyone who has suffered this issue.
>>
>> On 1/22/14 8:44 PM, "Sean Stephens" <[hidden email]> wrote:
>>
>>>> If it does turn out to be the issue - I think we all owe Trevor a
>>>> drink
>>>> or two.
>>>
>>> If it does turn out to be the case, I'll be the first in line.  We've
>>> poured more than a few drinks on that issue over the past decade, I'll
>>> happily personally pour one more.
>>>
>>> (Might have to buy Rasmus a drink too)
>>>
>>> Sean Stephens
>>> CEO
>>> LassoSoft Inc.
>>> http://www.lassosoft.com
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>>   the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to <[hidden email]>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>    the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to <[hidden email]>
>>
>>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to <[hidden email]>
>
>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: DNS Deafness

gzasuwa
In reply to this post by French, Shelane
Log out of the Lasso siteadmin or serveradmin panels?

Sincerely,

Gerard Zasuwa Gary
Ld Systems Analyst
Henry Ford Health System
Greenfield Health Systems
(313) 916-2651 work
(313) 585-9621 NEW CELL










On Jan 23, 2014, at 11:11 AM, French, Shelane wrote:

> Anecdotal evidence: maybe the reason I never experienced this problem with
> my 8.5 OS X installation is that we don't log out. It runs the server OS
> in a rack mount in our data center, so no need for us to log out.
>
> I hope this was the answer for everyone who has suffered this issue.
>
> On 1/22/14 8:44 PM, "Sean Stephens" <[hidden email]> wrote:
>
>>
>>> If it does turn out to be the issue - I think we all owe Trevor a drink
>>> or two.
>>
>>
>> If it does turn out to be the case, I'll be the first in line.  We've
>> poured more than a few drinks on that issue over the past decade, I'll
>> happily personally pour one more.
>>
>> (Might have to buy Rasmus a drink too)
>>
>> Sean Stephens
>> CEO
>> LassoSoft Inc.
>> http://www.lassosoft.com
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: DNS Deafness

Eric Knibbe-2
In this case, logging out refers to the system's user account. Or does it...?

Now that I know what to look for, I dug up some similar bug reports elsewhere online. Of interest:

<https://issues.apache.org/bugzilla/show_bug.cgi?id=46682>
Apache itself stops resolving if left idle for several hours. Solved by pinging Apache every 15 minutes.

<http://lists.apple.com/archives/darwin-dev/2008/Jul/msg00017.html>
<http://lists.apple.com/archives/darwin-dev/2008/Jul/msg00011.html>
Evidence that processes started by launchd are exempt. This would explain why Lasso 9 is unaffected.

<https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/KernelProgramming/contexts/contexts.html>
The article on contexts referenced above. Reading it seems to suggest that if Lasso is started by a script that is run during boot, such as the StartupItem used by Lasso 8, it will start in the startup context, which won't be flagged for garbage collection. However, if a user logs in via screen sharing (not SSH) and restarts Lasso using `lasso8ctl restart`, Lasso will be in the login context, leaving it vulnerable to DNS deafness if the user logs out, or even just closes the shell.

So how to ensure a process is always started in the startup context? Besides converting the daemon to launchd, the StartupItemContext utility seems to be the answer (`man StartupItemContext`). Following Trevor's lead, I figure the proper fix is to modify line 31 of "/Applications/Lasso\ Professional\ 8/LassoAdmin/Lasso8Service.sh" to be:

         /usr/libexec/StartupItemContext sudo -u lasso ./Lasso8Service > /private/tmp/LassoService8.out 2>&1

We can use the BootstrapDump utility (found somewhere deep within the Apple developer docs) to list each process according to its current context with `sudo ./BootstrapDump MAP`. Here's the smoking gun: if you run `sudo lasso8ctl start` without the above change, the two Lasso8Service processes appear near the bottom in the same context as your standard GUI apps. With the change, they're listed in the same context as system-level services, like httpd, WindowServer, and mDNSResponder. I'm interested in hearing if this change truly prevents DNS deafness from recurring on a Mac that's had Lasso restarted in Terminal, then logged out.

One more thing. If you open a new terminal window and run `sudo lasso8ctl restart`, closing the window will warn you that the two Lasso8Service processes will be terminated. That shouldn't happen. This doesn't occur if you call lasso8ctl via the Startup Item in /Library/StartupItems/LassoPro8 using `sudo SystemStarter start "Lasso Professional 8"`, but I'm unaware of how to modify lasso8ctl or Lasso8Service.sh to have the Terminal truly disown the Lasso8Service processes. Any solutions, please share.
‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
Eric3
 

On 2014-01-23, at 12:47 PM, Gary Zasuwa wrote:

> Log out of the Lasso siteadmin or serveradmin panels?
>
> Sincerely,
>
> Gerard Zasuwa Gary
> Ld Systems Analyst
> Henry Ford Health System
> Greenfield Health Systems
> (313) 916-2651 work
> (313) 585-9621 NEW CELL
>
>
> On Jan 23, 2014, at 11:11 AM, French, Shelane wrote:
>
>> Anecdotal evidence: maybe the reason I never experienced this problem with
>> my 8.5 OS X installation is that we don't log out. It runs the server OS
>> in a rack mount in our data center, so no need for us to log out.
>>
>> I hope this was the answer for everyone who has suffered this issue.
>>
>> On 1/22/14 8:44 PM, "Sean Stephens" <[hidden email]> wrote:
>>
>>>
>>>> If it does turn out to be the issue - I think we all owe Trevor a drink
>>>> or two.
>>>
>>>
>>> If it does turn out to be the case, I'll be the first in line.  We've
>>> poured more than a few drinks on that issue over the past decade, I'll
>>> happily personally pour one more.
>>>
>>> (Might have to buy Rasmus a drink too)
>>>
>>> Sean Stephens
>>> CEO
>>> LassoSoft Inc.
>>> http://www.lassosoft.com
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: DNS Deafness

Lars A. Gundersen-2
If this works I owe Trevor a case of Leffe or any other Belgian beer of his chosing. Will investigate....

... as soon as I get a proper net connection going. I've moved to Lusaka, Zambia and the net-through-phone-hotspot here is driving me nuts....

Lars

PS. If anybody need a Lasso developer i Zambia, give me a ring (ha ha ha).

On 25. jan. 2014, at 02:59, Eric Knibbe <[hidden email]> wrote:

> In this case, logging out refers to the system's user account. Or does it...?
>
> Now that I know what to look for, I dug up some similar bug reports elsewhere online. Of interest:
>
> <https://issues.apache.org/bugzilla/show_bug.cgi?id=46682>
> Apache itself stops resolving if left idle for several hours. Solved by pinging Apache every 15 minutes.
>
> <http://lists.apple.com/archives/darwin-dev/2008/Jul/msg00017.html>
> <http://lists.apple.com/archives/darwin-dev/2008/Jul/msg00011.html>
> Evidence that processes started by launchd are exempt. This would explain why Lasso 9 is unaffected.
>
> <https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/KernelProgramming/contexts/contexts.html>
> The article on contexts referenced above. Reading it seems to suggest that if Lasso is started by a script that is run during boot, such as the StartupItem used by Lasso 8, it will start in the startup context, which won't be flagged for garbage collection. However, if a user logs in via screen sharing (not SSH) and restarts Lasso using `lasso8ctl restart`, Lasso will be in the login context, leaving it vulnerable to DNS deafness if the user logs out, or even just closes the shell.
>
> So how to ensure a process is always started in the startup context? Besides converting the daemon to launchd, the StartupItemContext utility seems to be the answer (`man StartupItemContext`). Following Trevor's lead, I figure the proper fix is to modify line 31 of "/Applications/Lasso\ Professional\ 8/LassoAdmin/Lasso8Service.sh" to be:
>
> /usr/libexec/StartupItemContext sudo -u lasso ./Lasso8Service > /private/tmp/LassoService8.out 2>&1
>
> We can use the BootstrapDump utility (found somewhere deep within the Apple developer docs) to list each process according to its current context with `sudo ./BootstrapDump MAP`. Here's the smoking gun: if you run `sudo lasso8ctl start` without the above change, the two Lasso8Service processes appear near the bottom in the same context as your standard GUI apps. With the change, they're listed in the same context as system-level services, like httpd, WindowServer, and mDNSResponder. I'm interested in hearing if this change truly prevents DNS deafness from recurring on a Mac that's had Lasso restarted in Terminal, then logged out.
>
> One more thing. If you open a new terminal window and run `sudo lasso8ctl restart`, closing the window will warn you that the two Lasso8Service processes will be terminated. That shouldn't happen. This doesn't occur if you call lasso8ctl via the Startup Item in /Library/StartupItems/LassoPro8 using `sudo SystemStarter start "Lasso Professional 8"`, but I'm unaware of how to modify lasso8ctl or Lasso8Service.sh to have the Terminal truly disown the Lasso8Service processes. Any solutions, please share.
> ‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
> Eric3
>
>
> On 2014-01-23, at 12:47 PM, Gary Zasuwa wrote:
>
>> Log out of the Lasso siteadmin or serveradmin panels?
>>
>> Sincerely,
>>
>> Gerard Zasuwa Gary
>> Ld Systems Analyst
>> Henry Ford Health System
>> Greenfield Health Systems
>> (313) 916-2651 work
>> (313) 585-9621 NEW CELL
>>
>>
>> On Jan 23, 2014, at 11:11 AM, French, Shelane wrote:
>>
>>> Anecdotal evidence: maybe the reason I never experienced this problem with
>>> my 8.5 OS X installation is that we don't log out. It runs the server OS
>>> in a rack mount in our data center, so no need for us to log out.
>>>
>>> I hope this was the answer for everyone who has suffered this issue.
>>>
>>> On 1/22/14 8:44 PM, "Sean Stephens" <[hidden email]> wrote:
>>>
>>>>
>>>>> If it does turn out to be the issue - I think we all owe Trevor a drink
>>>>> or two.
>>>>
>>>>
>>>> If it does turn out to be the case, I'll be the first in line.  We've
>>>> poured more than a few drinks on that issue over the past decade, I'll
>>>> happily personally pour one more.
>>>>
>>>> (Might have to buy Rasmus a drink too)
>>>>
>>>> Sean Stephens
>>>> CEO
>>>> LassoSoft Inc.
>>>> http://www.lassosoft.com
>>>>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: DNS Deafness

Erik Vandermey - WebCentrix, Inc.
In reply to this post by Eric Knibbe-2
Any news to report on this? I've implemented Eric's fix, but it doesn't seem to be working.

Regards,
---
Tech Support • [hidden email]http://webcentrix.net
WebCentrix, Inc. • Web Hosting/Co-Location/Dedicated Servers  • Kerio Connect/Control Reseller

On Jan 24, 2014, at 6:59 PM, Eric Knibbe <[hidden email]> wrote:

> In this case, logging out refers to the system's user account. Or does it...?
>
> Now that I know what to look for, I dug up some similar bug reports elsewhere online. Of interest:
>
> <https://issues.apache.org/bugzilla/show_bug.cgi?id=46682>
> Apache itself stops resolving if left idle for several hours. Solved by pinging Apache every 15 minutes.
>
> <http://lists.apple.com/archives/darwin-dev/2008/Jul/msg00017.html>
> <http://lists.apple.com/archives/darwin-dev/2008/Jul/msg00011.html>
> Evidence that processes started by launchd are exempt. This would explain why Lasso 9 is unaffected.
>
> <https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/KernelProgramming/contexts/contexts.html>
> The article on contexts referenced above. Reading it seems to suggest that if Lasso is started by a script that is run during boot, such as the StartupItem used by Lasso 8, it will start in the startup context, which won't be flagged for garbage collection. However, if a user logs in via screen sharing (not SSH) and restarts Lasso using `lasso8ctl restart`, Lasso will be in the login context, leaving it vulnerable to DNS deafness if the user logs out, or even just closes the shell.
>
> So how to ensure a process is always started in the startup context? Besides converting the daemon to launchd, the StartupItemContext utility seems to be the answer (`man StartupItemContext`). Following Trevor's lead, I figure the proper fix is to modify line 31 of "/Applications/Lasso\ Professional\ 8/LassoAdmin/Lasso8Service.sh" to be:
>
> /usr/libexec/StartupItemContext sudo -u lasso ./Lasso8Service > /private/tmp/LassoService8.out 2>&1
>
> We can use the BootstrapDump utility (found somewhere deep within the Apple developer docs) to list each process according to its current context with `sudo ./BootstrapDump MAP`. Here's the smoking gun: if you run `sudo lasso8ctl start` without the above change, the two Lasso8Service processes appear near the bottom in the same context as your standard GUI apps. With the change, they're listed in the same context as system-level services, like httpd, WindowServer, and mDNSResponder. I'm interested in hearing if this change truly prevents DNS deafness from recurring on a Mac that's had Lasso restarted in Terminal, then logged out.
>
> One more thing. If you open a new terminal window and run `sudo lasso8ctl restart`, closing the window will warn you that the two Lasso8Service processes will be terminated. That shouldn't happen. This doesn't occur if you call lasso8ctl via the Startup Item in /Library/StartupItems/LassoPro8 using `sudo SystemStarter start "Lasso Professional 8"`, but I'm unaware of how to modify lasso8ctl or Lasso8Service.sh to have the Terminal truly disown the Lasso8Service processes. Any solutions, please share.
> ‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
> Eric3
>
>
> On 2014-01-23, at 12:47 PM, Gary Zasuwa wrote:
>
>> Log out of the Lasso siteadmin or serveradmin panels?
>>
>> Sincerely,
>>
>> Gerard Zasuwa Gary
>> Ld Systems Analyst
>> Henry Ford Health System
>> Greenfield Health Systems
>> (313) 916-2651 work
>> (313) 585-9621 NEW CELL
>>
>>
>> On Jan 23, 2014, at 11:11 AM, French, Shelane wrote:
>>
>>> Anecdotal evidence: maybe the reason I never experienced this problem with
>>> my 8.5 OS X installation is that we don't log out. It runs the server OS
>>> in a rack mount in our data center, so no need for us to log out.
>>>
>>> I hope this was the answer for everyone who has suffered this issue.
>>>
>>> On 1/22/14 8:44 PM, "Sean Stephens" <[hidden email]> wrote:
>>>
>>>>
>>>>> If it does turn out to be the issue - I think we all owe Trevor a drink
>>>>> or two.
>>>>
>>>>
>>>> If it does turn out to be the case, I'll be the first in line.  We've
>>>> poured more than a few drinks on that issue over the past decade, I'll
>>>> happily personally pour one more.
>>>>
>>>> (Might have to buy Rasmus a drink too)
>>>>
>>>> Sean Stephens
>>>> CEO
>>>> LassoSoft Inc.
>>>> http://www.lassosoft.com
>>>>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>





#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: DNS Deafness

Trevor Borgmeier
In reply to this post by Jonathan Guthrie-3
I just thought I'd update this thread  to report that the "nohup"
solution has worked great for us since we implemented it nearly a year ago.

To recap:
Open this file: "/Applications/Lasso\  Professional\
8/LassoAdmin/Lasso8Service.sh"
Changing this line (34):
     sudo -u lasso ./Lasso8Service > /private/tmp/LassoService8.out 2>&1
to:
     nohup sudo -u lasso ./Lasso8Service >
/private/tmp/LassoService8.out 2>&1

Can anyone report on Eric Knibbes alternative to using "nohup"?
     /usr/libexec/StartupItemContext sudo -u lasso ./Lasso8Service >
/private/tmp/LassoService8.out 2>&1

-Trevor


On 1/22/14 2:51 PM, Jonathan Guthrie wrote:

> Great news Trevor.
> Please keep us updated with progress, and if it is successful (or not) - I am sure it would be of great interest to everyone running servers on OS X!
>
> Thanks, and great work!!!
> Jono
>
> On Jan 22, 2014, at 3:09 PM, Trevor Borgmeier <[hidden email]> wrote:
>
>> Many of you have experienced the issue of DNS deafness with Lasso 8.5.  I'm not sure if Lasso 8.6 suffers from the same problem, but I know Lassosoft was having difficulties in reproducing this issue and couldn't find any clear problem with the code. As far as I know, this issue only effected the OS X version of lasso but not windows or Linux.
>>
>> Recently, we were re-configuring an OS X box and installing apache and php from source.  Ditching the stock apple installs so that we could update in a timely manner and control them more directly.  In doing so, we were experiencing a similar DNS deafness but with Apache/PHP.  Sites using PHP's file_get_contents tag would fail after a short while... which is similar to lasso's include_url tag. All in all, it smelled a lot like Lasso's DNS Deafness issue.
>>
>> In researching the issue for PHP, I came across this:
>>
>> https://bugs.php.net/bug.php?id=50807
>>
>> and found this particular entry of interest...
>>
>>> [2010-01-26 04:14 UTC] skasun at tucson dot com
>>> Just a follow up, it is indeed not PHP's fault (thanks Rasmus, your response helped us determine the true cause).
>>>
>>> We have determined that launching a background process (apache for  example) from the command line and then logging out will cause OSX to flag that process's Context for garbage collection. That will prevent  that process's children from looking up Mach ports, which will cause getaddrinfo to return EAI_AGAIN. Since not all children are GC'd, some apache processes work, others fail.
>>>
>>> Apparently this affects Leopard and Snow Leopard.  Our fix was as simple  as running Apache from GNU screen.
>> So after finding this info and sharing it with my colleague, he started playing with this idea and launched apachectl using "nohup sudo apachectl start". it seemed to help... a lot.
>>
>> With this server, PHP's DNS Deafness would come early -- after minutes/hours of starting apache.  After starting Apache using nohup as described above, the issue went away all together.
>>
>> Anyway, I took this info we found when troubleshooting PHP and for now I've edited the Lasso8Service.sh file here (/Applications/Lasso\ Professional\ 8/LassoAdmin/Lasso8Service.sh)
>>
>> by changing this line (34):
>>     sudo -u lasso ./Lasso8Service > /private/tmp/LassoService8.out 2>&1
>> to:
>>     nohup sudo -u lasso ./Lasso8Service > /private/tmp/LassoService8.out 2>&1
>>
>> I've only had this modified LassoService.sh script in place for a couple of days and haven't had an occurrence of Lasso's DNS Deafness issue since, but from previous experience that's not long enough to be definitive.
>>
>> Perhaps there is an answer in how Apple launches it's stock apache installation or the apachectl script they include.  I'm not sure, but thought I'd share our findings in case this helps anyone, or can lead to a better fix by more knowledgeable people.  I'm not familiar enough with nohup to know if there would be any bad side-effects to using it, but I haven't noticed any.  Assuming this nohup solution works, it may not be the best approach. I don't know... Time should tell if the nohup launching of LassoService works.  For now, my fingers are crossed.
>>
>> -Trevor
>
> Jono
>
> ----------------------------
> Jonathan Guthrie
> [hidden email]
> @iamjono
> LassoSoft Inc.
> AIM Chatroom: lassochat
> IRC/freenode #lasso
>
> #############################################################
> This message is sent to you because you are subscribed to
>    the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>
>


ɹǝıǝɯƃɹoq ɹoʌǝɹʇ


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>