Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-15-2011, 06:08 AM   #1
forceps
Enthusiast
forceps doesn't litterforceps doesn't litter
 
Posts: 26
Karma: 168
Join Date: May 2005
Location: Wuhan, China
Device: Kindle DXG
ERROR: No internet connection on Linux

The message:
calibre, version 0.7.49
ERROR: No internet connection: Cannot download news as no internet connection is active

the linux box is running Debian Squeeze, network interfaces are brought up by /etc/network/interfaces instead of Gnome NetworkManager. Calibre works fine when the internet is connected via a home router. But when the linux box dial up ADSL directly using pon command, Calibre stopped fetching news and gave the above error message. in the meantime, the command line ebook-convert still works.

I guess it relate to calibre.utils.network.LinuxNetworkStatus(), any ideas?
forceps is offline   Reply With Quote
Old 03-15-2011, 06:17 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,738
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Are you asking how to change the code yourself to fix this, or that someone else fix it?
chaley is offline   Reply With Quote
Advert
Old 03-15-2011, 08:33 AM   #3
forceps
Enthusiast
forceps doesn't litterforceps doesn't litter
 
Posts: 26
Karma: 168
Join Date: May 2005
Location: Wuhan, China
Device: Kindle DXG
I use dbus-inspector play around with dbus for a while, can not figure out how to change the code, since there seems no way to check a connection by inspect dbus if the connection is not bring up by NetworkManager. It is also very strange that calibre's fetching works before switch to pon command.

After go through /etc/network/interfaces again, I find it had been modified by NetworkManager for quite a while, so I am *using* NetworkManager all along, although there is no NetworkManager gnome applet running.

After disable the NetworkManager daemon, calibre start fetching news again. So it is either let NetworkManager manage network interface, or disable it completely, otherwise, calibre will have trouble to figure out internet connection status when it look up dbus.
forceps is offline   Reply With Quote
Old 03-15-2011, 09:07 AM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,738
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Moderator Notice
Moved to appropriate forum
chaley is offline   Reply With Quote
Old 03-15-2011, 12:00 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you are not using network manager to manage your connection, then shut it down. If calibre detects no network manager it does not do connection checking.
kovidgoyal is offline   Reply With Quote
Advert
Old 03-25-2011, 06:30 PM   #6
CuriousGrrl
Kindle lover/Linux user
CuriousGrrl began at the beginning.
 
Posts: 23
Karma: 16
Join Date: Jan 2011
Device: Kindle 2i
I had the same problem (I run Ubuntu 10.10). I fixed it by running "sudo apt-get remove network-manager-gnome"
CuriousGrrl is offline   Reply With Quote
Old 04-25-2011, 06:51 PM   #7
sgtrock
Member
sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.
 
Posts: 20
Karma: 11190
Join Date: Mar 2011
Device: various
Kovid, when are you going to resolve this issue correctly? Depending upon Network Manager is silly when there are any number of better ways to determine whether or not a network connection is active.

For that matter, why are you attempting to do network detection in the first place? Just let the OS tell you if it can't forward on a packet. That's what the standard TCP/IP stack is designed to do. Your app is WAY too high up the stack to be making accurate assessments about the network and physical layer.
sgtrock is offline   Reply With Quote
Old 04-25-2011, 08:20 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Never. And I am not going to explain to you why. If you think you know how to "do this correctly" in a way that will actually work on more than your own linux setup, feel free to submit a patch.
kovidgoyal is offline   Reply With Quote
Old 04-25-2011, 08:59 PM   #9
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by sgtrock View Post
Kovid, when are you going to resolve this issue correctly? Depending upon Network Manager is silly when there are any number of better ways to determine whether or not a network connection is active.
I would love to here these better ways. Especially considering how other network aware apps such as Pidgin use NetworkManager for this very same thing.
user_none is offline   Reply With Quote
Old 04-29-2011, 11:17 PM   #10
sgtrock
Member
sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.sgtrock can tame squirrels without the assistance of a chair or a whip.
 
Posts: 20
Karma: 11190
Join Date: Mar 2011
Device: various
Sorry if I struck a nerve. That wasn't my intent at all.

Seriously, though. Why are you trying to determine network state using Network Manager? Since a good deal of your code seems to be in Python, shouldn't you be using the built-in, OS transparent tool set that comes with it instead? For example, from my copy of "Foundations of Python Network Programming" by John Goerzen:

Code:
#!/usr/bin/env python
# Simple server -Chapter 1 - server.py
import socket

host = ''        # Bind to all interfaces
port = 51423

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

...

etc. ad nauseum
That code is portable across virtually any platform that Python runs on. About the only thing that would have to change is the top line. Similar snippets abound for virtually any language that you care to name.

Take a piece of well intentioned advice from a battle scarred veteran with three plus decades of experience doing network design, admin, and support: You really don't want to write OS specific code if at all possible. It's guaranteed to get you into trouble sooner rather than later. Trust me, you'll be a lot happier if you re-factor your networking code to get rid of any OS discovery/special handling that you may have written.

Still aren't convinced? Ask yourself this: Just how much OS specific code is in the Apache source code? OpenLDAP? PHP? Postgres? Mysql? How much of that OS specific code is geared toward solving networking issues?

Last edited by sgtrock; 04-29-2011 at 11:20 PM.
sgtrock is offline   Reply With Quote
Old 04-29-2011, 11:22 PM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The point is not to determine if a network interface is up, the point is to determine if the user has enabled his internet connection. And this is so that the news scheduler can suspend itself until the user re-enables the network connection. Otherwise scheduled downloads will fail and the scheduler will give up on them for the day.

If you dont want to use networkmanager, simply disable/uninstall it, then calibre will not use it to check for anything.

And I have no idea what you believe the code you've posted will accomplish? It will work even if only the loopback interface is up.
kovidgoyal is offline   Reply With Quote
Old 10-13-2013, 07:37 AM   #12
spinningdoc
Junior Member
spinningdoc began at the beginning.
 
Posts: 9
Karma: 10
Join Date: May 2011
Device: Non
I know I'm resurrecting a thread, but it's relevant.

I'm using Linux Mint (IE effectively Ubuntu) and getting the same 'not connected to the internet error'. If I remove Network Manager, will it mess up other programs such as Pidgin?
spinningdoc is offline   Reply With Quote
Old 10-14-2013, 12:26 AM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If it does cause problems, simply re-install it.
kovidgoyal is offline   Reply With Quote
Old 10-15-2013, 11:21 AM   #14
spinningdoc
Junior Member
spinningdoc began at the beginning.
 
Posts: 9
Karma: 10
Join Date: May 2011
Device: Non
Thanks for the reply. You're saying that Calibre can't work if Ubuntu needs Network Manager, in effect.

I'm sticking with Network Manager as I don't have the time or technical nous to risk having to sort out my net connection. I'll just have to live with Calibre not working properly till this bug is fixed.
spinningdoc is offline   Reply With Quote
Old 10-15-2013, 11:25 AM   #15
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,790
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by spinningdoc View Post
Thanks for the reply. You're saying that Calibre can't work if Ubuntu needs Network Manager, in effect.

I'm sticking with Network Manager as I don't have the time or technical nous to risk having to sort out my net connection. I'll just have to live with Calibre not working properly till this bug is fixed.
He is not saying WON'T. May not.
And Calibre does work with NM on some systems. This appears to be a distro module combination compatibility issue, not a 'bug'
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] ubuntu 0.6.46 ERROR: No internet connection bigreat Calibre 16 04-09-2013 06:03 PM
No internet connection the_dave Calibre 0 03-03-2011 01:03 PM
Error: No Internet connection fueg0 Calibre 9 10-08-2010 04:02 AM
ERROR: No internet connection nicois Calibre 3 09-20-2010 11:07 AM
Wireless internet connection frustrating IDS connection Socrates iRex 8 10-21-2009 12:46 PM


All times are GMT -4. The time now is 08:14 PM.


MobileRead.com is a privately owned, operated and funded community.