Closed apofis1969 closed 1 year ago
Thanks for no reply.
@apofis1969 there is no handling for TCP connections switching IP address while connected; TCP is state-full and does not support such a feature. There is support with RTMP to do switching, but there is nothing that I know of that is using it these days.
Hi, thanks for the reply. I could resolve the problem. Each stream has to have a new name. Then the bad name does not appear anymore.
Issue
Short description
The Bad Name stream appears when one device changes the IP address during streaming. After this no stream is possible. The devices have to stay disconnected for 40 seconds to do the reset. How to resolve this Bad Name Problem. Where is the code to try to fix this? I say thank you in advance for a reply.
Environment
[] Operating system and version: Ubuntu 20.04 [] Java version: 11 [] Red5 version: Problem with the latest release until 1.0.7 (the best working release)
Logs
[ERROR] [RTMPConnectionExecutor-2] org.red5.server.stream.StreamService - Bad name 38458515 [INFO] [RTMPConnectionExecutor-4] org.red5.server.stream.StreamService - closeStream stream id: 1 connection: 6SOKTSJPFWD2L [INFO] [Red5_Scheduler_Worker-24] org.red5.server.adapter.ApplicationAdapter - W3C x-category:stream x-event:stop c-ip:187.106.35.146 cs-bytes:19837 sc-bytes:140210 x-sname:b7548a16-9f03-4c0f-8c66-f72049c64e28 [WARN] [RTMPConnectionScheduler-10] org.red5.server.net.rtmp.RTMPConnection - Closing connection - inactivity timeout: session=[H1E0KPAUNOSLN], lastPongReceived=[77795 ms ago], lastPingSent=[1000 ms ago], lastDataRx=[61000 ms ago] [WARN] [RTMPConnectionScheduler-10] org.red5.server.net.rtmp.RTMPConnection - Client on session=[H1E0KPAUNOSLN] has not responded to our ping for [77795 ms] and we haven't received data for [61000 ms] [WARN] [RTMPConnectionScheduler-10] org.red5.server.net.rtmp.RTMPMinaConnection - Interrupted while waiting for write lock. State: disconnecting java.lang.InterruptedException: null at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1367) at java.base/java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:415) at org.red5.server.net.rtmp.RTMPMinaConnection.write(RTMPMinaConnection.java:332) at org.red5.server.net.rtmp.Channel.write(Channel.java:139) at org.red5.server.net.rtmp.Channel.sendStatus(Channel.java:194) at org.red5.server.stream.consumer.ConnectionConsumer.pushMessage(ConnectionConsumer.java:133) at org.red5.server.messaging.InMemoryPushPushPipe.pushMessage(InMemoryPushPushPipe.java:111) at org.red5.server.stream.ClientBroadcastStream.pushMessage(ClientBroadcastStream.java:776) at org.red5.server.stream.ClientBroadcastStream.sendPublishStopNotify(ClientBroadcastStream.java:723) at org.red5.server.stream.ClientBroadcastStream.close(ClientBroadcastStream.java:210) at org.red5.server.stream.StreamService.deleteStream(StreamService.java:238) at org.red5.server.net.rtmp.RTMPConnection.close(RTMPConnection.java:981) at org.red5.server.net.rtmp.RTMPMinaConnection.close(RTMPMinaConnection.java:113) at org.red5.server.net.rtmp.RTMPMinaConnection.onInactive(RTMPMinaConnection.java:294) at org.red5.server.net.rtmp.RTMPConnection$KeepAliveTask.run(RTMPConnection.java:1896) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) [INFO] [RTMPConnectionScheduler-10] org.red5.server.net.rtmp.RTMPMinaConnection - Session id: H1E0KPAUNOSLN in queue size: 0 pending msgs: -712 last ping/pong: 77795 [INFO] [RTMPConnectionScheduler-10] org.red5.server.net.rtmp.RTMPMinaConnection - Available permits - decoder: 1 encoder: 1 [INFO] [RTMPConnectionScheduler-10] org.red5.server.adapter.ApplicationAdapter - W3C x-category:stream x-event:unpublish c-ip:187.106.35.146 cs-bytes:112081 sc-bytes:55154 x-sname:1cff4ac1-8f68-4bb5-912f-716323b63ced x-file-length:68 x-name:38458515 [INFO] [RTMPConnectionScheduler-10] org.red5.server.adapter.ApplicationAdapter - W3C x-category:session x-event:disconnect c-ip:187.106.35.146 c-client-id:0 [INFO] [NioProcessor-2] org.red5.server.net.rtmp.RTMPMinaConnection - Connection is closed: H1E0KPAUNOSLN [WARN] [NioProcessor-2] org.red5.server.net.rtmp.RTMPMinaIoHandler - Connection was not found for H1E0KPAUNOSLN [INFO] [NioProcessor-4] org.red5.server.adapter.ApplicationAdapter - W3C x-category:session x-event:disconnect c-ip:189.92.121.116 c-client-id:2 [INFO] [RTMPConnectionExecutor-2] org.red5.server.adapter.ApplicationAdapter - W3C x-category:session x-event:connect c-ip:189.92.121.116 c-client-id:3 [INFO] [Red5_Scheduler_Worker-4] org.red5.server.adapter.ApplicationAdapter - W3C x-category:stream x-event:play c-ip:187.106.35.146 x-sname:8cbb32c7-766a-4d24-a536-697f5ee9734a [INFO] [Red5_Scheduler_Worker-5] org.red5.server.adapter.ApplicationAdapter - W3C x-category:stream x-event:play c-ip:187.106.35.146 x-sname:8cbb32c7-766a-4d24-a536-697f5ee9734a x-name:38458515 [INFO] [RTMPConnectionExecutor-4] org.red5.server.scope.BasicScope - ClientBroadcastStream already exists: org.red5.server.stream.ClientBroadcastStream@75a33fdf new: org.red5.server.stream.ClientBroadcastStream@75a33fdf [INFO] [RTMPConnectionExecutor-4] org.red5.server.stream.ClientBroadcastStream - Stream start: 38458515