G Web Development Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Running G Web Example in Christina and Milan's Presentation

Hi johnsmith2022,

 

If the LabVIEW application is running on the same machine as the NI Web Server, you could leave off the open configuration altogether.

 

MilanR_0-1666534546040.png

If the LabVIEW application and the NI Web Server are running on different machines then you need to provide the configuration settings (server url, username, and password) and make sure your NI Web Server is configured to allow remote connections. The video shows configuring the NI Web Server for Simple Local Access which is useful for development and does not allow any remote connections from other machines.

 


Milan
0 Kudos
Message 11 of 18
(1,157 Views)

Hi Milan,

 

I tried removing the open, and I'm still getting an error:

 

Error -251042 occurred at NI Skyline Utilities.lvlib:Parse HTTP Error.vi:5080001

Possible reason(s):

The web server responded with error 403 Forbidden.


Complete call chain:
NI Skyline Utilities.lvlib:Parse HTTP Error.vi:5080001
NI Skyline Utilities.lvlib:Execute HTTP Verb.vi:7500001
NI Skyline Tag HTTP Library.lvlib:Open Existing Tag.vi:1500001
NI Skyline Tag HTTP Library.lvlib:Open Tag.vi:1540001
NI Skyline Tag HTTP.lvclass:Open Tag HTTP.vi:3570001
Simulate Temperature - Local NI Web Server Publishing Same Machine as Server.vi

 

My NI Web Server is set up for localhost:9090:

 

johnsmith2022_0-1666567808978.png

 

And my LabView app block diagram now looks like yours:

 

johnsmith2022_1-1666567921624.png

 

I captured a pcap session when the LabView app is running with the Open Configuration still in as I had it, and filtered for just port 9090 traffic in Wireshark.  Does the above error tell you anything?  Is there anything in particular I should be looking for in the Wireshark pcap capture session?  Thank you.

 

0 Kudos
Message 12 of 18
(1,138 Views)

Just to confirm, because I have not seen it stated explicitly, are you running the LabVIEW application on the same PC as the NI Web Server, ie not separated by a VM or any virtual network between them, etc?

 

From the same desktop that you are running the LabVIEW application you are able to visit the NI Web Server Configuration url from a Web Browser (from your screenshot the http://localhost:9090) and login with the username and password, I would expect the LabVIEW application running on the same desktop to be able to access the server url as well with the same credentials.

 

The only other recommendation I can think of is from the NI Web Server Configuration tool on the summary tab choosing the "Run guided setup to select preset settings" option and choosing Simple Local Access. as shown in the video starting at 18:25.

 

If you are still having issues you may need to check local firewall settings, debug the HTTP calls that happen inside the Tag API, you could try other urls that also map to the local server (ie 127.0.0.1:9090 or <machine_ip>:9090).

 

If the browser is able to access but not LabVIEW you may need to contact your IT to see if they are blocking applications. Another idea would be to contact ni.com/support to see if they can help debug why the LabVIEW application Tag API is not communicating with the Tag Service.

 

Edit: One more idea that came to mind in addition to the above is to make sure the data type of the tag in the Tag Viewer matches the data type used on the LabVIEW diagram. If the tag data types are not aligned that would result in an error.

 

Edit 2: You could also see if there are helpful logs on disk and the topic SystemLink Log File Locations for Troubleshooting shows their locations. But at this point we are at the edge of what I understand about the NI Web Server and the LabVIEW APIs and you may want to contact ni.com/support for more help.


Milan
0 Kudos
Message 13 of 18
(1,130 Views)

 are you running the LabVIEW application on the same PC as the NI Web Server, ie not separated by a VM or any virtual network between them, etc?

 

Yes, the G Web App and LabView app are running on the same PC as the NI Web Server

 

From the same desktop that you are running the LabVIEW application you are able to visit the NI Web Server Configuration url from a Web Browser (from your screenshot the http://localhost:9090) and login with the username and password,

 

Yes, I can log into the NI Web Server from the same PC, and also view the tags with the tagviewer service

 

choosing Simple Local Access. as shown in the video starting at 18:25.

 

I'll try that.

 

If you are still having issues you may need to check local firewall settings

 

I added a rule to the Windows Firewall, and when I query network status I see this:

Ports currently open on all network interfaces:
Port Protocol Version Program
-------------------------------------------------------------------
80 TCP Any (null)
9090 TCP Any (null)

 

So both 9090 and 80 are open.  I contacted one of our System Admins and he said a 403 error is from the application (I assume the NI Web Server), and not the Firewall.

 

make sure the data type of the tag in the Tag Viewer matches the data type used on the LabVIEW diagram

 

I'll check that.

 

You could also see if there are helpful logs on disk and the topic SystemLink Log File Locations for Troubleshooting 

 

There is only one error in the Skyline error log file, and no "salt" directory:

 

2022-10-24--07:43:05.19510 | Message | ERROR - Message.StdErr - {"timestamp":"2022-10-24T6:11:36.161Z","level":"error","message":"GenServer #PID<0.411.0> terminating\n** (stop) {:socket_error, :timeout}\nLast message: {:socket_error, :timeout}","request":{},"metadata":{"currentNode":"messageservices@127.0.0.1"}}

 

 

0 Kudos
Message 14 of 18
(1,089 Views)

choosing Simple Local Access. as shown in the video starting at 18:25.

 

That is the way I had the NI Web Server configured, although I tried both ports 80 and 9090 with the same result.

 

make sure the data type of the tag in the Tag Viewer matches the data type used on the LabVIEW diagram

 

They are both "Double".

0 Kudos
Message 15 of 18
(1,068 Views)

Hi Milan,

 

I'm not sure if you are familiar with the publish/subscribe message flow with the Systemlink interface, but I have looked at the Wireshark captures of PCAP files when only the LabView end is running (the publish side, not the G Web App side) from the RawCap.exe utility, and there's a pattern that is repeated (see the following screen shot).  There are only HTTP GETs.  Is this flow correct and complete?  I know you can't see any of the JSON contents of the messages (if there are specific messages you want to see, let me know).  I attached the PCAP file as a .7z if you want to look at it.  I never see a 403 issued in the messages.

 

johnsmith2022_0-1666644472999.png

 

0 Kudos
Message 16 of 18
(1,048 Views)

Hi johnsmith2022,

 

Unfortunately I don't have any more insight into why your machine configuration is having issues with the LabVIEW Tag APIs and I have not been able to reproduce the same error on my machine. You may consider asking in the SystemLink forums if you have a way to reproduce the behavior or opening a ticket on ni.com/support to get more help from those more familiar with the LabVIEW Tag API behaviors.

 


Milan
0 Kudos
Message 17 of 18
(1,032 Views)

Hi Milan,

 

Thank you very much for trying to help me.  I'll post a support request.  Just to check, I searched Find Examples for SystemLink, and loaded the SystemLink Alarm Client Example.  As you can see in the following screen shot, I get the same error.

 

johnsmith2022_0-1666699059447.png

 

0 Kudos
Message 18 of 18
(1,010 Views)