Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre Companion

Notices

Reply
 
Thread Tools Search this Thread
Old 01-07-2018, 03:09 AM   #16
neural
Member
neural began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2018
Device: android tablet
ok, thanks. I'll delve into selinux a bit further, and will report back. Probably only get chance to look at this tomorrow, but I will definitely come back to the thread, encase this helps out others.

Thanks for the help thus far Charles!
neural is offline   Reply With Quote
Old 01-08-2018, 02:09 AM   #17
neural
Member
neural began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2018
Device: android tablet
Ok, report back:

I checked up on selinux. Doesn't seem to be the issue. I've checked the audit.log files, could see nothing in there relating to calibre or the port.

I then went and temporarily disabled selinux, but no luck connecting, see below:
Code:
[root@localhost audit]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      31
[root@localhost audit]# setenforce 0
[root@localhost audit]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      31
[root@localhost audit]# echo 0 > /s
sbin/ srv/  sys/
This has now truly flummoxed me...
neural is offline   Reply With Quote
Advert
Old 01-08-2018, 02:48 AM   #18
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: 12,364
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
To recapitulate what we now know:
  • You are running the distribution of calibre found on https://calibre-ebook.com/.
  • A telnet connection from the local machine fails to connect (timeout), meaning that the problem is not related to CC or the network.
  • Selinux has been removed as a possible culprit.
  • The firewall has been removed as a possible culprit.
  • The same port number (e.g., 8080) works for the content server but fails for the wireless device. This supports both the selinux and firewall assertions.
Given all of this, it should work.

I have one last idea: some USB device on your machine is confusing calibre, preventing or severely delaying its device detection from proceeding beyond it. This is an extremely rare problem, and traces of it would show up in a calibre log.

Try the following:
  • Run calibre's debug device detection (Preferences / Miscellaneous / Debug device detection and post the results. Also try to identify all the USB devices that calibre sees. Unplug any that you don't need to actually run the computer.
  • Check if calibre is failing to service the connections
    1. Run calibre in debug mode.
    2. Attempt to connect using telnet.
    3. Close calibre to get the debug log
    4. Check the debug log for "SMART_DEVICE" lines. There should be a line like (the 2 numbers in ( ) are time stamps):
      Code:
      SMART_DEV ( 186.17:184.139) run attempt to open device socket
      This means that calibre received the connection. Normally that line is followed by
      Code:
      SMART_DEV ( 704.58:  0.919) open
      However, if calibre is "confused" the second line won't be there because calibre's device system never told the wireless device driver to finish opening the connection.

      If the first line is not there then calibre did not receive the connection. At this point we are back in mystery-land.
  • Try the above test using the Android device
    1. Run calibre in debug mode.
    2. One the device, reset the Wireless Device to use defaults for IP and port
    3. Attempt to connect from the device.
    4. Close calibre to get the debug log
    5. Check the debug log for "SMART_DEVICE" lines. There should be lines like
      Code:
      SMART_DEV ( 700.65:473.867) run received broadcast ('localhost', ('192.168.130.5', 54982)) calibre wireless device client (on anteater);8080,9090
      SMART_DEV ( 703.65:  3.002) run attempt to open device socket
      The first line indicates that calibre received the "are you there" broadcast. The second is the actual connection.
    6. Email yourself a CC debug log. Near the bottom of the log you should see lines like the following:
      Code:
      2018-01-08 08:30:51.432:  WDConnection: Starting connect process
      2018-01-08 08:30:51.434:  WDConnection: isWiFiConnected returns true
      2018-01-08 08:30:51.493:  WDConnection: Broadcasting ...
      [...] (might be some unrelated lines here)
      2018-01-08 08:30:52.941:  WDConnection: MDNS ServiceAdded. name=calibre smart device client (on anteater port 9090), address=192.168.130.4, port=9090
      2018-01-08 08:30:54.803:  WDConnection: received broadcast response calibre wireless device client (on anteater);8080,9090, address 192.168.130.4
      2018-01-08 08:30:54.882:  Networking: identical mdns & broadcast host 192.168.130.4 9090
      2018-01-08 08:30:54.884:  WDConnection: using broadcast server address 192.168.130.4 port 9090
      Verify that the date and time make sense to be sure you are looking at the same connection attempt that is captured in the calibre log.
chaley is offline   Reply With Quote
Old 01-09-2018, 05:54 AM   #19
neural
Member
neural began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2018
Device: android tablet
Hi

I don't know what's happened, as nothing has changed, but somehow this morning when going through this, it's suddenly connected.
I tried the telnet option again, and this time, it got me in. Then tried connecting from the phone, but it still wouldn't let me connect. I then set the CC back to defaults, not specifying an IP, and BAM, I got in.

Thank you so much for the support, unfortunately we didn't get to see what was causing the issue, but as I said, for some reason, it seems to be working today, and nothing is different. Not that I'm complaining, just glad that it's up and running finally.

Thanks once again!
neural is offline   Reply With Quote
Old 01-09-2018, 07:06 AM   #20
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: 12,364
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I wonder if messing with the selinux settings changed/fixed something? Is there a USB device that was turned on but is now off?

In any event, glad it is working, and I hope it continues to work!
chaley is offline   Reply With Quote
Advert
Old 01-09-2018, 07:21 AM   #21
neural
Member
neural began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2018
Device: android tablet
Not sure. I tried with selinux enforced and permissive. It works with both on and off. So I'm also not sure what caused the sudden change to enable it to connect.

Thanks for the app once again
neural is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to connect to content server or as a wireless device without WiFi connected? Rattor Calibre Companion 6 08-05-2017 06:12 PM
found more than one calibre: smart device / wireless device? nikoski Calibre Companion 3 08-04-2016 05:23 AM
Connect Kobo Arc7 HD to Calibre as Wireless Device minidad2 Kobo Tablets 0 05-02-2015 02:31 PM
Cannot connect as "Wireless Device" mezme Calibre Companion 8 03-29-2014 06:44 AM
iLiad cannot connect to the net either wire,wireless (no encription) or wireless(with encr) tely iRex 5 04-24-2010 09:27 PM


All times are GMT -4. The time now is 06:59 AM.


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