08-22-2008 12:25 PM
Hi!
I've upgrade to 8.6 from 8.5. I did a full uinstall of 8.5 and installed 8.6 "cleanly". In the past I've had issues when building installers for applications asking for NI Developer Suite Discs older than the most recent, so I do clean installs now.
The remote panels feature in the new version does not seem to work the same as it did in 8.5 in executable. I was able to follow the guide from the NI website to get remote panels working in my executable without a problem. Here is the guide link that I am referring too: http://digital.ni.com/public.nsf/allkb/7F95D43D3F50FCAC8625710E000068E1
The old compiled executable still works fine, but the one compiled using LabVIEW 8.6 is not.
Here is the .ini file I am using:
[Low Pressure Component Test Cell]
server.app.propertiesEnabled=True
server.ole.enabled=True
server.tcp.servic="My Computer/VI Server"
server.vi.propertiesEnabled=True
WebServer.DirectoryIndex="index.htm"
WebServer.Enabled=True
WebServer.RootPath=C:\LabVIEW\LPCTC\data
WebServer.LogPath=C:\Program Files\National Instruments\LabVIEW 8.5\www.log
WebServer.MimeTypes="htm;text/html;gif;image/gif;jpg;image/jpeg;png;image/png;txt;text/plain;html;text/html;jpeg;image/jpeg;css;text/css;llb;application/x-labview-llb;vi;application/x-labview-vi;doc;application/msword;dot;application/msword;bin;application/octet-stream;exe;application/octet-stream;rtf;application/rtf;pdf;application/pdf;ai;application/postscript;eps;application/postscript;ps;application/postscript;csh;application/x-csh;gtar;application/x-gtar;gz;application/x-gz;sh;application/x-sh;tar;application/x-tar;zip;application/zip;hqx;application/mac-binhex40;ua;audio/basic;wav;audio/wav;tif;image/tiff;tiff;image/tiff;xbm;image/x-xbitmap;rtx;text/richtext;qt;video/quicktime;mov;video/quicktime;avi;video/x-msvideo;movie;video/x-sgi-movie;aif;audio/aif;aifc;audio/aif;aiff;audio/aif;aim;application/x-aim;dif;video/x-dv;div;video/x-dv;js;application/x-javascript;pntg;image/x-macpaint;xlb;application/vnd.ms-excel;xls;application/vnd.ms-excel;ppa;application/vnd.ms-powerpoint;ppt;application/vnd.ms-powerpoint;pps;application/vnd.ms-powerpoint;pot;application/vnd.ms-powerpoint;pwz;application/vnd.ms-powerpoint;mid;audio/mid;midi;audio/mid;enc;video/mpeg;m1v;video/mpeg;mp2;video/mpeg;mpa;video/mpeg;mpe;video/mpeg;mpeg;video/mpeg;mpg;video/mpeg;psd;image/x-photoshop;bmp;image/bmp;pic;image/pic;ra;audio/vnd.rn-realaudio;rf;image/vnd.rf-realflash;rm;application/vnd.rn-realmedia;rp;image/vnd.rn-realpix;ram;audio/x-pn-realaudio;rmm;audio/x-pn-realaudio;rnx;application/vnd.rn-realplayer;rt;text/vnd.rn-realtext;rv;video/vnd.rn-realvideo;smi;application/smil;ssm;application/streamingmedia;sithqx;application/mac-binhex40;sit;application/x-stuffit"
WebServer.Port=88
WebServer.Enabled=True
WebServer.TcpAccess="c+*"
WebServer.ViAccess="+*"
DebugServerEnabled=False
DebugServerWaitOnLaunch=False
The firewall is disabled. When I try to connect the port 88 on the target machine with my web browser I get a connection refused message. With the older executable there is no problem.
Maybe the problem has to do with the new web service features of version 8.6? When I launch my new 8.6 executable, it produces the file niwebserver.conf in the executable's directory.
Any help/input is greatly appreciated!
Thank You.
-Nic
08-22-2008 02:04 PM
Hi Nic,
LabVIEW's web server was changed quite a bit in 8.6- in connection with the web services feature as you guessed.
The web server configuration no longer resides in the LabVIEW ini file. You can remove the following lines from your ini file as they no longer have meaning:
WebServer.DirectoryIndex="index.htm"
WebServer.RootPath=C:\LabVIEW\LPCTC\data
WebServer.LogPath=C:\Program Files\National Instruments\LabVIEW 8.5\www.log
WebServer.MimeTypes="htm;text/html;gif;image/gif;jpg;image/jpeg;png;image/png;txt;text/plain;html;text/html;jpeg;image/jpeg;css;text/css;llb;application/x-labview-llb;vi;application/x-labview-vi;doc;application/msword;dot;application/msword;bin;application/octet-stream;exe;application/octet-stream;rtf;application/rtf;pdf;application/pdf;ai;application/postscript;eps;application/postscript;ps;application/postscript;csh;application/x-csh;gtar;application/x-gtar;gz;application/x-gz;sh;application/x-sh;tar;application/x-tar;zip;application/zip;hqx;application/mac-binhex40;ua;audio/basic;wav;audio/wav;tif;image/tiff;tiff;image/tiff;xbm;image/x-xbitmap;rtx;text/richtext;qt;video/quicktime;mov;video/quicktime;avi;video/x-msvideo;movie;video/x-sgi-movie;aif;audio/aif;aifc;audio/aif;aiff;audio/aif;aim;application/x-aim;dif;video/x-dv;div;video/x-dv;js;application/x-javascript;pntg;image/x-macpaint;xlb;application/vnd.ms-excel;xls;application/vnd.ms-excel;ppa;application/vnd.ms-powerpoint;ppt;application/vnd.ms-powerpoint;pps;application/vnd.ms-powerpoint;pot;application/vnd.ms-powerpoint;pwz;application/vnd.ms-powerpoint;mid;audio/mid;midi;audio/mid;enc;video/mpeg;m1v;video/mpeg;mp2;video/mpeg;mpa;video/mpeg;mpe;video/mpeg;mpeg;video/mpeg;mpg;video/mpeg;psd;image/x-photoshop;bmp;image/bmp;pic;image/pic;ra;audio/vnd.rn-realaudio;rf;image/vnd.rf-realflash;rm;application/vnd.rn-realmedia;rp;image/vnd.rn-realpix;ram;audio/x-pn-realaudio;rmm;audio/x-pn-realaudio;rnx;application/vnd.rn-realplayer;rt;text/vnd.rn-realtext;rv;video/vnd.rn-realvideo;smi;application/smil;ssm;application/streamingmedia;sithqx;application/mac-binhex40;sit;application/x-stuffit"
WebServer.Port=88
You should leave in the lines:
WebServer.Enabled=True
WebServer.TcpAccess="c+*"
WebServer.ViAccess="+*"
Take a look at the contents of niwebserver.conf. Inside of the dev environment LabVIEW generates this file when you configure the web server in tools->options->web server. In a built executable you have to modify this file if you want to customize the web server configuration. Alternatively- if you turn on and configure the web server in the dev environment and then build your application the app builder should copy your web server configuration to be the configuration of the built app.
niwebserver.conf is similar in format to an Apache configuration file and you should have no trouble seeing what needs to be changed to set the port, Directory index, document root, log file, etc.
Let me know if you have any more questions or feedback.
Nathan
08-22-2008 03:08 PM
08-22-2008 04:48 PM
I think I need a little more guidence. I've adjusted the .ini file as you have suggested. I can access the VI in question via Remote Panels on my development machine. This is the niwebserver.conf file that is produced by default:
# Web server configuration file.
# Generated by LabVIEW 8.6
# 8/22/2008 10:27:08 AM
#
# Global Directives
#
ServerRoot "."
ErrorLog "./logs/error.log"
LogLevel 3
CustomLog "/Program Files/National Instruments/LabVIEW 8.6/resource/webserver/logs/access.log" "%h %l %u %t \"%r\" %>s %b"
TypesConfig mime.types
ThreadLimit 10
LoadModulePath "./modules" "./LVModules" "./.."
LoadModule LVAuth lvauthmodule
LoadModule LVSnapshot lvsnapshotmodule
LoadModule LVRFP lvrfpmodule
LoadModule dir libdirModule
LoadModule copy libcopyModule
LoadModule esp libespModule
LoadModule LvExec ws_runtime
Listen 80
#
# Directives that apply to the default server
#
ServerName default
DocumentRoot "./../../www"
Timeout 60
AddHandler LVAuthHandler
AddHandler LVSnapshotHandler .snap
AddHandler LVRFPHandler
AddHandler dirHandler
AddHandler espHandler .esp
AddHandler LvExec
AddHandler copyHandler
DirectoryIndex index.html
KeepAlive on
KeepAliveTimeout 60
---
I change that to look like:
# Web server configuration file.
# Generated by LabVIEW 8.6
# 8/22/2008 10:27:08 AM
#
# Global Directives
#
ServerRoot "."
ErrorLog "./error.log"
LogLevel 3
CustomLog "./access.log" "%h %l %u %t \"%r\" %>s %b"
TypesConfig mime.types
ThreadLimit 10
#LoadModulePath "./modules" "./LVModules" "./.."
LoadModule LVAuth lvauthmodule
LoadModule LVSnapshot lvsnapshotmodule
LoadModule LVRFP lvrfpmodule
LoadModule dir libdirModule
LoadModule copy libcopyModule
LoadModule esp libespModule
LoadModule LvExec ws_runtime
Listen 88
#
# Directives that apply to the default server
#
ServerName default
DocumentRoot "./data"
Timeout 60
AddHandler LVAuthHandler
AddHandler LVSnapshotHandler .snap
AddHandler LVRFPHandler
AddHandler dirHandler
AddHandler espHandler .esp
AddHandler LvExec
AddHandler copyHandler
DirectoryIndex index.html
KeepAlive on
KeepAliveTimeout 60
Still nothing... 😞 when I try to connect on the local machine from the web browser the error message suggests that no web server is found. I've even tried connecting to 127.0.0.1 thinking there may be access problems. No error log is produced anywhere either...that would be helpful :(.
Any help is appreciated.
-Nic
-Nic
08-22-2008 04:52 PM
08-25-2008 09:50 AM
You changed the port correctly.
Uncomment the LoadModulePath line.
Try making the path to your document root an absolute path. ie:
C:\somedir\myApp\doc
instead of
.\doc
08-25-2008 10:22 AM
Ok! I changed the error.log file path to a physical path and got this error log:
default:2 appwebStartThread Configuration for LabVIEW
default:2 appwebStartThread --------------------------------------------
default:2 appwebStartThread Host: GIZMO
default:2 appwebStartThread CPU: i686
default:2 appwebStartThread OS: WIN
default:2 appwebStartThread Distribution: xp 5
default:2 appwebStartThread OS: WIN
default:2 appwebStartThread Version: 2.3.0.0
default:2 appwebStartThread BuildType: RELEASE
default:2 appwebStartThread Started at: Mon Aug 25 09:19:55 2008
default:2 appwebStartThread Log rotation count: 0
default:2 appwebStartThread --------------------------------------------
default:2 appwebStartThread Set log level for all modules to 3
default:1 appwebStartThread Error: Can't open mime file c:/labview/lpctc2/mime.types
default:1 appwebStartThread Error: Ignoring bad directive "TypesConfig" at line 12 in C:\LabVIEW\LPCTC2\niwebserver.conf
default:2 appwebStartThread Module search path:
"./modules" "./LVModules" "./.."
default:1 appwebStartThread Error: Can't find module LVAuth
default:1 appwebStartThread Error: Ignoring bad directive "LoadModule" at line 15 in C:\LabVIEW\LPCTC2\niwebserver.conf
default:1 appwebStartThread Error: Can't find module LVSnapshot
default:1 appwebStartThread Error: Ignoring bad directive "LoadModule" at line 16 in C:\LabVIEW\LPCTC2\niwebserver.conf
default:1 appwebStartThread Error: Can't find module LVRFP
default:1 appwebStartThread Error: Ignoring bad directive "LoadModule" at line 17 in C:\LabVIEW\LPCTC2\niwebserver.conf
default:1 appwebStartThread Error: Can't find module dir
default:1 appwebStartThread Error: Ignoring bad directive "LoadModule" at line 18 in C:\LabVIEW\LPCTC2\niwebserver.conf
default:1 appwebStartThread Error: Can't find module copy
default:1 appwebStartThread Error: Ignoring bad directive "LoadModule" at line 19 in C:\LabVIEW\LPCTC2\niwebserver.conf
default:1 appwebStartThread Error: Can't find module esp
default:1 appwebStartThread Error: Ignoring bad directive "LoadModule" at line 20 in C:\LabVIEW\LPCTC2\niwebserver.conf
default:1 appwebStartThread Error: Can't find module LvExec
default:1 appwebStartThread Error: Ignoring bad directive "LoadModule" at line 21 in C:\LabVIEW\LPCTC2\niwebserver.conf
default:2 appwebStartThread Document Root for default:
"C:/LabVIEW/LPCTC2/data"
default:1 appwebStartThread Error: Can't find handler LVAuthHandler
default:1 appwebStartThread Error: Can't add handler LVAuthHandler
default:1 appwebStartThread Error: Ignoring bad directive "AddHandler" at line 30 in C:\LabVIEW\LPCTC2\niwebserver.conf
default:1 appwebStartThread Error: Can't find handler LVSnapshotHandler
default:1 appwebStartThread Error: Can't add handler LVSnapshotHandler
default:1 appwebStartThread Error: Ignoring bad directive "AddHandler" at line 31 in C:\LabVIEW\LPCTC2\niwebserver.conf
default:1 appwebStartThread Error: Can't find handler LVRFPHandler
default:1 appwebStartThread Error: Can't add handler LVRFPHandler
default:1 appwebStartThread Error: Ignoring bad directive "AddHandler" at line 32 in C:\LabVIEW\LPCTC2\niwebserver.conf
default:1 appwebStartThread Error: Can't find handler dirHandler
default:1 appwebStartThread Error: Can't add handler dirHandler
default:1 appwebStartThread Error: Ignoring bad directive "AddHandler" at line 33 in C:\LabVIEW\LPCTC2\niwebserver.conf
default:1 appwebStartThread Error: Can't find handler espHandler
default:1 appwebStartThread Error: Can't add handler espHandler
default:1 appwebStartThread Error: Ignoring bad directive "AddHandler" at line 34 in C:\LabVIEW\LPCTC2\niwebserver.conf
default:1 appwebStartThread Error: Can't find handler LvExec
default:1 appwebStartThread Error: Can't add handler LvExec
default:1 appwebStartThread Error: Ignoring bad directive "AddHandler" at line 35 in C:\LabVIEW\LPCTC2\niwebserver.conf
default:1 appwebStartThread Error: Can't find handler copyHandler
default:1 appwebStartThread Error: Can't add handler copyHandler
default:1 appwebStartThread Error: Ignoring bad directive "AddHandler" at line 36 in C:\LabVIEW\LPCTC2\niwebserver.conf
httpServer:3 appwebStartThread Host default, KeepAlive: on
default:1 appwebStartThread Error: Must have at least one handler defined
default:3 appwebStartThread Thread exiting appwebStartThread (310)
Here is my current niwebserver.conf:
# Web server configuration file.
# Generated by LabVIEW 8.6
# 8/22/2008 10:27:08 AM
#
# Global Directives
#
ServerRoot "C:\LabVIEW\LPCTC2"
ErrorLog "C:\error.log"
LogLevel 3
CustomLog "./access.log" "%h %l %u %t \"%r\" %>s %b"
TypesConfig mime.types
ThreadLimit 10
LoadModulePath "./modules" "./LVModules" "./.."
LoadModule LVAuth lvauthmodule
LoadModule LVSnapshot lvsnapshotmodule
LoadModule LVRFP lvrfpmodule
LoadModule dir libdirModule
LoadModule copy libcopyModule
LoadModule esp libespModule
LoadModule LvExec ws_runtime
Listen 88
#
# Directives that apply to the default server
#
ServerName default
DocumentRoot "C:\LabVIEW\LPCTC2\data"
Timeout 60
AddHandler LVAuthHandler
AddHandler LVSnapshotHandler .snap
AddHandler LVRFPHandler
AddHandler dirHandler
AddHandler espHandler .esp
AddHandler LvExec
AddHandler copyHandler
DirectoryIndex index.html
KeepAlive on
KeepAliveTimeout 60
Do I need to copy more files over?
08-25-2008 10:43 AM
We're just about there.
Change the server root back to ".".
Here's the problem that we're having (in case you are curious.) The serverRoot refers to the location that the server will look for all of its modules and data files- in this case it is going to be in the LV runtime engine install.
All relatives paths in the niwebserver.conf file will also be relative to the server root- not to the directory that the built application is in. That is why the document root needs to be an absolute path. That is also why you were not able to find the error log until you specified an absolute path- it was being saved relative to the server root in the runtime engine directory.
08-25-2008 12:27 PM
Hey! It works! Thanks for all your time. So I guess the only thing that should have changed from the beginning is just the document root path in that file. I was thinking that because the .conf file was in the same directory as my LabVIEW application's executable that the "." was referring to that directory, not the runtime directory. Ahh well...
Easy enough.
BTW, where exactly is the LabVIEW 8.6 runtime installed? I can't seem to locate it. I guess that is why I was confused about the whole module path thing. I was tyring to figure out why these directories didn't exist in my applciation install directory.
I've searched the C:\Program Files\National Instruments folder, and there are no signs of it there.. hmmm...
Hopefully NI will update their documentation on how to do this for 8.6. Their current article on the web site says it applies for all 8.x, but obviously that is no longer the case. I left a comment on the article mentioning the change.
08-25-2008 04:11 PM
I'm glad you got it working!
I will follow up with the documentation thing- I agree that that page you linked to needs to be updated.
On Windows the 8.6 RTE is installed here: C:\Program Files\National Instruments\Shared\LabVIEW Run-Time\8.6\