nova-video-player / aos-AVP

NOVA opeN sOurce Video plAyer: main repository to build them all
Apache License 2.0
3.2k stars 191 forks source link

v5.15.11 No SMB connection due to timeout on wrong IP #398

Closed JJD2K closed 3 years ago

JJD2K commented 3 years ago

v5.15.11 - does not see network with or without smb v2 enabled.

courville commented 3 years ago

thanks for the clarification which begs for me questions.

@courville just to confirm ,i have tried the tests with both programs on my all variants of the wd mycloud devices and they are returning the same results the smb 2 tests bcast or dns will return the files nested in the folder structure correctly. the smb tests seem to pick up the top layer folders but none of the lower folder/file structure

this is interesting and deserves clarification. What I understand from your feedback is:

Is my understanding correct?

i dont know if the smb 1 problem is from my win 10 pc or the devices themselves,but is presumably not the issue you are chasing anyway.

win10 by default does not support SMB1 thus let's forget this one for now.

i did notice with smb 1 tests ; ipc$ exists but not accessible but with smd 2 tests ;ipc$ does not exist dont know if it means anything to you??

this ipc$ is not a problem.

spiderdaz commented 3 years ago

No ,sorry for adding confusion. some network shared folder smb://server/shared_folder/ using BCAST or DNS Does indeed list the folder structure when using smb2. It was only when using smb 1 that I had a listing of the top level folders but would not drill down any further. I hope this makes sense.

courville commented 3 years ago

I am struggling to get full logs for jcifs-ng inside nova but I will get there. Meanwhile, I would like to propose to check the two following apk with their respective rollbacks

What is tested is that I use directly the jcfis-ng-2.1.6-SNAPSHOT from the maven repository and not the one recompiled from source (could be one difference that I did not see). I am proposing this test because during the weekend tests it is the maven jcfis-ng-2.1.6-SNAPSHOT jar that was used and not the one from nova (mistake on my side) and there was no issue seen. Sorry to bother you again with these painful tests. No need for logs, just a it is working or not will be enough (it should fail).

spiderdaz commented 3 years ago

@courville hi ,i can confirm that the new apk broke the smb shares on all my devices whether smb2 was selected or not . happily the rollback fixed it . thanks

courville commented 3 years ago

@courville hi ,i can confirm that the new apk broke the smb shares on all my devices whether smb2 was selected or not . happily the rollback fixed it . thanks

thanks for the feedback. Was worth checking. @JJD2K thus there is no need to perform the test on your side.

spiderdaz commented 3 years ago

no problem, i'm happy to help where i can ,i haven't had much cmd line experience and its a good exercise to pick up little bits and tricks by necessity when doing these checks etc.

JJD2K commented 3 years ago

@courville thank you for letting e know. I am a bit busy these days was going to test this today.

courville commented 3 years ago

@JJD2K and @spiderdaz, I finally figured out to create detailed jcifs-ng logs using slf4j framework under android and nova. The logs will be saved on the device in /sdcard/log.txt file.

I have also added a setting to configure jcifs resolver order so that with one apk we will manage to get both a working and non working configuration in your cases (i.e. ticked BCAST,DNS working for @spiderdaz and non working for @JJD2K, unticked BCAST,DNS working for @JJD2K and non working for @spiderdaz).

Note that when changing the setting, you will need to manually force stop the application in the settings.

The resulting apk can be found here: https://drive.google.com/file/d/1ZRt53H-F6IX4wrpQun2157cY-mNynKeo/view?usp=sharing (Video-LOGS.apk).

What I would propose is that you run tests with the option ticked then unticked, force closing the application between the two and retrieving the logfile then erasing it on the device between each test.

To retrieve the logs and delete it on the device you need:

Please do not hesitate to request any clarification if this is unclear.

courville commented 3 years ago

@spiderdaz, thanks for the logs. We see very early [Transport1] DEBUG jcifs.smb.SmbTransportImpl - Connecting in state 1 addr 92.242.132.24 (not in your LAN) while nova discovers the right IP [Thread-26] DEBUG c.a.f.samba.SambaDiscovery - onShareFound WORKGROUP "WDMYCLOUD6TB" smb://192.168.0.53/ and it fails to connect jcifs.smb.SmbException: Failed to connect: WDMYCLOUD6TB/92.242.132.24

This is the same issue as @JJD2K but with the opposite resolver.

courville commented 3 years ago

[EDITED AND NEW APK]

I am sorry but I will need a little more logging for jcifs-ng author. Here is the new apk https://drive.google.com/file/d/1EZyJ4eDK65QQErxygPFb85ni2cv6y3Gz/view?usp=sharing (Video-LOGS2.apk). Please note that the logs are not in the same location, it is now on the device here: /sdcard/Download/org.courville.nova/ and the log file is nova-smb.log thus to get it and flush it you need to adapt previous instructions i.e.:

courville commented 3 years ago

OK new apk since the previous one was boggy (logs not accessible)

JJD2K commented 3 years ago

@courville I do not want to ruin my installation again. How to solve this? G:\ADB>adb install Video-LOGS2.apk Performing Streamed Install adb: failed to install Video-LOGS2.apk: Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install org.courville.nova without first uninstalling.]

I thought this was a separate application. Is ti overwriting NOVA?

courville commented 3 years ago

@courville I do not want to ruin my installation again. How to solve this? G:\ADB>adb install Video-LOGS2.apk Performing Streamed Install adb: failed to install Video-LOGS2.apk: Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install org.courville.nova without first uninstalling.]

you need to do adb install -r Video-LOGS2.apk since nova is already installed.

JJD2K commented 3 years ago

@courville I thought this was a separate application. Is it overwriting NOVA?

courville commented 3 years ago

@courville I thought this was a separate application. Is ti overwriting NOVA?

yes it is. But it will not wipe your media-db. I can provide a rollback if necessary.

JJD2K commented 3 years ago

how to rollback after? I will do the test now and send. Yes I need one as I do not want log to be created every time ?

JJD2K commented 3 years ago

@courville Should SMBv2 be ticked?

JJD2K commented 3 years ago

@courville G:\ADB>adb pull /sdcard/log.txt logENABLED.txt adb: error: remote object '/sdcard/log.txt' does not exist

Sorry my mistake you have new locations.

courville commented 3 years ago

@courville G:\ADB>adb pull /sdcard/log.txt logENABLED.txt adb: error: remote object '/sdcard/log.txt' does not exist

Sorry: I am messing around with the new logging system.

Here is your rollback version https://drive.google.com/file/d/1fwP6HC7cgTfM5HVA4_XtFfltyCVn19Wf/view?usp=sharing There should be no logs but we could activate the logs on this version if need be.

courville commented 3 years ago

@JJD2K note that you will need to untick resolver option in your case and force close app and relaunch to have it working.

JJD2K commented 3 years ago

I read that - I amd testing with V2 disabled Do you want it enabled?

courville commented 3 years ago

Please keep SMBv2 enabled and resolver ticked to get BCAST,DNS that does not work in your case. It would be good to get a log for the working case too to compare.

JJD2K commented 3 years ago

@courville V2 enabled does not want to produce log. G:\ADB>adb pull /sdcard/Download/org.courville.nova/nova-smb.log nova-smb.log adb: error: remote object '/sdcard/Download/org.courville.nova/nova-smb.log' doe s not exist Could this be, because I deleted the file? I will try to reinstall

Works with both resolver orders.

V2 disabled did produce logs amd works only if order is disabled.

courville commented 3 years ago

@courville V2 enabled does not want to produce log. G:\ADB>adb pull /sdcard/Download/org.courville.nova/nova-smb.log nova-smb.log adb: error: remote object '/sdcard/Download/org.courville.nova/nova-smb.log' doe s not exist Works with both resolver orders.

V2 disabled did produce logs amd works only if order is disabled.

this is interesting but strange. Just for me to be sure to get it right:

I am interested in getting the logs to check the SMB traces.

Thank you very much for your patience and testing.

JJD2K commented 3 years ago

yes that is what happened ... I will try to reinstall it...maybe because I deleted the file it can not create it.....

courville commented 3 years ago

yes that is what happened ... I will try to reinstall it...maybe because I deleted the file it can not create it.....

it could not recreate it if you do not force close the app (at least this is the only explanation I could come up with).

JJD2K commented 3 years ago

@courville something is messed up with this test. Now v2 does not work with both enabled and disable. Logs are not recreated if I delete the log file - I have to install the app again for them to be created.

courville commented 3 years ago

@courville something is messed up with this test. Now v2 does not work with both enabled and disable. Logs are not recreated if I delete the log file - I have to install the app again for them to be created.

Just to be sure, when you go in settings and apps and do force stop of the application and relaunch the app it does not recreate the logs right?

You can reinstall the app anyway and do the test one after each other without deleting the logs, I will manage to find the sequence back anyway. What is important is that you force stop the app.

JJD2K commented 3 years ago

@courville I sent you the logs. I force stop the app from the HOME button - hold the button and you have the option to kill apps.

I do not know what is wrong but V2 first was running with both orders, then was not working with both orders, then in my test it was working with the disables order and not with the enabled one.....

I had to reinstall the app for the logs to be created.

P.S file names: nova-smb-disabled-V1-working.log means order - disabled protocol V1 status working

courville commented 3 years ago

@JJD2K thx for sharing the logs. I will provide the protocol traces to jcifs-ng author. Let's hope that he responds soon (it needs to be in the weekend window: thus just in time).

spiderdaz commented 3 years ago

@courville im just in the process of getting the latest logs if its not too late.

i have sent logs by 2 seperate emails the smaller set is just from starting the app. the larger set is the same logs from the same start point but with an attempt to select a share after about 10/15 mins.

courville commented 3 years ago

I am sharing a new apk for testing in the future (no need for now): With this apk https://drive.google.com/file/d/1BnB7M6LTjGyTawebVO7vYsJWBqAoZVS0/view?usp=sharing you can enable logs via pushing this logback.xml file https://drive.google.com/file/d/1M-wB-bZU4zb-0gcir15qF7AZDaAaP6_6/view?usp=sharing in /sdcard/Download/org.courville.nova/ via:

adb push logback.xml /sdcard/Download/org.courville.nova/logback.xml

After force stop nova and relaunch of nova, it should generates logs and you can pull them via:

adb pull /sdcard/Download/org.courville.nova/nova-smb.log nova-smb.log

and you can remove them via:

adb pull /sdcard/Download/org.courville.nova/nova-smb.log nova-smb.log

To remove log file you can as before do:

adb shell
cd /sdcard/Download/org.courville.nova
rm nova-smb.log
exit

To stop all logs to be generated you can:

adb shell
cd /sdcard/Download/org.courville.nova
rm logback.xml
exit

That way there is no need for a rollback apk.

courville commented 3 years ago

@JJD2K, @spiderdaz ok thanks to your testing and logs, we got feedback from jcifs-ng author and I will share shortly a build that should with the same option solve both your problems cf. https://github.com/AgNO3/jcifs-ng/issues/258 I will need however some more testing on your side to share more logs with mbechler.

courville commented 3 years ago

OK here you go: Video-TEST7.apk that should work with default options (SMBv2 enabled, resolv order BCAST,DNS) https://drive.google.com/file/d/1b3pR1pV2-A-GbZBsKMTGIcNsyOvBkRKl/view?usp=sharing In oder to collect logs, you need to refer to last procedure (there is no log enabled by default). What I would need is logs with and without resolv order ticked with between each test a nova force stop). The idea is for @spiderdaz to understand why the DNS,BCAST order does not work, and for @JJD2K to see if the fix from jcifs-ng author works. As recommended by jcifs-ng author, one should use DNS,BCAST order. Thanks you again for your help.

spiderdaz commented 3 years ago

ok tests with test7.apk as per instructions. hopefully got whats needed. https://drive.google.com/drive/folders/16sCy6IxWYROyYbunSMGUpD72_5SM8SJY?usp=sharing

spiderdaz commented 3 years ago

Not sure if it has any bearing but I did try to ping the 92.xxxxxxxx address and it just returns a timeout ,so it's definitely not on my network anywhere.

courville commented 3 years ago

@spiderdaz thanks for the logs. I shared them with jcifs-ng author: let's see what comes out of it. It seems that there is something fishy about your DNS provider/configuration. Perhaps you can do nslookup 92.xxxxxxxx and provide the result to me.

courville commented 3 years ago

@spiderdaz even better if you could do too nslookup WDMYCLOUD6TB

spiderdaz commented 3 years ago

ns lookup gave me this 92.242.132.24 Server: cache1.service.virginmedia.net Address: 194.168.4.100

Name: unallocated.barefruit.co.uk Address: 92.242.132.24

nslookup wdmy cloud gave me this!!! nslookup wdmycloud Server: cache1.service.virginmedia.net Address: 194.168.4.100

Non-authoritative answer: Name: wdmycloud Address: 92.242.132.24

i googled and found this https://community.virginmedia.com/t5/Networking-and-WiFi/DNS-hijacking-how-to-disable-opt-out/td-p/4145614 i opted out of this piece of crap and now nslookup mycloud gives me

nslookup wdmycloud Server: cache1.service.virginmedia.net Address: 194.168.4.100

*** cache1.service.virginmedia.net can't find wdmycloud: Non-existent domain

im still checking but it seem to have solved the problem.!! do you want logs??

spiderdaz commented 3 years ago

Just noticed that mbechler posted the exact same link on the Ng jcifs thread. My apologies to everyone involved on behalf of virgin media (bastards)

JJD2K commented 3 years ago

@courville Hello I sent you the logs - this version is working with both detection orders on my side - ISSUE solved. Your logs still don't work though. After pulling the first log and killing nova. If I execute the code that you provide: adb shell cd /sdcard/Download/org.courville.nova rm nova-smb.log exit in order to clear the old log, the log is no longer generated. Even if I push an empty log file to the TV - still nothing is logged. I have to reinstall the app with: adb install -r Video-TEST7.apk for the logs to start working. Maybe it is a permission issue - I do not know - you have to check your code.

The most important part - issues SOLVED! :dancers: :partying_face: :balloon: :man_dancing:

courville commented 3 years ago

Just noticed that mbechler posted the exact same link on the Ng jcifs thread. My apologies to everyone involved on behalf of virgin media (bastards)

I am glad that we we found the root cause. I guess that some other provider will behave the same. I will thus leave the option to switch resolve order. This is important. Thank you for all the help provided in converging!

courville commented 3 years ago

@spiderdaz, @JJD2K thank you again for your support and all the testing. I think mbechler fixed the issue. We are good to go for yet another attempt to get SMB2 out at next release for next year.

mschumacher69 commented 3 years ago

Let me get this straight, so the issue was actually with the external DNS server and not with Nova??

JJD2K commented 3 years ago

@mschumacher69 No these are two separate issues. A fix in NOVA is applied.