Open lars18th opened 5 years ago
btw your minisatip ist probably not compiled right "minisatip 1.0-unknown" , it should look like "minisatip 1.0.2-679b7ca"
btw your minisatip ist probably not compiled right "minisatip 1.0-unknown" , it should look like "minisatip 1.0.2-679b7ca"
It's compiled right, but the source is not from a git clone
but from a ZIP. For this reason is ' minisatip 1.0-unknown' .
ok but this way it make it hard to guess which version is in use
ok but this way it make it hard to guess which version is in use
For sure it's the last version!
This bug is real: When the RTSP socket to the SAT>IP server is closed (when running in satipc mode) then the Adapter is not properly closed.
Futhermore, it's quite easy to reproduce: configure a new minisatip instance in the middle, and configure it to work as client of another minisatip. The connect one client to the middle minisatip, and when running it then close (with an external tool) the RTSP socket in between the middle and the real server. Then check the LOGs.
I hope @catalinii will fix this problem, or will think in add some checks to not trigger a SETUP/PLAY command if the parameters are empty (see the ?&mtype=&pol=none&sr=0&plsc=0&pids=none
). I feel this "assert" will be useful.
Regards.
Hi @catalinii ,
I hope you can help me: The problem with the XORO server is reduced to this behaviour:
satipc
module does the SETUP and then the PLAY with the different addpids/delpids. All goes right (using my patch #612, without it the PLAY doesn't start), but after 1 second (just this time) the image stops in the client. In the LOG the RTSP socket between the minisatip server and the XORO SAT>IP server is closed, and then minisatip triggers the TEARDOWN (even the socket is closed). Here the precise point where the problem appears:
[04/10 12:08:05.798 AD1]: event on socket index 11 handle 10 type 1 spos 0 wpos 0 (poll fd: 10, events: 3, revents: 1)
[04/10 12:08:05.798 AD1]: Read NOK 0 (rlen:0/total:2000) bytes from 10 [s: 11 m: 11] -> 0x7f8f2b899300 (buf: 0x7f8f2b899300) - iteration 9 action 0x43356a
[04/10 12:08:05.798 AD1]: select_and_execute[11]: Close on socket 10 (sid:1) from 0.0.0.0:0 - type tcp errno 0
[04/10 12:08:05.799 AD1]: satip_close called for adapter 1, socket_id 11, handle 10 timeout 30000
[04/10 12:08:05.799 AD1]: closing adapter 1 -> fe:10 dvr:11, sock:13, fe_sock:11
[04/10 12:08:05.799 AD1]: satip device 192.168.1.34:554 is closing
[04/10 12:08:05.799 AD1]: satipc_http_request (ad 1): sending to sock 11:
TEARDOWN rtsp://192.168.1.34:554/stream=71 RTSP/1.0
Please, don't ask me for a full LOG. I'm trying to fix the problem for my self. And I'm sure of this:
select
in the RTSP socket of the satipc
module (function select_and_execute()
) detects some event in the socket but the read returns 0 bytes.So the question is this: You know any reason for an event in this RTSP client socket without reading data?
Thank you!
Hi @catalinii ,
You know any reason for an event in this RTSP client socket without reading data?
Please, any idea? I need your help to fix this problem!
Hi @catalinii ,
No help?
Hey,
In your log the line:
[04/10 12:08:05.798 AD1]: Read NOK 0 (rlen:0/total:2000) bytes from 10 [s: 11 m: 11] -> 0x7f8f2b899300 (buf: 0x7f8f2b899300) - iteration 9 action 0x43356a [04/10 12:08:05.798 AD1]: select_and_execute[11]: Close on socket 10 (sid:1) from 0.0.0.0:0 - type tcp errno 0 Indicates the server closed the connection. Mijisatip tends to write the TEARDOWN after that but if the socket ia already closed it will not succeed (ofc).
The behavior with middle and real.minisatip is by design. The reason is that if the real minisatip goes down (restart, crash, or the connection drops) the middle minisatip will retune once the real minisatip is back up.
Hi @catalinii ,
Thank you for the response.
[04/10 12:08:05.798 AD1]: Read NOK 0 (rlen:0/total:2000) bytes from 10 [s: 11 m: 11] -> 0x7f8f2b899300 (buf: 0x7f8f2b899300) - iteration 9 action 0x43356a [04/10 12:08:05.798 AD1]: select_and_execute[11]: Close on socket 10 (sid:1) from 0.0.0.0:0 - type tcp errno 0 . Indicates the server closed the connection. ...
As I commented before the server has not closed the connection. I've completely checked it. And for this reason I ask you: How it's possible that the socket will be closed if the other part (the server) isn't closing it?
The only way you can check is by doing tcdump on the box with minisatip. Again to me it seems like it did (read 0 means sockets is closed by the other side).
The only way you can check is by doing tcdump on the box with minisatip. Again to me it seems like it did (read 0 means sockets is closed by the other side).
I do it already. And I can confirm that the other side doesn't close the socket. And for this reason I ask you: some part of the code is forcing to read from the socket when the socket has no new data. It's possible that some thread generate a fake socket activity?
Can u upload the tcpdump maybe there is something else going on before the socket close?
If there is no data the read will return -1 not 0
Hi @catalinii ,
The problem of SETUP rtsp://192.168.1.37:554/?&mtype=&pol=none&sr=0&plsc=0&pids=none RTSP/1.0
is resolved with this PR #638.
Please, commit it!
The pending trouble to fix is the TEARDOWN not sended when the adapter is closed: https://github.com/catalinii/minisatip/issues/636#issuecomment-552991373
Regards.
The only way you can check is by doing tcdump on the box with minisatip. Again to me it seems like it did (read 0 means sockets is closed by the other side).
I do it already. And I can confirm that the other side doesn't close the socket. And for this reason I ask you: some part of the code is forcing to read from the socket when the socket has no new data. It's possible that some thread generate a fake socket activity?
Hi @catalinii ,
Regarding the problem of the phantom socket close (different to the trouble pointed before and resolved by my PR #638), I feel that not only the RTSP socket from the satipc module has this problem. I feel (I need to do more tests to confirm it) that all TCP sockets are randomly closed time to time. I've the intuition that after some time something like a timer is closing automatically every tcp socket. Even if the socket has activity.
So, please comment about this: You have implemented some type of TIMEOUTS associated to TCP sockets?
Perhaps this is the cause of the problem. Regards.
maybe there is also some relation to https://github.com/catalinii/minisatip/issues/502
Hi @catalinii ,
The problem of
SETUP rtsp://192.168.1.37:554/?&mtype=&pol=none&sr=0&plsc=0&pids=none RTSP/1.0
is resolved with this PR #638.Please, commit it!
Now, really fixed after lasted commit. Please, review it and merge it. Regards.
maybe there is also some relation to #502
Hi @9000h , I don't know, but in my case my last PRs #638 and #639 fix a lot of troubles with some SAT>IP servers. Please, try them with your Panasonic TV as server, as my new TV only has client functionality.
Hi, @lars18th , my Panasonic TV's are client only it's a lot of effort here an take some time to such tests with the Panasonic TV's as server. The TVIP (SAT->IP) from the Viera's are certified but maybe also not free of issues like the one I found here https://github.com/rofafor/vdr-plugin-satip/issues/56#issuecomment-451677572
Hi @9000h ,
Yes it's true that the Panasonic ins't the best SAT>IP implementation. However, it's quite interesting to test it (as Client and as Server too).
In any case, please, check my last patches if you use the satipc
module.
Regards.
Hi @lars18th , for testing I did use my AMV 6490 as server (not certified by Astra). CU
Hi @lars18th , for testing I did use my AMV 6490 as server (not certified by Astra).
This Fritzbox is for DVB-C, and I don't receive any DVB-C signal. In my case I use: one DD Octopus and different STBs with SAT>IP support (Mirage ALi, Xoro, OpenATV, etc.). For sure, we need to test with a lot of devices. :wink:
This bug is related to this PR #817 that solves the trouble. However, a reimplementation it's requested. So the bug is pending to solve it.
Hi @lars18th sorry if I kidnap this topic for talk about XORO SAT>IP Server. Do you have any problem when using 2 channels from same transponder. As related here https://www.kodinerds.net/index.php/Thread/56726-Megasat-SAT-IP-Server-3-Tvheadend-4-1-2437/
Maybe minisatip cient could workaround it?
Assumin XORO and Megasat MAG-8000 are same hardware.
EDIT: Wow I just discovery by casuality that this setup works well:
MEGASAT SAT>IP Server 3 --(LAN1)--> minisatip #1 client --(WAN)--> minisatip #2 client --(LAN2)--> TVH
while this 2 other setups fails (video glitches) when a new channel in same transponder starts using same tuner:
MEGASAT SAT>IP Server 3 --(LAN1)--> minisatip client --(LAN1)--> TVH
or
MEGASAT SAT>IP Server 3 --(LAN1)--> TVH
Hi @catalinii ,
I'm trying to fix the minisatip server working with a XORO STB. The minisatip uses this STB as the SAT>IP server using the satip client functionality.
At time, it doesn't work (so I'm working on it). But I discovered a bug that's a side effect:
The problem is this:
?&mtype=&pol=none&sr=0&plsc=0&pids=none
).So I suggest to fix this bug adding some workaround. Regards.