cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Node Red Http Node not working on ctrlX

Node Red Http Node not working on ctrlX

Hello everybody,

I want to receive json data through http from my device. However, when I run Node-Red on  the virtual ctrlX i don't receive any data.I've tested  the flow on Node-Red on my local PC and it can receive http requests, but when I try to do the same on the ctrlX i don't receive any data.

For the Flow I am simply using the http input node and reply with status 200.

So simply the http node on the ctrlX is an https server.

 

kind Regards,

Mohamed

8 REPLIES 8

CodeShepherd
Community Moderator
Community Moderator

We already did some test using the same architecture then you and it is working well.

How is your ctrlX CORE virtual running? In Network adapter or port forwarding mode? In the second case you would have to add e.g. 1880:1880 to your port list.

Are you using any VPN client on your PC that can block TCP communication?

 

Hello Thank you for your reply.

When I do that i disconnect the vpn. The port forwarding is active, but why should I add port 1880, i don't really get it.

So regarding the HTTP request I am simply using the standard Node-Red node http in, where the URL is relative to node-red it looks like:

URL: 127.0.0.1:8443/node-red/input

When I try sending HTTP Posts through Postman I get the error that I am trying to send HTTP request to an HTTPS server.

The Node-Red flow is really simple it cosists only of http in node and http response node with status code 200.

 

When using the 8443 I think our reverse proxy will block it because is responsible for this port and only accepts https request.

1880 is a standard port of Node-RED (and many other http based applications)

yes, thats the standard.

But the virtual ctrlX is running on port 8443 and node-red is running on the ctrlX using page "node-red". Ending up with the URL https://127.0.0.1:8443/node-red/.

So when creating an HTTP server on Node-Red it has a URL https://127.0.0.1:8443/node-red/HTTP-Server.

I do not know how I can set it up to run on port 1880 as you mentioned? Do you have any suggestion how I can do that?

I did some tests and 1880 ist not needed in portforwarding list.

I created a test flow and used a REST client accessing this adress: https://127.0.0.1/node-red/alive

Node-RED http exampleNode-RED http example

REST client request and answerREST client request and answer

yes, that's right, but what you are doing is accessing an HTTPS Server and not an HTTP server.
I tested accessing the HTTP Server using Postman and it kept complaining that I am trying to send HTTP requests to an HTTPS server.
I would use an HTTPS request, but my connected device can only send HTTP requests. I tried as well as you said to use port 1880 by using a node Red node enabling the creation of HTTP servers on custom ports (such as 1880) and you can do that on Node-Red when it doesn't run on the ctrlX, but when trying to the same on the ctrlX the HTTP server on port 1880 cannot be created (on any custom port). Is it possible to create an app that opens an HTTP server on the ctrlX and then writes the data on the data layer, then I would be able to access the data through the data layer node on node-Red? Or is it not possible, due to security reasons?

 

In your own app you can open up any port as you like to the outer world and also be provider of data to the Data Layer. You can even be provider of data from the outside.

EDIT:
You can even add open source version of Node-RED to an own app and use this one.

I will do some tests with http on Node-RED and post feedback here.

I had some discussions with our R&D.
Our ctrlX CORE - Node-RED App is already strengthened for security purposes. So all communication is only working via the reverse proxy and so needs https.

You could install the open source version of the "normal" Node-RED snap to your ctrlX CORE then you are not bound to our security mechanisms. But beware that there is no warranty, bug fixing or intense support for this way. See this thread for further information.

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist