LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 12-14-2009, 03:02 AM   #1
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
OOo: when no Internet: very slow to start and does not open file


Hello

Normally I open OOo files from the file manager (Thunar) and it is inconveniently slow to open, especially the first file opened in the session.

Just now I had no Internet connection and OOo would not open a file; the desktop (Xfce) session was partly frozen (Alt-tab worked to display tasks but would not switch to them; the Task List would not switch to any task windows; Alt+Ctrl+F1 worked).

After rebooting from the Alt+Ctrl+F1 terminal (drastic but I've got an urgent documentation project and just wanted to progress it ASAP) I tried starting OOo from the command line without a document by running /usr/bin/soffice with no options or arguments. After ~1 minute it started the OOo GUI.

Hoping to get some useful information, I closed the OOo GUI and ran netstat -a in a 1 second delayed loop, paused to get a baseline and then ran /usr/bin/soffice again. When the OOo GUI opened I killed the netstat loop. I was not able to identify anything related in the netstat output (perhaps more my ignorance than because it was not there).

OOo is configured not to use Java, not to participate in the Improvement Program. The OOo Tools->Options->Internet settings are default -- mostly empty. I vaguely recall configuring OOo not to look for updates but cannot find a setting that confirms it.

The document I was trying to open is a simple 33 kB accounts spreadsheet without any Internet links.

Any ideas, including how to identify any Internet access that OOo is attempting?

In case it matters, the OS is Slackware 13.0 32-bit and OOo is 3.1.1 installed from SlackBuilds.

Best

Charles

Last edited by catkin; 12-14-2009 at 05:02 AM. Reason: Saner title
 
Old 12-14-2009, 12:52 PM   #2
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Rep: Reputation: 115Reputation: 115
Sounds like one or more apps want the hostname associated with the IP address the network interface is bound to, and that lookup fails because DNS requests can't get to the net. What IP address(es) does your machine have when the internet is not available? It might have only the local adress 127.0.0.1 or maybe some other default address. You can check with "ifconfig" or "ip addr show". Add these, with a host name, to /etc/hosts. Be sure "files" is one of the entries in the "hosts:" line of /etc/nsswitch.conf, too. This should give it some answer instantly instead of timing out asking the absent internet.
 
1 members found this post helpful.
Old 12-14-2009, 01:04 PM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Original Poster
Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Skaperen View Post
Sounds like one or more apps want the hostname associated with the IP address the network interface is bound to, and that lookup fails because DNS requests can't get to the net. What IP address(es) does your machine have when the internet is not available? It might have only the local adress 127.0.0.1 or maybe some other default address. You can check with "ifconfig" or "ip addr show". Add these, with a host name, to /etc/hosts. Be sure "files" is one of the entries in the "hosts:" line of /etc/nsswitch.conf, too. This should give it some answer instantly instead of timing out asking the absent internet.
Thanks Skaperen

The machine's IP is statically configured so is not affected by whether the NATting ADSL modem/router has a connection to the Internet or not.

I checked what you suggested and they all looked OK but here's the output anyway in case I missed something
Code:
root:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1d:7d:d0:cb:ff
          inet addr:192.168.1.47  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21d:7dff:fed0:cbff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:38412 errors:0 dropped:0 overruns:0 frame:0
          TX packets:134004 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:15059502 (14.3 MiB)  TX bytes:42616759 (40.6 MiB)
          Interrupt:26 Base address:0x6000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:3621 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3621 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:394282 (385.0 KiB)  TX bytes:394282 (385.0 KiB)

root:~# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 00:1d:7d:d0:cb:ff brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.47/24 brd 192.168.1.255 scope global eth0
    inet6 fe80::21d:7dff:fed0:cbff/64 scope link
       valid_lft forever preferred_lft forever
3: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff

c:~$ cat /etc/hosts | grep -E -v '(^#)|(^$)'
127.0.0.1               localhost localhost.localdomain
192.168.1.47    CW8 CW8.<domain name hidden>
c:~$ cat /etc/nsswitch.conf | grep -E -v '(^#)|(^$)'
passwd:         compat
group:          compat
hosts:          files dns
networks:       files
services:       files
protocols:      files
rpc:            files
ethers:         files
netmasks:       files
netgroup:       files
bootparams:     files
automount:      files
aliases:        files
 
Old 12-15-2009, 09:08 AM   #4
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Rep: Reputation: 115Reputation: 115
Based on the files you show, it should find your hostname from your IP address via the /etc/hosts file, as well as find the IP address from your hostname. So I guess we have to rule that out unless some program somewhere isn't following the configuration (e.g. uses its own methods instead of the resolver library). So maybe something else is happening.

I'd try this next. Run "tcpdump -nnl -i eth0 -s 1536 dst port 53" in a separate terminal window then try to run oOO and see if anything is doing any DNS queries, and what they are querying. If you see some query happening, you might try to do it while connected to the internet for a comparison and see if a meaningful answer comes back.

If it's your host and/or IP address involved, then there is some rogue code doing the wrong thing. One option to deal with that is to run your own DNS cache/resolving server (e.g. BIND9) and configure it with whatever data you need (what is being queried). Change the /etc/resolv.conf file to use 127.0.0.1 as the nameserver.

If it's a different host and/or IP address, put those in your /etc/hosts file (naming some other local IP address so you can track down what it's trying to do ... to verify it is not something sneaky that shouldn't be doing this).
 
1 members found this post helpful.
Old 12-15-2009, 10:07 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Original Poster
Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Thanks some more Skaperen
Quote:
Originally Posted by Skaperen View Post
I'd try this next. Run "tcpdump -nnl -i eth0 -s 1536 dst port 53" in a separate terminal window then try to run oOO and see if anything is doing any DNS queries, and what they are querying. If you see some query happening, you might try to do it while connected to the internet for a comparison and see if a meaningful answer comes back.
Nice technique, good to learn about it

For ease, I did it while connected to the Internet and your hunch is right; opening an OOo document results in DNS queries to resolve the local machine name:
Code:
root:~# tcpdump -nnl -i eth0 -s 1536 dst port 53
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 1536 bytes
[nothing more until opening an OOo document when ...]
21:03:51.416688 IP 192.168.1.47.62312 > 218.248.240.180.53: 44135+ A? CW8.(none). (28)
21:03:51.465604 IP 192.168.1.47.2813 > 218.248.240.180.53: 46826+ A? CW8.(none). (28)
218.248.240.180 is one of the DNS servers configured locally.

Quote:
Originally Posted by Skaperen View Post
If it's your host and/or IP address involved, then there is some rogue code doing the wrong thing. One option to deal with that is to run your own DNS cache/resolving server (e.g. BIND9) and configure it with whatever data you need (what is being queried). Change the /etc/resolv.conf file to use 127.0.0.1 as the nameserver.

If it's a different host and/or IP address, put those in your /etc/hosts file (naming some other local IP address so you can track down what it's trying to do ... to verify it is not something sneaky that shouldn't be doing this).
Happily it is not anything sneaky.

dnsmasq is used locally for DNS caching
Code:
c:/etc$ cat dnsmasq.conf | grep -E -v '(^#)|(^$)'
domain-needed
bogus-priv
resolv-file=/etc/resolv.dnsmasq.conf
listen-address=127.0.0.1
listen-address=192.168.1.46
bogus-nxdomain=64.94.110.11
log-dhcp
c:/etc$ cat resolv.dnsmasq.conf | grep -E -v '(^#)|(^$)' | grep -E -v '(^#)|(^$)'
timeout:1       <== EDIT: this syntax is wrong!  Should be options timeout:1 
nameserver 61.1.96.69
nameserver 61.1.96.71
nameserver 61.1.96.72
nameserver 218.248.240.23
nameserver 218.248.240.135
nameserver 218.248.240.180
nameserver 218.248.240.181
nameserver 218.248.240.208
nameserver 218.248.255.139
nameserver 218.248.255.145
nameserver 218.248.255.146
192.168.1.46 is for a virtual machine.

I turned on dnsmasq logging and opened an OOo file again. tcpdump showed similar activity, this time to all its configured DNS servers, as is normal when dnsmasq is initialising (it seems to try them all to determine which is quickest).

dnsmasq uses /etc/hosts by default. This was confirmed by a line in /var/log/messages:
Code:
Dec 15 21:19:26 CW8 dnsmasq[8059]: read /etc/hosts - 2 addresses
The question has become "Why does dnsmasq not resolve CW8 from /etc/hosts?"

Last edited by catkin; 12-21-2009 at 11:01 AM. Reason: timeout as marked by EDIT
 
Old 12-15-2009, 10:47 AM   #6
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by catkin View Post
The question has become "Why does dnsmasq not resolve CW8 from /etc/hosts?"
I have not used dnsmasq, so I just briefly did an overview of the man page for it. The wording of a couple places suggests to me that even if an entry exists in /etc/hosts, it will do a DNS query anyway (going to the recursive server if it doesn't have such data in its cache already). It is more of a "shadow" feature to read /etc/hosts than it is a means to bypass the need to query DNS. Apparently it has to query DNS anyway just to see of there are alternate records like CNAME that change its behaviour. Read the man page and see if you can get anything else out of it that would apply to your situation. If there isn't a way to get it to do as your need to have done while not connected to the net, then you probably need a full DNS server like BIND. I've fudged DNS data for other hosts in BIND before, eliminating upstream DNS queries for those names.
 
1 members found this post helpful.
Old 12-15-2009, 12:45 PM   #7
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Rep: Reputation: 115Reputation: 115
The Wikipedia article on dnsmasq says it is supposed to do as you need ... have clients "time out" immediately when the network connection is down. I don't know if this is a behaviour that depends on dnsmasq actually knowing the network is down or not (they mention modem links which would allow it to detect that easily). Maybe it isn't detecting that in your case because you are an ethernet hop from the (not connected) network.

I'm going to try running dnsmasq on my network in the next few days and see how it behaves. I might want to use it.
 
Old 12-15-2009, 02:04 PM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Original Poster
Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Skaperen View Post
I have not used dnsmasq, so I just briefly did an overview of the man page for it. The wording of a couple places suggests to me that even if an entry exists in /etc/hosts, it will do a DNS query anyway (going to the recursive server if it doesn't have such data in its cache already). It is more of a "shadow" feature to read /etc/hosts than it is a means to bypass the need to query DNS. Apparently it has to query DNS anyway just to see of there are alternate records like CNAME that change its behaviour. Read the man page and see if you can get anything else out of it that would apply to your situation. If there isn't a way to get it to do as your need to have done while not connected to the net, then you probably need a full DNS server like BIND. I've fudged DNS data for other hosts in BIND before, eliminating upstream DNS queries for those names.
Thanks for researching it.

I did as you suggested, reconfigured dnsmasq accordingly and got the same result. So -- partly because I wasn't confident of having configured dnsmasq correctly and partly because the DNS server used was one of the two in resolv.conf rather than one of the other nine configured for dnsmasq -- I wondered if OOo was by-passing dnsmasq and did what I should have done in the first place (!), stopped dnsmasq and tried again -- with the same result.

The question has now become "Why is OOo not resolving CW8 from /etc/hosts?". Maybe that's how OOo is programmed.

Searching OpenOffice forum.org for DNS found some tantalisingly not-quite-similar problems but many were old. This was the closest reasonably recent one.

With dnsmasq not running, dig and nslookup can't resolve CW8 (not surprisingly -- their man pages say they work with DNS servers?) but ping can ...

Hoping for dnsmasq-sperts input I started a thread about configuring dnsmasq.
 
Old 12-15-2009, 07:20 PM   #9
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Rep: Reputation: 115Reputation: 115
It should resolve CW8 from /etc/hosts ... eventually. If that's what it was doing, then the goal is: eventually -> immediately. Even if the net is up, /etc/hosts should rule. That's its order in /etc/nsswitch.conf. You want files first (as do I), you should get files first. But seemingly it never resolves CW8 at all. Something is broken somewhere. I wonder if by some strange chance the fact that it is upper case causes this problem. It shouldn't since DNS is supposed to be case insensitive. But stranger things have been coded.

Yeah, expect dig and nslookup to fail when DNS fails ... they have a special job specific to DNS.

Interesting that in the linked oOO forum thread, the first post is the opposite problem.

Another wild thought along lines where I have had DNS-caused delays in the past (though not identical to this) is IPv6. Things to try:

1. Check that tcpdump for any "AAAA" queries.

2. Unconfigure IPv6 addresses from all interfaces. Resolver code could assume if an IPv6 address is up, it should also be queried.

3. Configure IPv6 addresses in the dnsmasq configuration and/or in /etc/hosts file (not sure if they need the [] around addresses there or not, but I think it should work with [] anyway).
 
1 members found this post helpful.
Old 12-16-2009, 03:43 AM   #10
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Original Poster
Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Thanks for all your help in this, Skaperen.

The problem is now solved, as you suggested, by configuring dnsmasq to serve local name resolution from the hosts file.

Quote:
Originally Posted by Skaperen View Post
It should resolve CW8 from /etc/hosts ... eventually. If that's what it was doing, then the goal is: eventually -> immediately. Even if the net is up, /etc/hosts should rule. That's its order in /etc/nsswitch.conf. You want files first (as do I), you should get files first. But seemingly it never resolves CW8 at all. Something is broken somewhere.
It was and I broke it -- in dnsmasq.conf by configuring no-resolv which disabled resolv-file=/etc/resolv.dnsmasq.conf thus leaving dnsmasq with only the two DNS servers in resolv.conf. This only became obvious when I ran netconfig (to change CW8 to cw8) and incidentally removed all DNS servers but 127.0.0.1 from resolv.conf. After fixing the dnsmasq.conf error and re-testing, tcpdump did not show any DNS queries so I changed the hostname back to CW8 and tcpdump still did not show any DNS queries
Quote:
Originally Posted by Skaperen View Post
Yeah, expect dig and nslookup to fail when DNS fails ... they have a special job specific to DNS.
Thanks for confirming.
 
Old 12-16-2009, 03:50 AM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Original Poster
Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Skaperen View Post
I'm going to try running dnsmasq on my network in the next few days and see how it behaves. I might want to use it.
You might well; the more I find out about dnsmasq the more I like the thorough way it's put together and the mailing list contributors are well with-it -- insofar as I can understand the net-speak. dnsmasq is easy to configure too, compared to other networking software (sendmail! BIND!).
 
Old 12-16-2009, 07:39 AM   #12
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Rep: Reputation: 115Reputation: 115
I find sendmail a nightmare to configure (I don't use it, anymore ... switched to Postfix) but I find BIND to be relatively simple (though the DNSSEC parts aren't so clear).
 
Old 12-16-2009, 08:19 AM   #13
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Original Poster
Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Skaperen View Post
I find sendmail a nightmare to configure (I don't use it, anymore ... switched to Postfix) but I find BIND to be relatively simple (though the DNSSEC parts aren't so clear).
Now I have to confess that I haven't actually configured BIND in any but the most trivial ways and then rarely but I got the O'Reilly book when I was a new and keen UNIX sysadm; just reading it made my head spin NIS on Solaris 7 (fogotten the version but it was a "new, improved, more generalised" one) was another one I found very, er, challenging.
 
  


Reply

Tags
internet, open, openoffice.org


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to open .doc file rahul_khare15 Linux - Newbie 2 11-07-2007 03:36 AM
Missing symbols in equations of .doc documents opened with OOo in FC4 JulianX Linux - Software 8 07-29-2006 05:59 AM
trouble finding policy doc as pdf in doc mirrors stardotstar Debian 2 05-12-2005 10:56 PM
Script to check Doc-BBB against Doc-AAA for inconsistence satimis Programming 2 11-09-2004 01:43 AM
Can't open a KWord doc WhiteTornado Linux - General 0 07-24-2003 09:15 PM


All times are GMT -5. The time now is 06:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration