I have a DOORS.exe execution problem that shows up on the live server but not on its mirrored development server. And by mirrored I mean that we 'try' to keep the two servers identical. I am the engineer who implemented this system but our IT department controls updates, rights, and management of our servers.
The path of execution is like this: We have Apache running with cgi scripting enabled for python. A python script is accessed via a user on the web. The script executes a line like "C:\Program Files\Telelogic\Doors 9.0\bin\Doors.exe" -batch file.dxl -user xxxxx -password yyyyyy -W" on the server. This executes the dxl script in file.dxl which returns its output into a file. This output file is parsed by the python script to display awesomeness to the web user.
This used to work on the live server just fine until something happened. It still works on the development server. A comparison between the two shows that the python scripts, the Apache setup, the Doors installation, and the executed dxl file are all the same.
On the live server DOORS.exe returns this error:
-W- DOORS: Unable to create DOORS URL interface: DOORS is not correctly installed - neither TEMP nor DXLSERVERREGISTRY set
Let me be clear - I am not intentionally trying to do anything with the built in DOORS URL interface. Nothing about our scripts are trying to utilize the DOORS URL interface. So this specific error text confuses me.
One of the paths I've gone down is thinking that this may be some sort of permissions issue with DOORS.exe trying to access a file that it no longer has permissions to read, or something. I've gotten nowhere with that though.
Any help would be appreciated. We had a great web interface for a while ...
Rob_S - Tue Mar 13 15:18:21 EDT 2012 |
|
Re: Doors batch execution error Rob_S - Tue Mar 13 16:29:55 EDT 2012
One more notable item. When logged into the server, directly executing the '"C:\Program Files\Telelogic\Doors 9.0\bin\Doors.exe" -batch file.dxl -user xxxxx -password yyyyyy -W' line produces valid DOORS execution and the error is not seen.
|
|
Re: Doors batch execution error llandale - Tue Mar 13 17:07:25 EDT 2012
"Let me be clear .." Yes Mr. O. lol
The error seems to be Python telling you it cannot start and talk to DOORS.
Can you run the DOORS client on the production server?
Do both production and test point to the same database?
Does one have DWA installed and the other not?
When you open a black command prompt and type "set", do you see "temp" in the list?
DxlServerRegistry triggers a nagging memory about DOORS API. There was one spot in the Registry to house a particular file, and this was the only thing about DOORS that prevented multiple versions from working to gether seamlessly. Could not find it though.
-Louie
|
|
Re: Doors batch execution error Rob_S - Wed Mar 14 08:00:37 EDT 2012 llandale - Tue Mar 13 17:07:25 EDT 2012
"Let me be clear .." Yes Mr. O. lol
The error seems to be Python telling you it cannot start and talk to DOORS.
Can you run the DOORS client on the production server?
Do both production and test point to the same database?
Does one have DWA installed and the other not?
When you open a black command prompt and type "set", do you see "temp" in the list?
DxlServerRegistry triggers a nagging memory about DOORS API. There was one spot in the Registry to house a particular file, and this was the only thing about DOORS that prevented multiple versions from working to gether seamlessly. Could not find it though.
-Louie
Thanks for the response Louie,
Yes, when logged in to the production server I can run the DOORS client just fine. When logged in like this I can execute the same command string that python tries to execute without any problems (from a command prompt).
Production and test point to two different databases. I'll try pointing the test server at the production DB.
I'm not sure about the installation of DWA but it is my understanding that it requires additional licenses that I know we do not pay for.
The production server command prompt shows a temp path defined. The production server queried from python does NOT show a temp path defined. However, the working test server queried from python also does NOT show a temp path defined.
I run SysInternals Process Explorer on the server to watch what is being executed. The Apache httpd.exe does spawn DOORS.exe when the web page python script is executed. So I do think that python is at least invoking DOORS.exe - which is why I get that weird response.
|
|
Re: Doors batch execution error llandale - Wed Mar 14 14:53:21 EDT 2012 Rob_S - Wed Mar 14 08:00:37 EDT 2012
Thanks for the response Louie,
Yes, when logged in to the production server I can run the DOORS client just fine. When logged in like this I can execute the same command string that python tries to execute without any problems (from a command prompt).
Production and test point to two different databases. I'll try pointing the test server at the production DB.
I'm not sure about the installation of DWA but it is my understanding that it requires additional licenses that I know we do not pay for.
The production server command prompt shows a temp path defined. The production server queried from python does NOT show a temp path defined. However, the working test server queried from python also does NOT show a temp path defined.
I run SysInternals Process Explorer on the server to watch what is being executed. The Apache httpd.exe does spawn DOORS.exe when the web page python script is executed. So I do think that python is at least invoking DOORS.exe - which is why I get that weird response.
Understand I'm just flailing away mindlessly here, if someone has some clue please chime in.
Looked through my notes and I do see a DOORS error format "-W- DOORS: ", although I could not reproduce it. So yes it now seems DOORS is running but some command in the *.dxl is causing an error.
I'm guessing now that the Apache/Python method of invoking DOORS requires that process to log into the server under some user name that for some reason is inadequate for running the job. I wonder if the relative path of your DXL may be interpreted differently while under that user, or the DXL itself requires some settings that the user lacks, even though YOUR server user has these settings.
I would try to manually log into the Server as that user that operates Apache, and try to run your script and check out the settings. A possible inconsistence is the "addins" place, so run the following from your regular and from your Apache users while in DOORS:
print (getenv("addins")) "\n"
print (getenv("DOORSADDINS")) "\n"
-Louie
|
|
Re: Doors batch execution error Rob_S - Thu Mar 15 08:53:28 EDT 2012 llandale - Wed Mar 14 14:53:21 EDT 2012
Understand I'm just flailing away mindlessly here, if someone has some clue please chime in.
Looked through my notes and I do see a DOORS error format "-W- DOORS: ", although I could not reproduce it. So yes it now seems DOORS is running but some command in the *.dxl is causing an error.
I'm guessing now that the Apache/Python method of invoking DOORS requires that process to log into the server under some user name that for some reason is inadequate for running the job. I wonder if the relative path of your DXL may be interpreted differently while under that user, or the DXL itself requires some settings that the user lacks, even though YOUR server user has these settings.
I would try to manually log into the Server as that user that operates Apache, and try to run your script and check out the settings. A possible inconsistence is the "addins" place, so run the following from your regular and from your Apache users while in DOORS:
print (getenv("addins")) "\n"
print (getenv("DOORSADDINS")) "\n"
-Louie
I'm wondering if the "-W-" at the front of the error is indicating a problem with permissions?
I've simplified the dxl script that is executed to be about as simple as I can make it. The only thing it does is print hi. Even this simple script returns the same error.
When logged into the 2 servers as a user I see that addins and DOORSADDINS are empty. I can't see what they are from the python execution because it errors and won't run any dxl (at least on the production server).
I will look into logging into the server as the Apache user.
From the test server that is working I have pointed it at both the test DB and the production DB and it works just fine.
From the production server that is not working I have pointed it at both the test DB and the production DB and it fails both with the same message.
Thanks for the ideas - Rob
|
|
Re: Doors batch execution error Mathias Mamsch - Mon Mar 19 19:07:19 EDT 2012 Rob_S - Thu Mar 15 08:53:28 EDT 2012
I'm wondering if the "-W-" at the front of the error is indicating a problem with permissions?
I've simplified the dxl script that is executed to be about as simple as I can make it. The only thing it does is print hi. Even this simple script returns the same error.
When logged into the 2 servers as a user I see that addins and DOORSADDINS are empty. I can't see what they are from the python execution because it errors and won't run any dxl (at least on the production server).
I will look into logging into the server as the Apache user.
From the test server that is working I have pointed it at both the test DB and the production DB and it works just fine.
From the production server that is not working I have pointed it at both the test DB and the production DB and it fails both with the same message.
Thanks for the ideas - Rob
Well maybe the text of the error is not so confusing at all.
-W- DOORS: Unable to create DOORS URL interface: *DOORS is not correctly installed* - neither *TEMP* nor *DXLSERVERREGISTRY* set
Speculating: The error obviously comes from DOORS, the -W- (which means 'Warning') is typical to DOORS and it would be strange if python told you that DOORS is not correctly installed. When I consider how the URL interface of DOORS works, then it is not surprising that your error message will come independent of the DXL script. The DOORS client will try to initialize the URL interface, when starting up, so when that fails you get that warning. The reason why it seems to fail, is that the environment variables TEMP and DXLSERVERREGISTRY are not available.
When you say that DOORS.exe is invoked over Apache then probably apache has a security setting of running CGIs as a different user or as the user who runs apache. Now the question is, which windows user environment will be loaded for running the process. a) System b) Apache User c) different user. If you check which user account is used to run DOORS, you may find a difference in environment, either in the registry (HKEY_CURRENT_USER/.../DOORS) or in the system variables (check for TEMP and DXLSERVERREGISTRY).
Did you already check from DOORS if the two environment variables have been set (using getenv) in both configurations?
Just an idea, maybe it helps, regards, Mathias
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
|
Re: Doors batch execution error Rob_S - Tue Mar 20 14:09:50 EDT 2012 Mathias Mamsch - Mon Mar 19 19:07:19 EDT 2012
Well maybe the text of the error is not so confusing at all.
-W- DOORS: Unable to create DOORS URL interface: *DOORS is not correctly installed* - neither *TEMP* nor *DXLSERVERREGISTRY* set
Speculating: The error obviously comes from DOORS, the -W- (which means 'Warning') is typical to DOORS and it would be strange if python told you that DOORS is not correctly installed. When I consider how the URL interface of DOORS works, then it is not surprising that your error message will come independent of the DXL script. The DOORS client will try to initialize the URL interface, when starting up, so when that fails you get that warning. The reason why it seems to fail, is that the environment variables TEMP and DXLSERVERREGISTRY are not available.
When you say that DOORS.exe is invoked over Apache then probably apache has a security setting of running CGIs as a different user or as the user who runs apache. Now the question is, which windows user environment will be loaded for running the process. a) System b) Apache User c) different user. If you check which user account is used to run DOORS, you may find a difference in environment, either in the registry (HKEY_CURRENT_USER/.../DOORS) or in the system variables (check for TEMP and DXLSERVERREGISTRY).
Did you already check from DOORS if the two environment variables have been set (using getenv) in both configurations?
Just an idea, maybe it helps, regards, Mathias
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
After hours and hours and help from Louie and Mathias I was able to figure this out. Thank you both.
The error returned from DOORS.exe when executed through Apache:python was not really the whole error.
When I used the command line switch 'logfile' I was given this more complete error info:
-W- DOORS: Unable to create DOORS URL interface:
DOORS is not correctly installed - neither TEMP nor DXLSERVERREGISTRY set
-E- DXL: <C:\Program Files\Telelogic\DOORS 9.0/lib/dxl/batchStartupFiles/batchMode.inc:11>
could not open include file (U:\networkdir\someGlobals.inc) (Invalid argument)
Included from:
<Line:2>
I immediately knew the problem was that the Apache:python user on the server did not have access to any network drives.
Our production server had a file in batchStartupFiles/, but our development server did NOT have any files in batchStartupFiles/.
This was ultimately the issue. Someone else was doing some testing and put the file in there.
The '-W- DOORS' warning seems to not indicate the primary problem because DOORS is indeed installed just fine, and environment vars are just fine.
The warning seems to be a byproduct of the primary '-E- DXL' error seen above.
Lessons learned:
1) C:\Program Files\Telelogic\DOORS 9.0\lib\dxl\batchStartupFiles exists. I didn't know about this dir.
2) When executing DOORS.exe in batch mode, use -logfile to catch error descriptions!
3) Use configuration management tools to back up files.
THANKS
|
|
Re: Doors batch execution error llandale - Wed Mar 21 11:16:09 EDT 2012 Rob_S - Tue Mar 20 14:09:50 EDT 2012
After hours and hours and help from Louie and Mathias I was able to figure this out. Thank you both.
The error returned from DOORS.exe when executed through Apache:python was not really the whole error.
When I used the command line switch 'logfile' I was given this more complete error info:
-W- DOORS: Unable to create DOORS URL interface:
DOORS is not correctly installed - neither TEMP nor DXLSERVERREGISTRY set
-E- DXL: <C:\Program Files\Telelogic\DOORS 9.0/lib/dxl/batchStartupFiles/batchMode.inc:11>
could not open include file (U:\networkdir\someGlobals.inc) (Invalid argument)
Included from:
<Line:2>
I immediately knew the problem was that the Apache:python user on the server did not have access to any network drives.
Our production server had a file in batchStartupFiles/, but our development server did NOT have any files in batchStartupFiles/.
This was ultimately the issue. Someone else was doing some testing and put the file in there.
The '-W- DOORS' warning seems to not indicate the primary problem because DOORS is indeed installed just fine, and environment vars are just fine.
The warning seems to be a byproduct of the primary '-E- DXL' error seen above.
Lessons learned:
1) C:\Program Files\Telelogic\DOORS 9.0\lib\dxl\batchStartupFiles exists. I didn't know about this dir.
2) When executing DOORS.exe in batch mode, use -logfile to catch error descriptions!
3) Use configuration management tools to back up files.
THANKS
I have scheduled tasks that run DOORS in batch from my client, and when there is a (rare) DXL error, a black command prompt window is waiting for me in the morning with the error. In your case though, you need the "-logfile" switch because the user that is running the batch process logs out when its done, and you don't see the window.
|
|