I've got a problem with a Windows service I just simply can't get to the bottom of. What I'm trying to do is execute the HP WebInspect 9.0 application from a TeamCity build agent which runs as a Windows service. The ultimate objective is to automate security scans after the application is published to the target environment.
I have a command which executes beautifully from the command window when I'm remoted into the server:
"C:\Program Files\HP\HP WebInspect\wi.exe" -u http://mysite.com -r "Vulnerability (Classic)" -y Standard -f c:\Temp\Report.pdf -gp -v
This command returns verbose output to the terminal on a regular basis (every few minutes) and eventually drops a report in PDF format after about 13 minutes (fairly consistent duration). However, once I run it from TeamCity, I can see the the command appear in the build output on the TeamCity server but absolutely nothing after that. Even after 8 hours, it just hangs and I have no idea why.
Some more info:
- The TeamCity build agent service is running under my identity so it should have the same rights as when I execute it manually from the command line.
- If I change one of the parameters to something invalid, WebInspect returns an "invalid parameter" message so I know it's definitely being called.
- Watching processes in the task manager, I can see WI.exe start up when I begin the build so again, it's definitely executing.
- I'm not getting anything in the event logs of any use.
- I can't find any logs from WebInspect generated as a result of using the command line (although there are logs accessible from scans executed in the GUI).
- There is nothing else in the WebInspect command line switches beyond the verbose output setting which would appear to provide any more information.
My suspicion is that for some reason it's sitting there waiting for input but I have no idea why. I'm making an assumption that a service running a command under my identity should behave the same as when I'm logged onto the box and executing the same command - is this assumption wrong? Is there anything else I can look at to try and get to the bottom of this?