I have been using a Raspberry Pi 3 along with IBM Watson IoT platform and was just deploying some flows. However, I think I may have mixed up the device id between Gateway and Device.
When I registered my Raspberry Pi as a Device and a Gateway, I gave both connections the same Device ID. In hindsight, I can see why this might have been stupid. I am just going to disconnect all connections and create two new connections. However, I have a different problem right now. Whenever I try to launch NodeRed from my Raspberry Pi, I get the following log
3 Feb 17:07:27 - [error] IBMIoT: Error: Connection refused: Not authorized
[BaseClient:connect] Iotfclient is offline. Retrying connection
[BaseClient:onClose] Connection was closed.
This just keeps repeating over and over again, and I have no idea what to do to fix it.
That suggests you still have an IoT node in your flow with the incorrect credentials.
Assuming you are running Node-RED 0.15 or later, open the search dialog (Ctrl-. on 0.15 or Ctrl-F on 0.16) and search for ibmiot. That will reveal any existing configuration nodes you have. Clicking on one in the search results will reveal it in the Config node sidebar tab. Double click on it and either delete it or correct the credentials.
If you're on an older version (I suggest you upgrade), you can open the config node sidebar from the dropdown menu and manually look for the ibmiot nodes.
Related
I have a Windows application (APP) and Audio Processing Object (APO) loaded by AudioDG.exe that communicate via gRPC:
APP part that is written in C# creates server via Grpc.Core.
APO part creates client via grpc++.
Server is on 127.0.0.1:20000 (I can see it's up and listening with netstat -ano).
I can confirm that APO is loaded into audio device graph by inspecting it with process explorer.
Everything worked like a charm on Windows 8 and 10, but on 11 it cannot communicate at all - I get either Error Code 14, Unavailable, failed to connect to all addresses or 4, Deadline Exceeded.
After enabling debug traces, I now see "socket is null" description for "connect failed" error:
I0207 16:20:59.916447 0 ..\..\..\src\core\ext\filters\client_channel\subchannel.cc:950: subchannel 000001D8B9B01E20 {address=ipv4:127.0.0.1:10000, args=grpc.client_channel_factory=0x1d8bb660460, grpc.default_authority=127.0.0.1:10000, grpc.internal.subchannel_pool=0x1d8b8c291b0, grpc.primary_user_agent=grpc-csharp/2.43.0 (.NET Framework 4.8.4470.0; CLR 4.0.30319.42000; net45; x64), grpc.resource_quota=0x1d8b8c28d90, grpc.server_uri=dns:///127.0.0.1:10000}: connect failed: {"created":"#1644240059.916000000","description":"socket is null","file":"..\..\..\src\core\lib\iomgr\tcp_client_windows.cc","file_line":112}
What I've tried so far:
Updating both parts to the latest grpc versions.
Using "no proxy", "Http2UnencryptedSupport" and other env variables.
Using "localhost" or "0.0.0.0" instead of "127.0.0.1".
Updating connection to use self signed SSL certificates (root CA, server cert + key, client cert + key).
Adding inbound / outbound rules for my port, and then disabling firewall completely.
Creating server on APO side and trying to connect with the client in APP.
Everything works (both insecure and SSL creds) if I create both client and server in C# part, but as soon as it's APP-APO communication it feels blocked or sandboxed.
What has been changed in Windows 11 that can "block" gRPC?
Thanks in advance!
In your input you write:
Server is at 127.0.0.1:20000
Further looking at the logs, you can see that:
The server is located at
grpc.server_uri=dns:///127.0.0.1:10000
Based on the question posed and the amount of data provided, I would check which port the server is really using and which port the client is looking for a connection on.
The easiest way to do this is to use the built-in Resource Monitor application. On the Network tab, in the TCP Connections list, you can find the application and the port it uses.
You can also use the PowerShell command
Test-NetConnection -Port 10000 -InformationLevel "Detailed"
Test-NetConnection -Port 20000 -InformationLevel "Detailed"
At least this is the first thing I would check based on what you described.
Regarding your question about the changes in Windows 11, I do not think that this is something that's causing problems for you. However, Windows 11 has additional security features compared to Windows 10, try disabling the security features completely as a test. Perhaps this will help solve the problem.
As for ASP.NET Core 6.0 itself (if I understood the version correctly), then there is a possibility that the server part, working not in the sandbox of the programming environment, still does not accept the client certificate. At the program level, you can try to fix this by adding the following exception to the code:
// This switch must be set before creating the GrpcChannel/HttpClient.
AppContext.SetSwitch(
"System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
// The port number(5000) must match the port of the gRPC server.
var channel = GrpcChannel.ForAddress("http://localhost:5000");
var client = new Greet.GreeterClient(channel);
More troubleshooting issues with ASP.NET Core 6.0 Microsoft described in detail here.
https://learn.microsoft.com/en-us/aspnet/core/grpc/troubleshoot?view=aspnetcore-6.0
I hope it was useful and at least one of the solutions I suggested will help solve your problem. In any case, if I had more information, I think I could help you more accurately.
I have a project which may need open many tabs at the same time. And in each tab, there are at least 2 websocket. In some old version of IE11, the max number of websocket is only 6. As a result, when I open more than 3 tabs, the websocket will down.
To solve this problem, I have tried some work-around. I assign different websockets to different domains so that I can open at least 6 tabs. Then I use localstorage to share the websocket message, so I only need one master tab to receive message and other tabs just need listen the storage event. But this will lead to some qulity issue, when the master tab disconnect or be closed, I need to vote a new master tab, during which period the messages will be lost. Unfortunately my software cannot tolerate the data loss.
PS: Since all the project is in aws, I use aws IoT to implement websocket and as far as I know aws IoT cannot make data persistence.
You can try to set group policy which allows you to change the default limit of WebSocket connections per server. The default limit is 6; you can select a value from 2 through 128.
Please refer steps below to set this using group policy.
(1) Type gpedit.msc in Run window to open Local group policy editor.
(2) Navigate to location below.
Local Computer Policy > Computer Configuration > Administrative Templates >Windows Components > Internet Explorer > Security Features
> AJAX
(3) Find the setting named as Set the maximum number of WebSocket connections per server.
(4) double click on it to configure this setting.
(5) User can Enabled it and set the desired number of maximum connections between 2 to 128.
(6) click on OK to close the dialog.
(7) Restart the IE to take effect of changes.
last week I started to develop apps for a Samsung Smartwatch with the Tizen SDK 2.4.0. My sample web application connects to a remote Websocket server (a simple echo server) and sends some random requests and prints the received messages (Server is http://www.websocket.org/echo.html). This works fine on an emulated devices as well as on the real Gear S2 Smartwatch (Example was taken from https://developer.tizen.org/zh-hans/development/tutorials/web-application/w3chtml5supplementary-features/communication/websocket?langredirect=1)
But as soon as I start a Websocket server in my home LAN I run into problems. The server is launched via a simple Python example I found on Github (https://github.com/dpallot/simple-websocket-server). The emulator device from the SDK connects to this server without any problems using the local IPv4. But the real device, which is logged in to the same WiFi access point, doesn't.
Note that the connection between my PC and my watch device works fine, since the SDK flashes the developed apps via WiFi to the device.
In my config.xml all connections are allowed
<access origin="*" subdomains="true"></access>
and the privilege for "Internet" is available.
The logs show that the watch tries to open a connection, but is then stuck. No error message is printed - the watch just does not go beyond the initial creation of the websocket.
Do you have any hints or thoughts about how I could debug this issue?
Thanks in advance!
I found the solution - my virus scanner has an integrated software firewall that blocked incoming connections...
Try with higher ports maybe ? I got WS working fine on SamsungZ1 on Tizen:2.3:Mobile
https://twitter.com/RzrFreeFr/status/70135763074535014#tizen-gear2-websockets
Maybe I could try your code on Tizen:2.4:Mobile too ?
I have a Windows 7 / 8.1 Laptop in a docking station connected via 2 networkadapters(LAN & WiFi) to 1 private network.
Now an application should connect to a Server inside this private network but first prio should have the LAN adapter. If the laptop gets removed from the docking station it should switch automaticaly to the WiFi adapter without losing connection or TCP packages.
I'm at the opinion that not the application layer is responsible for that. The switching and TCP packet resending should be managed by the OS.
However I don't know how to setup Windows for that, any help is appreciated.
Go to your network adapters (Control Panel ->..) --> (then press alt for menu bar) -->
In the following settings you can change the order / priority of the adapters:
I dont know if connection can changed without losing connection or TCP packages shortly, cause Windows normaly says: I have a connection - why i should also hold the second active ?
Therefor you can look at the energyoptions of the pc for standbytime of the wifi-adapter and set it to highest performance, but i dont know if this will help properly.
stupid problem. I get those from a client connecting to a server. Sadly, the setup is complicated making debugging complex - and we run out of options.
The environment:
*Client/Server system, both running on the same machine. The client is actually a service doing some database manipulation at specific times.
* The cnonection comes from C# going through OleDb to an EasySoft JDBC driver to a custom written JDBC server that then hosts logic in C++. Yeah, compelx - but the third party supplier decided to expose the extension mechanisms for their server through a JDBC interface. Not a lot can be done here ;)
The Symptom:
At (ir)regular intervals we get a "Address already in use: connect" told from the JDBC driver. They seem to come from one particular service we run.
Now, I did read all the stuff about port exhaustion. This is why we have a little tool running now that counts ports and their states every minute. Last time this happened, we had an astonishing 370 ports in use, with the count rising to about 900 AFTER the error. We aleady patched the registry (it is a windows machine) to allow more than the 5000 client ports standard, but even then, we are far far from that limit to start with.
Which is why I am asking here. Ayneone an ide what ELSE could cause this?
It is a Windows 2003 Server machine, 64 bit. The only other thing I can see that may cause it (but this functionality is supposedly disabled) is Symantec Endpoint Protection that is installed on the server - and being capable of actinc as a firewall, it could possibly intercept network traffic. I dont want to open a can of worms by pointing to Symantec prematurely (if pointing to Symantec can ever be seen as such). So, anyone an idea what else may be the cause?
Thanks
"Address already in use", aka WSAEADDRINUSE (10048), means that when the client socket prepared to connect to the server socket, it first tried to bind itself to a specific local IP/Port pair that was already in use by another socket, either an active one or one that has been closed but is still in the FD_WAIT state. This has nothing to do with the number of ports that are available.
I'm having the same issue on a Windows 2000 Server with a .Net application connecting to a SQL Server 7.0. There's like 10 servers with the same configuration and only one is showing this error several times a day. With a small test program I'm able to reproduce the error by just establishing a TCP connection on the SQL Server listening port. Running CurrPorts (http://www.nirsoft.net/utils/cports.html) shows there's still plenty of available ports in range 1024-5000.
I'm out of ideas and would like to know if you've found a solution since you've posted your question.
Edit : I finally found the solution : a worm was present on the server (WORM_DOWNAD.A) and exhausted local ports without being noticed.