• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
netpi-desktop-hdmi with setting network=bridge
#11
Dear Armin,

Thank you very much for your kind support.
I found out what the problem was.

The problem was in JavaScript.
I replaced hostname with IP address when creating a WebSocket object.
========
1: var uri = "wss://" + "192.168.1.23:1880" + "/andonws"; // it was "ntb827ebad4495:1880" before.
2: var webSocket = null;
3: function open() {
4: if (webSocket == null) {
webSocket = new WebSocket(uri);
.......
========

I am not sure why the hostname is not recognized in my home network environment.
But, anyway, the websocket is working properly with an IP address.

Best regards,

Dear Armin,

Thank you very much for your kind support.
I found out what the problem was.

The problem was in JavaScript.
I replaced hostname with IP address when creating a WebSocket object.
========
1: var uri = "wss://" + "192.168.1.23:1880" + "/andonws"; // it was "ntb827ebad4495:1880" before.
2: var webSocket = null;
3: function open() {
4: if (webSocket == null) {
webSocket = new WebSocket(uri);
.......
========

I am not sure why the hostname is not recognized in my home network environment.
But, anyway, the websocket is working properly with an IP address.

Best regards,
  Reply
#12
Well I just can guess what is the problem, but I think in the Node-RED container the Hostname resolver is not automatically making the correct entry in the container file named /etc/hosts when
running in bridged mode. So you have to edit this file and add a line „192.168.1.23 <your host name>“ manually
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#13
I might remember correctly that additional entries of file /etc/hosts can be also entered in container start parameter set in Docker web UI of netPI. I think under Container network setting dialog somewhere
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#14
Dear Armin,

I really appreciate your support.
Yes, I am now able to access WebSocket by hostname after I added a pair of ip address and hostname into /etc/hosts under the HDMI container.
Your advice is so powerful!
Best regards,
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Desktop LucioFiam 5 2,520 November-5th-2022, 10:33 AM
Last Post: Armin@netPI
  Hdmi not working s.stucchi 13 6,299 February-28th-2022, 09:24 AM
Last Post: Armin@netPI
  Remot VPN connection from netPI to company network JG_KIT 6 3,052 July-8th-2021, 02:55 PM
Last Post: JG_KIT
  linux bridge eth0 and cifx0 carmel85 3 3,565 August-13th-2020, 08:41 AM
Last Post: Armin@netPI
  netPI Desktop java Hochschulstudent 13 7,864 August-13th-2020, 08:33 AM
Last Post: Armin@netPI
  Network issues after upgrading to Stretch + kernel to 5.4 carmel85 2 3,101 July-28th-2020, 03:04 PM
Last Post: Armin@netPI
  VPN tunnel to netPI and local network in 10 minutes Armin@netPI 0 2,251 June-5th-2020, 05:40 PM
Last Post: Armin@netPI
  [SOLVED] netPI with Raspbian Desktop firefly 8 5,875 November-28th-2019, 06:01 PM
Last Post: Armin@netPI
  [SOLVED] Slow network connection Andi 5 3,692 May-22nd-2019, 05:16 PM
Last Post: Armin@netPI
Information [INFO] Setting the correct timezone in a container Armin@netPI 0 1,708 February-3rd-2019, 08:23 AM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)