-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] Error running the client Viewer Sample: createSocket error #1522
Comments
Hi @mehmetcy84, the error codes from your logs mean the following:
|
Hi @mehmetcy84, I'm also facing the same errors while trying to run client Viewer Sample on Windows 11 64bit + VS2017. I'm trying with "-DLWS_WITH_THREADPOOL=1" at libwebsockets building, but it does not ease the problem.
This error does not affect its behavior since it has no actual effect, so we can just ignore it. Critical point is that it fails to send data at this point:
It seems that the first data sending part blocks inside libwebsocket waiting for a signal. Can anyone have a solution for this? |
You are right. By the way, throughout the build, did you encounter an issue with the threadpool usage, or did it work automatically? Today I have built the SDK for MacOS, and the build flowed flawlessly and I could run the built sample viewer right away. |
Yes, I've succeeded building with threadpool enabled. You need pthread for Windows. Before build, place the "pthreads for Windows" files at a directory, and add the following to
After the build, place the corresponding DLL (edited) @mehmetcy84 Adding those arguments to cmake command did not work but editing CMakeLists.txt worked for me. I'm not familiar with CMake and don't know why, though. |
Tried updating libwebsocket to latest version (v4.3.2) but no effect. |
Seems like this issue is not related with threadpool, as per the comment by [nitslp-ri]. Is there a possible workaround, or a way to access to a prebuilt C SDK for Windows, as this is currently blocking development on Windows? |
Have you been able to find a workaround for this? |
No, nothing yet. |
hi @mehmetcy84, have you solved this problem yet |
|
I have the same problem. I tried to solve these problems these days. Now the program can run normally on Windows,it work for me. The following is what I do: 1、filter networkerror log: The log becode of some local network interfaces not work well,you can filter network by:
- configuration.kvsRtcConfiguration.iceSetInterfaceFilterFunc = NULL
+ configuration.kvsRtcConfiguration.iceSetInterfaceFilterFunc = sampleFilterNetworkInterfaces 2、poll eventserror log: for windows,POLLPRI will causes the poll() return -1
- rfds[nfds].events = POLLIN | POLLPRI;
+ rfds[nfds].events = POLLIN; 3、send offer timeout
- #define SIGNALING_SEND_TIMEOUT (5 * HUNDREDS_OF_NANOS_IN_A_SECOND)
+ #define SIGNALING_SEND_TIMEOUT (10 * HUNDREDS_OF_NANOS_IN_A_SECOND) |
@uianster Oh my goodness. After months of agony, thanks to you, finally a working solution! @nitslp-ri Kinesis people, please do fix this for Windows... The only part I didn't apply in your checklist is this: (I had modified code to skip 127.0.0.1 and IPv6 interfaces manually.)
Adding this change gave me these errors: |
@nitslp-ri how did you manage to update the libwebsocket to latest version?
When I changed this I received a build error about applying a path. So I also disabled the patch application for libwebsockets in the same file.
But still get this error:
|
I would like to implement a video/audio viewer in my 64 bit Windows VS2017 project. I have downloaded and built the Windows C SDK. (master branch: SHA-1: ced19d0 Release 1 7 3 (#1473))
Here are the build flags I set while building the SDK:
cmake -G "NMake Makefiles" -DBUILD_TEST=TRUE -DOPENSSL_ROOT_DIR="E:/vcpkg/installed/x64-windows" -DLWS_HAVE_PTHREAD_H=1 -DLWS_EXT_PTHREAD_INCLUDE_DIR="C:\pthread\include" -DLWS_EXT_PTHREAD_LIBRARIES="C:\pthread\lib\x64\libpthreadGC2.a" -DLWS_WITH_MINIMAL_EXAMPLES=1 ..
In order to pass some build errors, I had to disable threadpool usage by:
setting DLWS_WITH_THREADPOOL=0
in
\amazon-kinesis-video-streams-webrtc-sdk-c\CMake\Dependencies\libwebsockets-CMakeLists.txt
I am trying to incorporate the sample viewer program into my Visual Studio 2017 project but having run into some problems, I decided to first run the the built samples using the KVS WebRTC Test Page. But the client fails (logs below). I use the KVS WebRTC Test Page on my macbook(safari) and try to connect to it on my Windows PC using the kvsWebrtcClientViewer sample exe.
The only modification I made onto the stock kvsWebrtcClientViewer sample is to disable trickleICE by setting:
in Samples/Common.c Line 707
STATUS createSampleConfiguration(PCHAR channelName, SIGNALING_CHANNEL_ROLE_TYPE roleType, BOOL trickleIce, BOOL useTurn,PSampleConfiguration* ppSampleConfiguration)
{
trickleIce = FALSE; // ONLY ADDED THIS LINE TO FORCE TRICKLEICE TO FALSE
...
In the Test Page, I have
set the Region, Access Key ID, Secret Key ID, Channel Name
checked "Send Video" and "Send Audio", left "Open Data Channel" unchecked.
checked 1280/720
checked "STUN/TURN"
unchecked "Use Trickle ICE"
clicked "Create Channel"
clicked "Start Master"
On the console, I see
[MASTER] Connected to signaling service
On x64 Native Tools Command Prompt for VS2017, I set the env variables for AWS KEY, SECRET_KEY, REGION and CACERT_PATH.
And ran the command:
kvsWebrtcClientViewer.exe TEST1234
where TEST1234 is the name of the channel I created on the KVS Test Page.
I receive these errors:
setsockopt is called with NO_SIGNAL parameter which resolves to 0 and it seems like it might be an invalid value for Windows environment. Do you have any workarounds to fix this issue?
in src\source\Ice\Network.c,
in function: STATUS createSocket(KVS_IP_FAMILY_TYPE familyType, KVS_SOCKET_PROTOCOL protocol, UINT32 sendBufSize, PINT32 pOutSockFd)
The entire logs are captured below.
With log level set to 1 (LOG_LEVEL_VERBOSE)
I receive these on the console:
The text was updated successfully, but these errors were encountered: