...the process returns with error code "1" ...and no other info
2008-01-04 11:08:18,177 DEBUG .2008-01-04 11:08:18,177 DEBUG DotCom.Web.WorkflowUtil.Iwov.WorkflowCommandLineDriver [(null)] - The testoutput of running C:\cygwin\bin\ps.exe is ' PID PPID PGID WINPID TTY UID STIME COMMAND 6180 1 6180 6180 con 1038 11:08:18 /usr/bin/ps'2008-01-04 11:08:18,177 DEBUG DotCom.Web.WorkflowUtil.Iwov.CommandLineUtils [(null)] - Executing command: 'C:\Interwoven\TeamSite\bin\iwgetwfobj.exe 123'2008-01-04 11:08:18,583 DEBUG DotCom.Web.WorkflowUtil.Iwov.CommandLineUtils [(null)] - I read this from our process: ***<<-- expecting XML HERE2008-01-04 11:08:18,583 DEBUG DotCom.Web.WorkflowUtil.Iwov.CommandLineUtils [(null)] - The process exit code is: '1'
are the permissions set appropriately for the path ?
Yeah, I'm redirecting both STDOUT and STDERR to the same log
The "Process" class in .NET allows you to attach listeners to the object's stdout and stderr members (just like in Java). So you can consolidate all output into one string stream an write it out to a standard log, as configured by Log4Net.
No, he could do iwgetwfojb.exe 123 2>&1...
Yeah, I'm redirecting both STDOUT and STDERR to the same log, and all I get is the following.Note that to make sure it's not the code but rather something environmental, I recently add a cygwin "ps.exe" command just before I run the iwgetwfobj command. The ps.exe command comes back just fine whereas the iwgetwfobj does not....
You guys got me thinking and instead of having the Process run the "iwgetwjobj.exe 1234" directly, I had it run a .bat file that I wrapped around the .exe. The contents of the bat file are basically:iwgetwfobj.exe 52403 > C:\Temp\bin\foo.txt 2<&1When I run that in DOS, I get the expected XML spit out into foo.txtWhen I run that from IIS, the contents of foo.txt are:"Could not connect to IWSERVER"I verified that the environment settings in the DOS prompt are the same as those in the IIS runtime, so it's not that.Any other ideas?
Are you trying to run the command from the DOS Command prompt, or from the Cygwin shell?You might find problems trying to run some of the TS CLTs from Cygwin shells.
2008-01-04 15:57:16,168 DEBUG DotCom.Web.WorkflowUtil.Iwov.CommandLineUtils [(null)] - Executing command: 'C:\Temp\bin\iwgetwfobj.bat 52403'2008-01-04 15:57:16,246 DEBUG .DotCom.Web.WorkflowUtil.Iwov.CommandLineUtils [(null)] - I read this from our process: ALLUSERSPROFILE=C:\Documents and Settings\All UsersAPR_ICONV_PATH=C:\Program Files\Subversion\iconvCommonProgramFiles=C:\Program Files\Common FilesCOMPUTERNAME=xxxxxxxxComSpec=C:\WINNT\system32\cmd.exeIWOD60HOME=C:\Interwoven\OpenDeployNGIWODHOME=C:\Interwoven\OpenDeployNGJAVA_HOME=C:\Program Files\Java\j2re1.4.2_14\LDMS_LOCAL_DIR=C:\Program Files\LANDesk\LDClient\DataNUMBER_OF_PROCESSORS=4OS=Windows_NTOs2LibPath=C:\WINNT\system32\os2\dll;Path=C:\oracle\ora92\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Common Files\Interwoven\lib;C:\Interwoven\TeamSite\bin;C:\Program Files\Common Files\Interwoven\lib;C:\Program Files\WinVi;C:\Interwoven\TeamSite\iw-perl\bin;C:\program files\java\j2re1.4.2_14\bin;C:\Interwoven\TeamSite\cssdk;C:\Program Files\Subversion\binPATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSHPath_Old=C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Common Files\Interwoven\lib;C:\Interwoven\TeamSite\bin;C:\Program Files\Common Files\Interwoven\lib;C:\Program Files\WinVi;C:\Interwoven\TeamSite\iw-perl\binPROCESSOR_ARCHITECTURE=x86PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntelPROCESSOR_LEVEL=15PROCESSOR_REVISION=0304ProgramFiles=C:\Program FilesPROMPT=$P$GSystemDrive=C:SystemRoot=C:\WINNTTEMP=C:\DOCUME~1\xxxxxxx\ASPNET\LOCALS~1\TempTMP=C:\DOCUME~1\xxxxxxxx\ASPNET\LOCALS~1\TempTS_ENV=aarfUSERDOMAIN=xxxxxxxxUSERNAME=ASPNETUSERPROFILE=C:\Documents and Settings\xxxxxxxx\ASPNETwindir=C:\WINNT Volume in drive Y is IFS Volume Volume Serial Number is E774-2000 Directory of Y:\03/15/2007 12:53p DIR default08/20/2007 04:10p DIR external 0 File(s) 0 bytes 2 Dir(s) 28,697,202,688 bytes free--- Contents of foo.txt: --- Could not connect to IWSERVER2008-01-04 15:57:16,246 DEBUG DotCom.Web.WorkflowUtil.Iwov.CommandLineUtils [(null)] - The process exit code is: '0'
Could not connect to IWSERVER...
I also tried setting the SYSTEMROOT environment var to C:\WINNT (this particular box is Windows 2000 SP4...despite what my signature says) and that didn't seem to have any impact either.
Those were good ideas, nipper and Boris.When I tried the "-s flag" to specify the server, whatever servername I gave it ended up being echoed in the "Cannot connect to ____" message.In otherwords, iwgetwfobj.exe -s localhost 123 => "Cannot connect to localhost"And iwgetwfobj.exe -s myservername 123 => "Cannot connect to my servername"And iwgetwfobj.exe -s myservername.my.domain 123 => "Cannot connect to myservername.my.domain"I also tried setting the SYSTEMROOT environment var to C:\WINNT (this particular box is Windows 2000 SP4...despite what my signature says) and that didn't seem to have any impact either.Any other ideas?