https://bugzilla.novell.com/show_bug.cgi?id=722902
https://bugzilla.novell.com/show_bug.cgi?id=722902#c6
Johannes Meixner changed:
What |Removed |Added
----------------------------------------------------------------------------
Platform|x86-64 |All
--- Comment #6 from Johannes Meixner 2011-10-13 07:49:17 UTC ---
Interesting: More than 6 minutes until it timed out!
When "lpstat -p" hangs more than 6 minutes and
when LibreOffice returns also after about 6 minutes,
it indicates that the actual waiting happens not in
LibreOffice but in the CUPS library or even more likely
in whatever function call of whatever lower-level library:
--------------------------------------------------------------------
# export CUPS_SERVER="www.novell.com"
# host www.novell.com
www.novell.com has address 130.57.5.25
# time lpstat -p 1>/dev/null
lpstat: Network is unreachable
real 0m42.007s
user 0m0.004s
sys 0m0.000s
# strace -f lpstat -p 1>/dev/null
..
connect(4, {sa_family=AF_INET, sin_port=htons(631),
sin_addr=inet_addr("130.57.5.25")}, 16
[here it hangs for several seconds]
..
connect(4, {sa_family=AF_INET, sin_port=htons(631),
sin_addr=inet_addr("130.57.5.25")}, 16
[here it hangs again for several seconds]
..
write(2, "lpstat: Network is unreachable\n", ...
# time lpstat -r 1>/dev/null
real 0m21.003s
user 0m0.000s
sys 0m0.004s
# strace -f lpstat -r 1>/dev/null
..
connect(3, {sa_family=AF_INET, sin_port=htons(631),
sin_addr=inet_addr("130.57.5.25")}, 16
[here it hangs for several seconds]
..
write(1, "scheduler is not running\n", ...
# time netcat -z www.novell.com 631
real 0m21.000s
user 0m0.000s
sys 0m0.000s
# strace -f netcat -z www.novell.com 631
..
connect(3, {sa_family=AF_INET, sin_port=htons(631),
sin_addr=inet_addr("130.57.5.25")}, 16
[here it hangs for several seconds]
--------------------------------------------------------------------
Note that "lpstat -r" results a minimum delay (same as "netcat -z")
because it does only one "connect" while "lpstat -p" has double
delay because it does two same "connect".
Therefore:
When applications (including "lpstat -p") want to talk
to a CUPS server, they should first of all do
what "lpstat -r" does to find out with minimum effort
whether or not the CUPS server responds.
Matthias Hopf,
it would be interesting to see where "lpstat -p" versus "lpstat -r"
versus "netcat -z" hang in your particular case which sum up
to more than 6 minutes for "lpstat -p" in your case.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.