From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

web server will not start

Solved!
Go to solution

I get the following errors in the log file:

   default:2 appwebStartThread  Starting host named: "LabVIEW"
   default:1 appwebStartThread  Error: Can't open a socket on 192.168.1.2, port 80
   default:1 appwebStartThread  Error: Can't listen for HTTP on 192.168.1.2:80
   default:0 appwebStartThread  Couldn't start the server
   default:3 appwebStartThread  Thread exiting appwebStartThread (10ac)

the complete log file is attached. Does anyone have an idea?

 

0 Kudos
Message 1 of 9
(6,321 Views)

Could it be you are already running a web server on port 80? (What happens if you point your web browser to 192.168.1.2?)

Have you tried a different port?

Do you have any type of security software installed?

What is your OS version?

Message 2 of 9
(6,292 Views)

Hi Ole H,

 

One guess is something is already using port 80. Since your using Win XP open a command window ("Run. . ." cmd from start menu). Once you have a command prompt type netstat -o to list ports being used. See if there is a process using port 80 (xxx:80).

 

cheers,

 

--Russ

Message 3 of 9
(6,275 Views)
Solution
Accepted by topic author Ole_H

Thank you friends,

It's now working. I used the command netstat /i and found netstat -n which gave a listing containing among other:

  TCP    192.168.1.2:1528       74.125.79.103:80       CLOSE_WAIT
  TCP    192.168.1.2:1695       216.49.94.13:80        TIME_WAIT

whois for these ip addresses showed that Google and McAfee are using port 80.

 

I then started the Web Server with port 3363 which is default for the VI Server Configuration. The log file for the web server now showed:

   default:2 appwebStartThread  Listening for HTTP on *:3363
   default:3 appwebStartThread  Thread exiting appwebStartThread (16cc)
and look OK.

 

BUT as C:\Program Files\National Instruments\LabVIEW 8.6\www\index.html tells:

If the LabVIEW Web Server is not using TCP/IP port 80, enter the following URL into the Web browser address field (where port is the port number that the LabVIEW Web Server is using): http://localhost:port/examples.htm.

 

Now both the Example: Building a Web Service (Windows) from the LabView Help and the address book.lvproj from the NI Example finder works.

Thank You again,

Ole 

  

 

0 Kudos
Message 4 of 9
(6,253 Views)

Ole H wrote:

  TCP    192.168.1.2:1528       74.125.79.103:80       CLOSE_WAIT
  TCP    192.168.1.2:1695       216.49.94.13:80        TIME_WAIT


These entries have nothing to do with your problem, because these are outgoing connections. These connections are to port 80 of a remote server and using an ephemeral local ports of 1528 and 1695, resp. only local ports matter for your purpose.

 

Your problem is elsewhere, probably in your vague "among others..." hint. 🙂

Message 5 of 9
(6,240 Views)

I guess I have to listen when a knight of NI talks (which port?). netstat -a now shows:

     TCP    akustiko-5be985:3363   akustiko-5be985:0      LISTENING

and 3363 this is the port I successfully use for the web server. The command also gives the lines:

     TCP    akustiko-5be985:3580   akustiko-5be985:0      LISTENING

     TCP    akustiko-5be985:48080  akustiko-5be985:0      LISTENING

ending with 80. Could these have something to do with reservation of port 80 as suggested by Russ Evans xxx:80

The complete output from the command netstat -a is enclosed. 

Ole

0 Kudos
Message 6 of 9
(6,201 Views)

And yes, I have McAfee firewall installed & Windows firewall enabled.

OS is Windows XP Professional with service pack 3.

Ole

0 Kudos
Message 7 of 9
(6,196 Views)

Hi Ole,

 

try netstat -aon

 

this will give you a more complete picture of ports as well as process id's. You can then use the process id's to find in the task manager what application is using a specific port.  That is if the netstat show PID 243 is using port 3303 then open the task manger and see what application is PID 243.

 

also try typing http://127.0.0.1 

as the URL in your web browser. If you don't get an immediate unable to connect that's a good indication that something is listening to port 80.

 

Also it is easy enough to change the port LabVIEW uses to say port 85. Of course you do run a chance of the same issue if something is using port 85.

 

cheers,

 

--Russ

Message Edited by Russ Evans on 04-08-2009 04:23 PM
Message Edited by Russ Evans on 04-08-2009 04:24 PM
Message 8 of 9
(6,194 Views)

Thank you Russ,

netstat -aon gave:

  Proto  Local Address       Foreign Address        State           PID 

  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       884
and PID 884 is inetinfo.exe which the web says is a Microsoft program necessary for the stable running of the computer and should not be ended.

 

I changed the web server port to 3363 and when I am running a VI with the web publishing tool, netstat -aon and the Task Manager tell that the program using this port is LabVIEW.exe:

  TCP    0.0.0.0:3363           0.0.0.0:0              LISTENING       484

Now I feel almost like an expert. And the web publishing tool did exactly what I wanted: The possibility to supervise from the office, valve temperatures on the active side of a nuclear power plant.

Ole

0 Kudos
Message 9 of 9
(6,178 Views)