ICE failed for component 1 in stream - websocket

I have configured janus server for video call.
configured all setups and installed all dependencies as per the Docs
successfully established the connection but unable to stream the video. After starts the new session ICE failed error throws error logs as follows
JANUS WebSockets transport plugin initialized!
WebSockets thread started
Creating new session: 7153905178555544; 0x7fd244004c00
Creating new handle in session 7153905178555544: 7459090747208459; 0x7fd244004c00 0x7fd244005670
Creating new session: 8203604816882479; 0x7fd24400b8c0
Creating new handle in session 8203604816882479: 1196748959220562; 0x7fd24400b8c0 0x7fd244018910
Destroying session 8203604816882479; 0x7fd24400b8c0
Detaching handle from JANUS VideoRoom plugin; 0x7fd244018910 0x7fd24400b890 0x7fd244018910 0x7fd24401f760
[janus.plugin.videoroom-0x7fd24400b890] No WebRTC media anymore; 0x7fd244018910 0x7fd24401f760
[1196748959220562] Handle and related resources freed; 0x7fd244018910 0x7fd24400b8c0
[WSS-0x7fd244008340] Destroying WebSocket client
[7459090747208459] Creating ICE agent (ICE Lite mode, controlled)
[WARN] [7459090747208459] ICE failed for component 1 in stream 1, but let's give it some time... (trickle received, answer received, alert not set)
[ERR] [ice.c:janus_ice_check_failed:1692] [7459090747208459] ICE failed for component 1 in stream 1...
[janus.plugin.videoroom-0x7fd244001e60] No WebRTC media anymore; 0x7fd244005670 0x7fd244005fe0
[7459090747208459] WebRTC resources freed; 0x7fd244005670 0x7fd244004c00
[ERR] [transports/janus_http.c:janus_http_handler:1239] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1239] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1239] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1239] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1239] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1239] Invalid url /ws/v1/cluster/apps/new-applicatio

You can speicfy stun/turn servers for icing in /opt/janus/etc/janus/janus.jcfg.
Also you should open ports for udp like 40000-65535

Related

Quarkus grpc is throwing start up error: Unable to start the gRPC server: java.nio.channels.UnresolvedAddressException

I am trying to start the grpc server with the property
quarkus.grpc.server.use-separate-server=true
in that case, i am getting the below error during server start up
2023-01-19 13:12:51,762 WARN [io.qua.grp.run.GrpcServerRecorder] (main) Using legacy gRPC support, with separate new HTTP server instance. Switch to single HTTP server instance usage with quarkus.grpc.server.use-separate-server=false property
2023-01-19 13:12:51,824 INFO [io.qua.grp.run.GrpcServerRecorder] (vert.x-eventloop-thread-0) Registering gRPC reflection service
2023-01-19 13:12:51,934 ERROR [io.qua.grp.run.GrpcServerRecorder] (vert.x-eventloop-thread-0) Unable to start the gRPC server: java.nio.channels.UnresolvedAddressException
at java.base/sun.nio.ch.Net.checkAddress(Net.java:149)
at java.base/sun.nio.ch.Net.checkAddress(Net.java:157)
at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:330)
at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:294)
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:141)
But when I start the grpc server with property
quarkus.grpc.server.use-separate-server=false
the grpc server starts but the client is not able to access the server
I am getting the below error on the client side
13:54:28 ERROR line=111 traceId=, parentId=, spanId=, sampled= [qu.ms.of.OfferResource] (executor-thread-0) Exception: UNAVAILABLE: upstream connect error or disconnect/reset before headers. reset reason: connection failure, transport failure reason: delayed connect error: 111: io.grpc.StatusRuntimeException: UNAVAILABLE: upstream connect error or disconnect/reset before headers. reset reason: connection failure, transport failure reason: delayed connect error: 111
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:271)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:252)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:165)
How do we overcome this issue?

Failed to set remote candidates :-( (added 1, expected 2)

when try to check video call sessions created successfully but there no video stream happens in janus gateway webrtc
Creating new session: 7295874067549813; 0x7fec98004230
Creating new handle in session 7295874067549813: 2264190151434116; 0x7fec98004230 0x7fec98005430
Creating new session: 3622043621310499; 0x5557f104b700
Creating new handle in session 3622043621310499: 3486814800053046; 0x5557f104b700 0x7fec98008f60
[ERR] [transports/janus_http.c:janus_http_handler:1239] Invalid url /ws/v1/cluster/apps/new-application
[3486814800053046] Creating ICE agent (ICE Full mode, controlled)
[2264190151434116] Creating ICE agent (ICE Full mode, controlling)
[ERR] [ice.c:janus_ice_setup_remote_candidates:3180] [2264190151434116] Failed to set remote candidates :-( (added 1, expected 2)
[WARN] [2264190151434116] Missing valid SRTP session (packet arrived too early?), skipping...
[WARN] [2264190151434116] Missing valid SRTP session (packet arrived too early?), skipping...
[WARN] [2264190151434116] Missing valid SRTP session (packet arrived too early?), skipping...
[WARN] [3486814800053046] Missing valid SRTP session (packet arrived too early?), skipping...
[WARN] [2264190151434116] Missing valid SRTP session (packet arrived too early?), skipping...
[WARN] [3486814800053046] Missing valid SRTP session (packet arrived too early?), skipping...
[2264190151434116] The DTLS handshake has been completed
[janus.plugin.videocall-0x7fec98004430] WebRTC media is now available
[WARN] [2264190151434116] Not video and not audio? dropping (SSRC 3036569962)...
[WARN] [2264190151434116] Not video and not audio? dropping (SSRC 3126498254)...
[WARN] [2264190151434116] Not video and not audio? dropping (SSRC 4083758620)...
any idea how to fix this....

port out of range:-1 for Web Socket API via WSO2 API Manager

I am trying to run a web-socket service via a WSO2 API Manager (as an API Gateway). I had a working proof-of-concept with the gateway running against a service on my laptop (gateway is on a server, but i ran the service in Eclipse to test it). Now I am trying to get it working against a service running on another server. If I call the URL that is configured as the endpoint in the API Definition in the gateway then it works. if i run via the gateway then it doesn't. The wso2carbon.log shows:
TID: [-1] [] [2019-07-02 16:00:55,260] ERROR {org.apache.synapse.core.axis2.Axis2Sender} - Unexpected error during sending message out {org.apache.synapse.core.axis2.Axis2Sender}
java.lang.IllegalArgumentException: port out of range:-1
at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143)
at java.net.InetSocketAddress.<init>(InetSocketAddress.java:224)
at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:97)
at org.wso2.carbon.websocket.transport.WebsocketConnectionFactory.cacheNewConnection(WebsocketConnectionFactory.java:169)
at org.wso2.carbon.websocket.transport.WebsocketConnectionFactory.getChannelHandler(WebsocketConnectionFactory.java:79)
at org.wso2.carbon.websocket.transport.WebsocketTransportSender.sendMessage(WebsocketTransportSender.java:106)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:592)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:83)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:548)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:382)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:121)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:1005)
at org.wso2.carbon.inbound.endpoint.protocol.websocket.InboundWebsocketSourceHandler.injectToSequence(InboundWebsocketSourceHandler.java:469)
at org.wso2.carbon.inbound.endpoint.protocol.websocket.InboundWebsocketSourceHandler.handleHandshake(InboundWebsocketSourceHandler.java:182)
at org.wso2.carbon.inbound.endpoint.protocol.websocket.InboundWebsocketSourceHandler.channelRead(InboundWebsocketSourceHandler.java:131)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at org.wso2.carbon.apimgt.gateway.handlers.WebsocketInboundHandler.channelRead(WebsocketInboundHandler.java:125)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:147)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:147)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:110)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:748)
TID: [-1] [] [2019-07-02 16:00:55,267] WARN {org.apache.synapse.core.axis2.Axis2SynapseEnvironment} - Executing fault handler due to exception encountered {org.apache.synapse.core.axis2.Axis2SynapseEnvironment}
TID: [-1] [] [2019-07-02 16:00:55,267] WARN {org.apache.synapse.endpoints.EndpointContext} - Endpoint : AnonymousEndpoint with address ws://redacted.example.com/notifications/v1 will be marked SUSPENDED as it failed {org.apache.synapse.endpoints.EndpointContext}
TID: [-1] [] [2019-07-02 16:00:55,267] WARN {org.apache.synapse.endpoints.EndpointContext} - Suspending endpoint : AnonymousEndpoint with address ws://redacted.example.com/notifications/v1 - last suspend duration was : 30000ms and current suspend duration is : 30000ms - Next retry after : Tue Jul 02 16:01:25 EEST 2019 {org.apache.synapse.endpoints.EndpointContext}
TID: [-1] [] [2019-07-02 16:00:55,267] INFO {org.apache.synapse.mediators.builtin.LogMediator} - STATUS = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = Unexpected error during sending message out {org.apache.synapse.mediators.builtin.LogMediator}
TID: [-1] [] [2019-07-02 16:00:55,345] INFO {org.apache.synapse.mediators.builtin.LogMediator} - STATUS = Executing default 'fault' sequence, ERROR_CODE = 303001, ERROR_MESSAGE = Currently , Address endpoint : [ Name : AnonymousEndpoint ] [ State : SUSPENDED ] {org.apache.synapse.mediators.builtin.LogMediator}
Running v 2.1 of WSO2 API Manager (yes, we are actively planning an upgrade but I need to get it working on the current version if possible). Unfortunately I am having problems repeating my initial PoC against my machine too. I think it's something in the gateway (although I am not aware of having changed anything). However, my IT department has changed which firewall we have on our local machines in the meantime so I can't rule that out...
When using wss endpoint, we were able to observe some errors and we were able to get rid of the errors with the following approach.
Please include the following parameter in the SecureWebSocketInboundEndpoint.xml file which resides in the <APIM_HOME>/repository/deployment/server/synapse-configs/default/inbound-endpoints directory.
<parameter name="wss.ssl.protocols">TLSv1.1,TLSv1.2</parameter>
Also, please remove the following parameters from the same SecureWebSocketInboundEndpoint.xml file if the following parameters(wss.ssl.trust.store.file and wss.ssl.trust.store.pass) exist in the file.
<parameter name="wss.ssl.trust.store.file">repository/resources/security/client-truststore.jks</parameter>
<parameter name="wss.ssl.trust.store.pass">wso2carbon</parameter>
Please use the following sample web socket client to try out and run the WSS client. Please change the variable carbonKeyStoreLocation to point to <API-M_HOME>/repository/resources/security/wso2carbon.jks. Note that port for the WSS API is 8099.
You can download the WSS client in the following WSO2 official documentation under the WSS Support section. (In the second step.)[1] Further please change the access token, web socket endpoint and the carbonKeyStoreLocation with your one to try out the scenario.
[1] https://docs.wso2.com/display/AM260/Create+a+WebSocket+API
When using ws endpoint, you do not need to configure the carbonKeyStoreLocation. Only you need to include the correct access token and correct ws endpoint. You can get the WS client in the same above documentation.[1]

Camera Video Capture Call On Pi3

I'm getting the following error when trying to record video on the Pi:
03-29 20:30:16.434 661-661/xxx.xxx.xxx D/Camera: Media Recoder Prepare Completedandroid.media.MediaRecorder#2da1655
Starting Video
Media Recorder: android.media.MediaRecorder#2da1655
03-29 20:30:17.900 661-661/xxx.xxx.xxx E/MediaRecorder: start failed: -19
03-29 20:30:17.906 661-661/xxx.xxx.xxx E/Camera: Video Initialization Error
java.lang.RuntimeException: start failed.
at android.media.MediaRecorder.start(Native Method)
at xxx.xxx.xxx.capture.VideoCapture.startRecordVideo(VideoCapture.java:176)
at xxx.xxx.xxx.capture.VideoCapture$1.onOpened(VideoCapture.java:70)
at android.hardware.camera2.impl.CameraDeviceImpl$1.run(CameraDeviceImpl.java:139)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
It looks to be a native JNI call error returned from camera.v4l2.so
Does anyone know what the -19 error means? Also, has anyone successfully
captured video with Android Things on Pi? Image capture works like a champ but I've had no success with video.

Pivotal Cloud Foundry - Spring Cloud Services

I am trying to push the company app into Pivotal Cloud Foundry. The app should be bound with service registry. I didn't do any changes in application.yml file. I had have service-registry service in my Pivotal apps manager console. After I pushed my company app into PCF and binded with service-registry service. I did restage my company app. The app is not registered in the service registry console.
2016-06-06T11:25:36.72+0530 [APP/0] OUT Caused by: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://p-spring-cloud-services.uaa.******.com/oauth/token":sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to fin
d valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.securit
y.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
and
2016-06-06T05:49:35.000+00:00 [APP] OUT 2016-06-06 05:49:35.668 ERROR 22 --- [pool-5-thread-1] com.netflix.discovery.DiscoveryClient : DiscoveryClient_COMPANY/https://p-spring-cloud-services.uaa.******.com/oauth/token:****** - was unable to refresh its cache! status = Error requesting access token.
How to solve these issues?
The cause of problem is ssl certification for PCF. I think you are not uploaded ssl certificate to your environment.
Your PCF instance should have valid root certificates of your apps installed at their side and vice versa....

Resources