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-03-2018, 03:29 AM   #1
neural
Member
neural began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2018
Device: android tablet
Can't connect as Wireless Device

Hi All

I'm using the latest Calibre, downloaded and installed twice from their site - just to make sure it wasn't that. Running Fedora, and using CC on android 8.0.
I've set up my settings to use a specific port, as I wasn't getting any luck with the automatic settings. The content server works fine, but no matter what I do, I can't get the wireless device connection to work.

I've made sure the ports are open, and I've also run tcpdump on the linux machine. I can see that my machine is getting communication from the android CC. see below:
Code:
ant@localhost ~ % sudo tcpdump -i wlp3s0 port 9091
[sudo] password for ant: 
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlp3s0, link-type EN10MB (Ethernet), capture size 262144 bytes
10:13:13.984919 IP 192.168.88.253.41022 > localhost.localdomain.xmltec-xmlmail: Flags [S], seq 614907168, win 65535, options [mss 1460,sackOK,TS val 101276768 ecr 0,nop,wscale 8], length 0
10:13:15.013294 IP 192.168.88.253.41022 > localhost.localdomain.xmltec-xmlmail: Flags [S], seq 614907168, win 65535, options [mss 1460,sackOK,TS val 101277069 ecr 0,nop,wscale 8], length 0
10:13:17.056866 IP 192.168.88.253.41022 > localhost.localdomain.xmltec-xmlmail: Flags [S], seq 614907168, win 65535, options [mss 1460,sackOK,TS val 101277670 ecr 0,nop,wscale 8], length 0
10:13:37.229616 IP 192.168.88.253.41026 > localhost.localdomain.xmltec-xmlmail: Flags [S], seq 3039734056, win 65535, options [mss 1460,sackOK,TS val 101283726 ecr 0,nop,wscale 8], length 0
10:13:38.169647 IP 192.168.88.253.41026 > localhost.localdomain.xmltec-xmlmail: Flags [S], seq 3039734056, win 65535, options [mss 1460,sackOK,TS val 101284027 ecr 0,nop,wscale 8], length 0
10:13:40.096978 IP 192.168.88.253.41026 > localhost.localdomain.xmltec-xmlmail: Flags [S], seq 3039734056, win 65535, options [mss 1460,sackOK,TS val 101284628 ecr 0,nop,wscale 8], length 0
.
Still not getting connection, so could be that it's something from Calibre's side.
I'm attaching my debug's from Calibre and CC. Within cc, I tried to connect to wireless - it failed, then connected to content server - which works, then tried again to wireless and it failed.

If someone can help I would be very grateful.

Thanks
Attached Files
File Type: txt calibre.companion.debug.log.txt (362.7 KB, 318 views)
File Type: txt calibre.txt (1.3 KB, 321 views)
neural is offline   Reply With Quote
Old 01-03-2018, 06:52 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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Looking at calibre log I see:
  • Calibre connects successfully to the wireless device network socket.
  • Calibre did not see any attempt to connect on that socket.
  • Calibre did not see any "are you there" broadcasts.

Looking at the CC log I see:
  • CC "sees" calibre's MDNS (bonjour) advertisements.
  • Sometimes when connecting, CC "sees" multiple bonjour advertisements. This shouldn't happen. Do you have multiple instances of calibre running?
  • Starting at 2018-01-03 09:25:32, CC sees calibre's wireless device UDP broadcast response but fails to connect (TCP) to the supplied IP address. This strongly implies a firewall problem.
  • Some connection attempts fail with "no route to host". Others fail with a timeout. I don't know why that would happen.

Given the above, all I can say with certainty is that something is preventing CC from connecting to calibre. Exactly what the "something" is I cannot say, but it "smells" like a firewall somewhere.

Questions:
  • Are TCP connections to port 9091 allowed through your firewall?
  • Does your home router have any filtering set up?
  • What happens if you turn off the content server in calibre then change the WD port to 8080?
  • Do you have any intrusion detection software running on your Linux box?
  • I note from your tcpdump that port 9091 is identified as xmltec-xmlmail. Do you have any sort of auto-start based on port numbers? What happens if you set the calibre WD port to something bizarre (and unassigned) such as 14802?
chaley is offline   Reply With Quote
Advert
Old 01-04-2018, 04:00 AM   #3
neural
Member
neural began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2018
Device: android tablet
Hi Chaley

Thanks for getting back to me, really is appreciated.

I will answer your questions so that we can try to resolve this:
Quote:
Are TCP connections to port 9091 allowed through your firewall?
Yes, I had opened up that on the linux machine. *** At the moment my firewall on the laptop is down completely:
Code:
ant@localhost ~ % sudo ufw status
Status: inactive
Quote:
Does your home router have any filtering set up?
Not as far as I'm aware. Using a mikrotik router, but the entire setup is working in bridge mode, as in the whole lan should not be filtered or anything, all comms are allowed to pass. I went as far as disabling all the rules on the mikrotik, still to no avail.

Quote:
What happens if you turn off the content server in calibre then change the WD port to 8080?
Tried this, and it's currently on that port setting; not working.

Quote:
Do you have any intrusion detection software running on your Linux box?
No, I've installed nothing on this machine, no snort etc etc.
Quote:
I note from your tcpdump that port 9091 is identified as xmltec-xmlmail. Do you have any sort of auto-start based on port numbers? What happens if you set the calibre WD port to something bizarre (and unassigned) such as 14802?
I think that's just the "standard" port numbering that is held with tcpdump. It's just resolving numbers to names. I did try on port 14802, and still nothing.


I also did a dump of a torch running on the router, it shows what's going through:
Code:
[admin@MikroTik] /tool> torch bridge src-address=192.168.88.253/32 ip-protocol=any freeze-frame-interval=8s
MAC-PROTOCOL    IP-PROTOCOL SRC-ADDRESS                                                                                                                                                                  TX         RX TX-PACKETS RX-PACKETS
ip              igmp        192.168.88.253                                                                                                                                                             0bps       0bps          0          0
ip              udp         192.168.88.253                                                                                                                                                             0bps     824bps          0          1
ipv6            udp                                                                                                                                                                                    0bps       0bps          0          0
                                                                                                                                                                                                       0bps     824bps          0          1
-- [Q quit|D dump|C-z continue]
This next one is from the linux machine, and seems to show that the data is coming through:
Code:
ant@localhost ~ % sudo tcpdump -v -nn -i wlp3s0 src 192.168.88.253 or dst 192.168.88.253
tcpdump: listening on wlp3s0, link-type EN10MB (Ethernet), capture size 262144 bytes
10:32:32.415537 IP (tos 0x0, ttl 64, id 17773, offset 0, flags [DF], proto UDP (17), length 37)
    192.168.88.253.54982 > 255.255.255.255.54982: UDP, length 9
10:32:32.416451 IP (tos 0x0, ttl 64, id 17775, offset 0, flags [DF], proto UDP (17), length 37)
    192.168.88.253.48123 > 255.255.255.255.48123: UDP, length 9
10:32:32.417921 IP (tos 0x0, ttl 64, id 17776, offset 0, flags [DF], proto UDP (17), length 37)
    192.168.88.253.39001 > 255.255.255.255.39001: UDP, length 9
10:32:32.418826 IP (tos 0x0, ttl 64, id 17777, offset 0, flags [DF], proto UDP (17), length 37)
    192.168.88.253.44044 > 255.255.255.255.44044: UDP, length 9
10:32:32.419849 IP (tos 0x0, ttl 64, id 17778, offset 0, flags [DF], proto UDP (17), length 37)
    192.168.88.253.59678 > 255.255.255.255.59678: UDP, length 9
10:32:33.011204 IP (tos 0x0, ttl 64, id 6413, offset 0, flags [DF], proto UDP (17), length 83)
    192.168.88.251.54982 > 192.168.88.253.54982: UDP, length 55
10:32:33.033724 IP (tos 0x0, ttl 255, id 2768, offset 0, flags [DF], proto UDP (17), length 79)
    192.168.88.253.5353 > 224.0.0.251.5353: 0 PTR (QM)? _calibresmartdeviceapp._tcp.local. (51)
10:32:33.036114 IP (tos 0x0, ttl 255, id 2769, offset 0, flags [DF], proto UDP (17), length 79)
    192.168.88.253.5353 > 224.0.0.251.5353: 0 PTR (QM)? _calibresmartdeviceapp._tcp.local. (51)
10:32:35.337139 IP (tos 0x0, ttl 64, id 12654, offset 0, flags [DF], proto TCP (6), length 60)
    192.168.88.253.46273 > 192.168.88.251.8080: Flags [S], cksum 0x3077 (correct), seq 3573462255, win 65535, options [mss 1460,sackOK,TS val 8226177 ecr 0,nop,wscale 8], length 0
10:32:36.369294 IP (tos 0x0, ttl 64, id 12655, offset 0, flags [DF], proto TCP (6), length 60)
    192.168.88.253.46273 > 192.168.88.251.8080: Flags [S], cksum 0x2f4a (correct), seq 3573462255, win 65535, options [mss 1460,sackOK,TS val 8226478 ecr 0,nop,wscale 8], length 0
10:32:38.245672 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.88.253 tell 192.168.88.251, length 28
10:32:38.306012 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.88.253 is-at 44:80:eb:1d:60:ef, length 28
10:32:38.346543 IP (tos 0x0, ttl 64, id 12656, offset 0, flags [DF], proto TCP (6), length 60)
    192.168.88.253.46273 > 192.168.88.251.8080: Flags [S], cksum 0x2cf0 (correct), seq 3573462255, win 65535, options [mss 1460,sackOK,TS val 8227080 ecr 0,nop,wscale 8], length 0
10:32:40.455618 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.88.251 tell 192.168.88.253, length 28
10:32:40.455648 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.88.251 is-at 34:e6:ad:b2:2d:3e, length 28
This is really confusing, If you have other suggestions, or what I could look at more specifically, let me know, and I will try.

Thanks
neural is offline   Reply With Quote
Old 01-04-2018, 07:10 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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by neural View Post
This next one is from the linux machine, and seems to show that the data is coming through:
Code:
ant@localhost ~ % sudo tcpdump -v -nn -i wlp3s0 src 192.168.88.253 or dst 192.168.88.253
tcpdump: listening on wlp3s0, link-type EN10MB (Ethernet), capture size 262144 bytes
10:32:32.415537 IP (tos 0x0, ttl 64, id 17773, offset 0, flags [DF], proto UDP (17), length 37)
    192.168.88.253.54982 > 255.255.255.255.54982: UDP, length 9
10:32:32.416451 IP (tos 0x0, ttl 64, id 17775, offset 0, flags [DF], proto UDP (17), length 37)
    192.168.88.253.48123 > 255.255.255.255.48123: UDP, length 9
10:32:32.417921 IP (tos 0x0, ttl 64, id 17776, offset 0, flags [DF], proto UDP (17), length 37)
    192.168.88.253.39001 > 255.255.255.255.39001: UDP, length 9
10:32:32.418826 IP (tos 0x0, ttl 64, id 17777, offset 0, flags [DF], proto UDP (17), length 37)
    192.168.88.253.44044 > 255.255.255.255.44044: UDP, length 9
10:32:32.419849 IP (tos 0x0, ttl 64, id 17778, offset 0, flags [DF], proto UDP (17), length 37)
    192.168.88.253.59678 > 255.255.255.255.59678: UDP, length 9
10:32:33.011204 IP (tos 0x0, ttl 64, id 6413, offset 0, flags [DF], proto UDP (17), length 83)
    192.168.88.251.54982 > 192.168.88.253.54982: UDP, length 55
10:32:33.033724 IP (tos 0x0, ttl 255, id 2768, offset 0, flags [DF], proto UDP (17), length 79)
    192.168.88.253.5353 > 224.0.0.251.5353: 0 PTR (QM)? _calibresmartdeviceapp._tcp.local. (51)
10:32:33.036114 IP (tos 0x0, ttl 255, id 2769, offset 0, flags [DF], proto UDP (17), length 79)
    192.168.88.253.5353 > 224.0.0.251.5353: 0 PTR (QM)? _calibresmartdeviceapp._tcp.local. (51)
10:32:35.337139 IP (tos 0x0, ttl 64, id 12654, offset 0, flags [DF], proto TCP (6), length 60)
    192.168.88.253.46273 > 192.168.88.251.8080: Flags [S], cksum 0x3077 (correct), seq 3573462255, win 65535, options [mss 1460,sackOK,TS val 8226177 ecr 0,nop,wscale 8], length 0
10:32:36.369294 IP (tos 0x0, ttl 64, id 12655, offset 0, flags [DF], proto TCP (6), length 60)
    192.168.88.253.46273 > 192.168.88.251.8080: Flags [S], cksum 0x2f4a (correct), seq 3573462255, win 65535, options [mss 1460,sackOK,TS val 8226478 ecr 0,nop,wscale 8], length 0
10:32:38.245672 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.88.253 tell 192.168.88.251, length 28
10:32:38.306012 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.88.253 is-at 44:80:eb:1d:60:ef, length 28
10:32:38.346543 IP (tos 0x0, ttl 64, id 12656, offset 0, flags [DF], proto TCP (6), length 60)
    192.168.88.253.46273 > 192.168.88.251.8080: Flags [S], cksum 0x2cf0 (correct), seq 3573462255, win 65535, options [mss 1460,sackOK,TS val 8227080 ecr 0,nop,wscale 8], length 0
10:32:40.455618 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.88.251 tell 192.168.88.253, length 28
10:32:40.455648 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.88.251 is-at 34:e6:ad:b2:2d:3e, length 28
What this shows is CC's UPD "are you there" broadcasts getting through to calibre. The first 5 lines are CC trying "random" ports. The 6th line is calibre's wireless device answering. The next few lines are (I think) CC asking bonjour for an address and calibre answering. We then see two lines (plus some ARPs) where CC attempts to open a TCP connection to calibre. The connection is not created and calibre never responds. And of course that is the problem.
Quote:
This is really confusing, If you have other suggestions, or what I could look at more specifically, let me know, and I will try.

Thanks
I have one more idea. There could be some IPv6 thing happening where calibre is getting confused about what interface it is listening on. The wireless device (WD) does not work with v6.

By default the WD listens on all interfaces. You can tell the WD to listen on a specific interface by going to calibre / Preferences / Plugins, searching for SmartDevice, then pressing "Customize plugin". Enter the v4 IP address of the calibre computer into the "Use this IP address" box.
chaley is offline   Reply With Quote
Old 01-04-2018, 06:01 PM   #5
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,082
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
What kernel are you using?

see:
https://www.mobileread.com/forums/sh....php?p=3509988

bernie
gbm is offline   Reply With Quote
Advert
Old 01-05-2018, 08:04 AM   #6
neural
Member
neural began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2018
Device: android tablet
Hi Guys

Sorry for the late response, but I've been away.

Chaley, I did your suggestion, but it does not appear to help. It's a strange one indeed!

Bernie - thanks for the link. I looked through there and it could possibly be something low level like this. I don't have any USB devices as such plugged into the system, just a hub, and my keyboard/mouse dongle, see below:
Code:
ant@localhost ~log % calibre-debug -d
calibre 3.14  embedded-python: True is64bit: True
Linux-4.13.16-100.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five Linux ('64bit', 'ELF')
('Linux', '4.13.16-100.fc25.x86_64', '#1 SMP Mon Nov 27 19:52:46 UTC 2017')
Python 2.7.12
Linux: ('Fedora', '25', 'Twenty Five')
Interface language: None
USB devices on system:
[['0xbda', '0x129', '0x3960', u'Generic', u'USB2.0-CRW', u'20100201396000000'],
 ['0x46d', '0xc52b', '0x2401', u'Logitech', u'USB Receiver', u''],
 ['0x5986',
  '0x670',
  '0x4252',
  u'Bison',
  u'Lenovo EasyCamera',
  u'200901010001'],
 ['0x8087', '0x7dc', '0x1', u'', u'', u'']]

No disabled plugins
Looking for devices of type: MTP_DEVICE
No MTP devices connected to system
 
Looking for devices of type: SMART_DEVICE_APP
All IP addresses {'lo': [{'addr': '127.0.0.1', 'netmask': '255.0.0.0', 'peer': '127.0.0.1'}], 'wlp3s0': [{'addr': '192.168.88.251', 'broadcast': '192.168.88.255', 'netmask': '255.255.255.0'}]}
No device is connected
 
Looking for devices...
 
Devices possibly connected: None 
ant@localhost ~log % uname -a
Linux localhost.localdomain 4.13.16-100.fc25.x86_64 #1 SMP Mon Nov 27 19:52:46 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
I see that they mentioned in that post, that Fedora could be an issue. I'm currently on Fedora 25, as can be seen in the code snippet.

I thought I'd try removing the usb hub, and check, but still no joy.

Thanks guys for your suggestions in trying to sort this out, it really means a lot to me.
neural is offline   Reply With Quote
Old 01-05-2018, 08:24 AM   #7
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I just thought of another diagnostic aid -- trying to connect to the WD client from the linux host. Start calibre, then in a terminal window try
Code:
telnet 127.0.0.1 9090 (or whatever your port is)
The connect should succeed and you should see something like this
Code:
860[9, {"pubdateFormat": "dd MMM yyyy", "currentLibraryUUID": 
"05584da8-8c69-4938-874b-3845d2c85c69", "canSupportUpdateBooks": true, 
"calibre_version": [3, 13, 0], "validExtensions": ["lrf", "rar", "zip", "rtf", 
"lit", "txt", "txtz", "text", "htm", "xhtm", "html", "htmlz", "xhtml", "pdf", 
"pdb", "updb", "pdr", "prc", "mobi", "azw", "doc", "epub", "fb2", "djv", 
"djvu", "lrx", "cbr", "cbz", "cbc", "oebzip", "rb", "imp", "odt", "chm", "tpz", 
"azw1", "pml", "pmlz", "mbp", "tan", "snb", "xps", "oxps", "azw4", "book", 
"zbf", "pobi", "docx", "docm", "md", "textile", "markdown", "ibook", "ibooks", 
"iba", "azw3", "ps", "kepub", "kfx", "fooper", " gorp"], "timestampFormat": 
"dd MMM yyyy", "canSupportLpathChanges": true, "passwordChallenge": "", 
"currentLibraryName": "Library.test_small", "serverProtocolVersion": 1, 
"lastModifiedFormat": "dd MMM yyyy hh:mm:ss"}]
If you don't then the problem is local to the Linux machine.

You can also try connecting to the visible IP address: 192.168.88.251

If these work then you can try the same thing from your WiFi router. My guess is that this won't work.

If that works then try it from your Android device.
chaley is offline   Reply With Quote
Old 01-05-2018, 08:37 AM   #8
neural
Member
neural began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2018
Device: android tablet
Hi Charles

Yes, you are correct, they don't seem to work. I tried a few variations, see below:
Code:
1 ant@localhost ~log % telnet localhost 14208                                                                                                                                                                                             :(
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
1 ant@localhost ~log %                                                                                                                                                                                                                    :(
1 ant@localhost ~log % telnet 192.168.88.251 14208                                                                                                                                                                                        :(
Trying 192.168.88.251...
^C
130 ant@localhost ~log % telnet 127.0.0.1 14208                                                                                                                                                                                           :(
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
1 ant@localhost ~log % netstat -nl|grep 14208                                                                                                                                                                                             :(
tcp        0      0 192.168.88.251:14208    0.0.0.0:*               LISTEN
Current port I'm testing on is 14208 as can be seen
neural is offline   Reply With Quote
Old 01-05-2018, 08:41 AM   #9
neural
Member
neural began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2018
Device: android tablet
This would seem that calibre has opened the port, but it seems to be refusing connections. Would you have an idea why though? As mentioned my firewall is off, but testing from the same machine would bypass that?
neural is offline   Reply With Quote
Old 01-05-2018, 08:56 AM   #10
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by neural View Post
This would seem that calibre has opened the port, but it seems to be refusing connections. Would you have an idea why though? As mentioned my firewall is off, but testing from the same machine would bypass that?
Firewalls can monitor all connections: into a machine, out of a machine, or within a machine.

As for why: a user-space program can ignore a connection but it can't refuse a connection. Only the kernel does that. As such, it does seem like some sort a firewall is still running. Unfortunately I am not familiar enough with selinux, fedora, etc to be of much help.

You might try running iptables -L to see if there is anything obvious. If there is then you need to work out what part of the system put it there.

NB: if the add-the-IP-address change to the WD parameters is still there then connections to 127.0.0.1 won't work because calibre isn't listening on the local interface.
chaley is offline   Reply With Quote
Old 01-05-2018, 09:10 AM   #11
neural
Member
neural began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2018
Device: android tablet
Thanks for that, I'm pretty well versed in computers, but not so much as you!

Ok, was going to check the iptables, but have a weird porblem now, as my sudo won't work all of a sudden. Let me tinker around a bit more, and I'll report back.
neural is offline   Reply With Quote
Old 01-05-2018, 09:27 AM   #12
neural
Member
neural began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2018
Device: android tablet
Ok, for some strange reason, must have been a tab thing. Opened new mate terminal tab, and sudo working again:

Herewith the iptables:
Code:
ant@localhost ~ % sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ufw-before-logging-input  all  --  anywhere             anywhere            
ufw-before-input  all  --  anywhere             anywhere            
ufw-after-input  all  --  anywhere             anywhere            
ufw-after-logging-input  all  --  anywhere             anywhere            
ufw-reject-input  all  --  anywhere             anywhere            
ufw-track-input  all  --  anywhere             anywhere            

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ufw-before-logging-forward  all  --  anywhere             anywhere            
ufw-before-forward  all  --  anywhere             anywhere            
ufw-after-forward  all  --  anywhere             anywhere            
ufw-after-logging-forward  all  --  anywhere             anywhere            
ufw-reject-forward  all  --  anywhere             anywhere            
ufw-track-forward  all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
ufw-before-logging-output  all  --  anywhere             anywhere            
ufw-before-output  all  --  anywhere             anywhere            
ufw-after-output  all  --  anywhere             anywhere            
ufw-after-logging-output  all  --  anywhere             anywhere            
ufw-reject-output  all  --  anywhere             anywhere            
ufw-track-output  all  --  anywhere             anywhere            

Chain ufw-after-forward (1 references)
target     prot opt source               destination         

Chain ufw-after-input (1 references)
target     prot opt source               destination         

Chain ufw-after-logging-forward (1 references)
target     prot opt source               destination         

Chain ufw-after-logging-input (1 references)
target     prot opt source               destination         

Chain ufw-after-logging-output (1 references)
target     prot opt source               destination         

Chain ufw-after-output (1 references)
target     prot opt source               destination         

Chain ufw-before-forward (1 references)
target     prot opt source               destination         

Chain ufw-before-input (1 references)
target     prot opt source               destination         

Chain ufw-before-logging-forward (1 references)
target     prot opt source               destination         

Chain ufw-before-logging-input (1 references)
target     prot opt source               destination         

Chain ufw-before-logging-output (1 references)
target     prot opt source               destination         

Chain ufw-before-output (1 references)
target     prot opt source               destination         

Chain ufw-reject-forward (1 references)
target     prot opt source               destination         

Chain ufw-reject-input (1 references)
target     prot opt source               destination         

Chain ufw-reject-output (1 references)
target     prot opt source               destination         

Chain ufw-track-forward (1 references)
target     prot opt source               destination         

Chain ufw-track-input (1 references)
target     prot opt source               destination         

Chain ufw-track-output (1 references)
target     prot opt source               destination         
ant@localhost ~ %
As noted before UFW is disabled:
Code:
ant@localhost ~ % sudo ufw status
Status: inactive
I decided to flush all chains just to be sure:
Code:
ant@localhost ~ % sudo iptables -F 
ant@localhost ~ % sudo iptables -L 
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain ufw-after-forward (0 references)
target     prot opt source               destination         

Chain ufw-after-input (0 references)
target     prot opt source               destination         

Chain ufw-after-logging-forward (0 references)
target     prot opt source               destination         

Chain ufw-after-logging-input (0 references)
target     prot opt source               destination         

Chain ufw-after-logging-output (0 references)
target     prot opt source               destination         

Chain ufw-after-output (0 references)
target     prot opt source               destination         

Chain ufw-before-forward (0 references)
target     prot opt source               destination         

Chain ufw-before-input (0 references)
target     prot opt source               destination         

Chain ufw-before-logging-forward (0 references)
target     prot opt source               destination         

Chain ufw-before-logging-input (0 references)
target     prot opt source               destination         

Chain ufw-before-logging-output (0 references)
target     prot opt source               destination         

Chain ufw-before-output (0 references)
target     prot opt source               destination         

Chain ufw-reject-forward (0 references)
target     prot opt source               destination         

Chain ufw-reject-input (0 references)
target     prot opt source               destination         

Chain ufw-reject-output (0 references)
target     prot opt source               destination         

Chain ufw-track-forward (0 references)
target     prot opt source               destination         

Chain ufw-track-input (0 references)
target     prot opt source               destination         

Chain ufw-track-output (0 references)
target     prot opt source               destination         
ant@localhost ~ %
Then I tried again:
Code:
1 ant@localhost ~ % telnet 192.168.88.251 14208                                                                                                                                                                                           :(
Trying 192.168.88.251...
telnet: connect to address 192.168.88.251: Connection timed out
neural is offline   Reply With Quote
Old 01-05-2018, 12:37 PM   #13
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Some random questions (I am well and truly running out of ideas):
  • Does telnet 192.168.88.251 to the calibre content content server port work? If not then the telnet test isn't giving useful information.
  • What does ipconfig -a give for the 192.168.88.251 interface?
  • What does netstat -nltp give? In particular I am looking for any different between the content server and the WD listen sockets.
  • With the same netstat as above, is calibre the program doing the listens?
  • What does /usr/sbin/getenforce return? I am wondering about whether selinux could be part of the problem. This is very much a shot in the dark.
chaley is offline   Reply With Quote
Old 01-06-2018, 04:07 AM   #14
neural
Member
neural began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2018
Device: android tablet
Yes, telnet to the content server works correctly.

Herewith the ifconfig:
Code:
ant@localhost ~ % ifconfig -a
enp2s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether f0:76:1c:b1:7c:19  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 379  bytes 29729 (29.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 379  bytes 29729 (29.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.88.251  netmask 255.255.255.0  broadcast 192.168.88.255
        inet6 fe80::f6b8:ee4:3bcc:a6d7  prefixlen 64  scopeid 0x20<link>
        ether 34:e6:ad:b2:2d:3e  txqueuelen 1000  (Ethernet)
        RX packets 2491407  bytes 2466726022 (2.2 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1910442  bytes 510027292 (486.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Netstat:
Code:
ant@localhost ~ % sudo netstat -nltp|grep -E '1420|8080' 
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      28194/calibre       
tcp        0      0 192.168.88.251:14208    0.0.0.0:*               LISTEN      28194/calibre
Code:
ant@localhost ~ %  /usr/sbin/getenforce
Enforcing
Hope those help. I can't see anything wrong this side, unless selinux is doing something strange?
neural is offline   Reply With Quote
Old 01-06-2018, 07:53 AM   #15
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I don't see anything wrong either.

My understanding is that selinux can (and does) block connections to sockets. The "why" and "how" is a mystery to me, and I have no way to experiment.

You could try turning off selinix (setenforce 0) and see what happens. My problem: I don't know what the side effects might be.

There is also a lot of info at https://wiki.gentoo.org/wiki/SELinux/Networking. It talks about having to "label" ports and the like. Again, I have no experience with this, but it does sound like it could explain why one port works and one doesn't.
chaley 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 03:52 AM.


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