[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decwindows

Title:DECWINDOWS
Notice:DECwindows Motif V1.2-4 SSB kits: note 5519
Moderator:GRIM::MESSENGER
Created:Wed Nov 28 1990
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:5861
Total number of notes:24081

5801.0. "%X00038004 error when starting app at reboot" by RHETT::BURDEN (A bear in his natural habitat) Wed Mar 12 1997 17:13

A customer had their motif system customized to fire up an application
whenever the system rebooted.  He's trying to do the same thing under CDE,
but cannot get it to work with a non priv'd user.  We have basically been 
able to reproduce this on an OpenVMS V7.0 system by bringing up ICO
when it reboots.  We've logged the output from the files and the non-system
account (we even gave it BYPASS priv and it failed) dies when invoking ICO.

I've included the files we changed on the system to get this working:

sys$manager:decw$private_apps_setup.com
sys$manager:autologin.com
cde$path:xsession.com
sys$manager:bogus.com

We can't fine the %X00038004 error in any message file which we think will
help us figure out what's going on.  Is this the right place for asking about
this problem?

Thanks
Dave

---------------------

$ mcr decw$examples:ico
XIO:  unable to open connection TEST_DISPLAY
      after 0 requests (0 known processed) with 0 events remaining.
Cannot open display
: non-translatable vms error code: 0x2DBA002
%decw-e-cnxabort, connection aborted
$ write sys$output $STATUS
%X00038004


SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.COM

The do_default section has been added as well as the first few lines to log
messages.  I've also removed a few of the long comment sections.

$ set noon
$ set verify
$ define sys$output sys$manager:private_apps.out
$ define sys$error sys$manager:private_apps.err
$ !
$ ! DECW$PRIVATE_APPS_SETUP.TEMPLATE - Customize DECwindows Apps
$ !
$ !-----------------------------------------------------------------------------
$ ! Copyright � Digital Equipment Corporation 1988, 1996. All rights reserved.
$ ! 
$ !
$ !=============================================================================
$ !
$ !		Cluster Common or Standalone Workstation Setup
$ !
$ ! The following commented out definitions are examples of the kinds of
$ ! customizations you can make.
$ !
$  decw$start_new_desktop == "true"
$ !
$ ! decw$sylogin == "sys$manager:decw$sylogin.com"
$ !
$ ! decw$sessioninit == "run sys$system:decw$wsinit"
$ !
$ ! decw$loginlog == "sys$manager:decw$login.log"
$ ! 
$ ! decw$sessionlog == "true"
$ !
$ !=============================================================================
$ !
$ !		Cluster Member Workstation-Specific Setup
$ !
$ ! First, replace the definition of node_list with your own list of cluster
$ ! node names separated by "/".  Next, at the end of this file, add a section
$ ! for each node consisting of: a label of the form "do_NODENAME:" (where
$ ! NODENAME is the name of the particular node), followed by DCL commands
$ ! that specify the setup options for the particular node, followed by the
$ ! DCL command "$ exit".
$ !
$ node_list = ""
$ !
$ ! Here is an example list of valid node names:
$ !
$ ! node_list = "NODE1/NODE2"
$ !
$ ! The following commands dispatch to the label corresponding to the name
$ ! of the node executing this command file, provided the node name occurs
$ ! in the list of valid node names.  If the node name is not on the list,
$ ! the command file goes to the label "do_default".
$ !
$ if node_list .eqs. "" then goto do_default
$ node_number = 0
$ node_loop:
$   node = f$element(node_number,"/",node_list)
$   if node .eqs. "/" then goto do_default
$   if (node .eqs. f$getsyi("NODENAME"))then goto do_'node
$   node_number =  node_number + 1
$   goto node_loop
$ !
$ ! This node is not in the node list.  Don't specify any setup options.
$ !
$do_default:
$!
$!
$ SET DISPLAY/CREATE/NODE=0/TRANSPORT=LOCAL/EXECUTIVE_MODE TEST_DISPLAY
$ DEFINE/SYSTEM/EXEC TEST_DISPLAY 'f$trnlnm("TEST_DISPLAY")
$ sho log TEST_DISPLAY
$ DEFINE/SYSTEM/EXEC DECW$LOGIN_NORESTART TRUE
$ sho dev wsa/full
$ sho display
$!
$! Be sure to submit the following job to a queue with a base priority
$! of 4.  Also, the parameter DETACH must be uppercase.
$!
$ sho sym decw$mainapp
$ DECW$MAINAPP == -
     "SUBMIT/USER=fred/NOPRINT SYS$MANAGER:AUTOLOGIN.COM/param=DETACH"
$!
$ sho sym decw$mainapp
$!
$! The following line will force the Session Manager for the specified
$! username and it's autostart applications to start after an End
$! Session.
$!
$! DECW$SESSIONEND == "SUBMIT/NOPRINT SYS$MANAGER:AUTOLOGIN.COM/param=DETACH"
$!
$!
$! If you want the LOGIN BOX to display after an End Session, remove
$! the comment from the following line.  Then comment out the previous
$! DECW$SESSIONEND command:
$!
$ DECW$SESSIONEND == "MCR DECW$STARTLOGIN"
$!
$ exit
$ !-----------------------------------------------------------------------------
$ !
$ ! Here is an example list of setup definitions for each valid node:
$ !
$ !
$do_NODE1:
$ exit
$ !
$ !
$do_NODE2:
$ exit
$ !
$ ! Add the setup options for your nodes here.
$ !

SYS$MANAGER:AUTOLOGIN.COM

We added the first few lines plus these lines further down:

	$ sho log cde$path
	$ @cde$path:xsession.com ! for cde


$! exit
$ set noon
$ set verify
$ define sys$output sys$manager:autologin.out
$ define sys$error sys$manager:autologin.err
$!==========================
$! SYS$MANAGER:AUTOLOGIN.COM
$!==========================
$!
$! Check to see if the Batch Job is passing the "DETACH" Parameter
$! and make sure it's uppercase.  This way the detached job can run
$! and allow the Batch Job to exit rather than to stay executing in
$! the queue.
$!
$ if P1 .eqs. "DETACH" then goto DO_DETACH
$!
$! Wait a few seconds to make sure the Server Process is started or
$! reset and stable prior to attempting to connect.
$!
$ wait 00:00:15
$!
$! Define the Display logical to be used by this process from the
$! executive mode logical created in DECW$PRIVATE_APPS_SETUP.COM
$!
$ DEFINE DECW$DISPLAY TEST_DISPLAY
$ sho display
$!
$! Run the Session Manager Startup command file (or whatever you prefer).
$!
$! @SYS$MANAGER:DECW$STARTSM  ! for Motif
$ sho log cde$path
$ @cde$path:xsession.com ! for cde
$ EXIT
$!
$!
$! This is executed the first time through; invoked by the Batch Job.
$! This calls the same DCL Command file (AUTOLOGIN.COM) without a P1
$! resulting in the Session Manager application to start.
$!
$DO_DETACH:
$ RUN/DETACH SYS$SYSTEM:LOGINOUT -  ! Run as a detached process
 /INPUT=SYS$MANAGER:AUTOLOGIN.COM - ! Runs the AUTOLOGIN.COM file w/no P1
 /OUTPUT=AUTOLOGIN.LOG -            ! Outputs a log file for troubleshooting
 /AUTHORIZE                         ! /Authorize allows logicals definition
$ EXIT

CDE$PATH:XSESSION.COM

We changed the sessionmain definition.

$ set noon
$ set verify
$ define sys$error sys$output
$ define sys$output sys$manager:xsession.out
$ !
$ ! XSESSION.COM - Initialize the CDE session manager
$ !
$ !------------------------------------------------------------------------------
$ ! Copyright Digital Equipment Corporation 1996. All rights reserved.
$ ! 
$ !
$ ! if no command files executed, then status will be blank
$ !
$ if $status .EQS. "" then goto do_sylogin
$ !
$ ! if status is ok, no errors in command procedures, so start session manager
$ !
$ if $status then goto do_sylogin
$ !
$ ! sys$input points to this file, so errors will cause process to re-enter
$ ! with an error status
$ ! if error on entry, then check which phase the error occured in and go
$ ! to the next phase.
$ !
$ name = f$logical("decw$doing_session")
$ if name .EQS. "SYLOGIN" then goto do_login
$ if name .EQS. "LOGIN" then goto do_sessionmain
$ if name .EQS. "MORECOMFILES" then goto do_morecomfiles
$ if name .EQS. "SESSIONMAIN" then goto do_exit
$ !
$ ! run sylogin.com
$ !
$do_sylogin:
$ define/nolog decw$doing_session SYLOGIN
$ !
$ ! modify the Working Set Quota
$ !
$ ws = f$trnlnm("DECW$SM_WSQUOTA")
$ if ws .NES. "" then set working_set/quota='ws'/nolog
$ !
$ ! find the system wide login command procedure and execute it
$ !
$ syloginname = F$TRNLNM("SYS$SYLOGIN","LNM$SYSTEM_TABLE",,"EXECUTIVE")
$ if syloginname .EQS. "" then goto do_login
$ write sys$output "Executing ''syloginname'"
$ write sys$output ""
$ @'syloginname
$ write sys$output ""
$ !
$ ! LOGINOUT will set DECW$COMNEGATED if the /nocommand option is entered
$ ! at the username prompt.   LOGINOUT will set DECW$LGICMD to be the
$ ! login command file field in the UAF record, or the value of /command=
$ ! username qualifier, or (by default) login.com.  Get the name of the
$ ! command file and execute if if the /nocommand option was not specified.
$ !
$do_login:
$ define/nolog decw$doing_session LOGIN
$ comnegated = F$TRNLNM("DECW$COMNEGATED","LNM$PROCESS_TABLE",,"EXECUTIVE")
$ if comnegated .EQS. "TRUE" then GOTO do_morecomfiles
$ lgicmd =  F$TRNLNM("DECW$LGICMD","LNM$PROCESS_TABLE",,"EXECUTIVE")
$ if lgicmd .EQS. "" then GOTO do_morecomfiles
$ lgicmd = F$PARSE(lgicmd,"SYS$LOGIN:.COM")
$ if F$SEARCH(lgicmd) .eqs. "" then goto do_morecomfiles
$ write sys$output "Executing ''lgicmd'"
$ write sys$output ""
$ @'lgicmd
$ write sys$output ""
$ !
$ ! This procedure will look for addition command procedures in the
$ ! directories CDE$USER_DEFAULTS:[CONFIG.XSESSION_D] and
$ ! CDE$SYSTEM_DEFAULTS:[CONFIG.XSESSION_D].  Any found will be
$ ! executed in alphabetical order.
$ !
$do_morecomfiles:
$ define/nolog decw$doing_session MORECOMFILES
$usercomfiles:
$ comfile = f$search("CDE$USER_DEFAULTS:[CONFIG.XSESSION_D]*.COM")
$ if comfile .eqs. "" then goto systemcomfiles
$ write sys$output "Executing ''comfile'"
$ @'comfile
$ goto usercomfiles
$systemcomfiles:
$ comfile = f$search("CDE$SYSTEM_DEFAULTS:[CONFIG.XSESSION_D]*.COM")
$ if comfile .eqs. "" then goto do_sessionmain
$ write sys$output "Executing ''comfile'"
$ @'comfile
$ goto systemcomfiles
$ !
$ ! start the session manager - and set logical that remembers this
$ ! These logical names can be redefined in order to tailor the
$ ! applications which control your session.   The default values
$ ! are set in the CDE start up command procedures which
$ ! are shipped with CDE.
$ !
$do_sessionmain:
$ define/nolog decw$doing_session SESSIONMAIN
$! sessionmain = F$TRNLNM("CDE$SESSIONMAIN")
$ sessionmain := @sys$manager:bogus.com 
$ if sessionmain .EQS. "" then goto do_exit
$ write sys$output "Executing ''sessionmain'"
$ write sys$output ""
$ 'sessionmain
$ write sys$output ""
$ !
$ ! log out and delete the logical
$ !
$do_exit:
$ write sys$output "Exiting XSESSION.COM"
$ if f$trnlnm("decw$doing_session") .NES. "" then deassign decw$doing_session
$ stop/id=0
$ logout
$ exit 1

SYS$MANAGER:BOGUS.COM

We created this file to run the ico utility.

$! exit
$ set noon
$ set ver
$ def sys$error sys$output
$ def sys$output sys$login:bogus.out
$ sho display/symbol
$ sho symb decw$display_*
$ mcr decw$examples:ico
$ write sys$output $STATUS

SYS$SYSDEVICE:[FRED]BOGUS.OUT

Here is the log file when we run this with /user=fred.  If we run this as 
/user=system, ico comes up fine.

$ sho display/symbol

    Device:    WSA1:  [exec]
    Node:      0
    Transport: LOCAL
    Server:    0
    Screen:    0

$ sho symb decw$display_*
  DECW$DISPLAY_NODE == "0"
  DECW$DISPLAY_SCREEN == "0"
  DECW$DISPLAY_SERVER == "0"
  DECW$DISPLAY_TRANSPORT == "LOCAL"
$ mcr decw$examples:ico
XIO:  unable to open connection TEST_DISPLAY
      after 0 requests (0 known processed) with 0 events remaining.
Cannot open display
: non-translatable vms error code: 0x2DBA002
%decw-e-cnxabort, connection aborted
$ write sys$output $STATUS
%X00038004
T.RTitleUserPersonal
Name
DateLines
5801.1Xserver security?MUNICH::AUEROCHSStephan Auerochs, CSC MunichThu Mar 13 1997 05:3714
I have not tried to understand the changes. But I suppose there is a problem
with Xserver security. You get the error "non-translatable vms error code:
0x2DBA002" from ICO: this translates to "DECW$TRANSPORTMSG : %DECW-E-CNXABORT,
connection aborted". Probably you will find an entry in decw$server_0_error.log
like "invalid access from ... user FRED ...".
If nobody is logged in, then only SYSTEM is in the security list of the Xserver
as allowed to access the display (this is the default because SYSTEM has to
display the loginbox).
There are STARS-article "[Motif] Discussion of DECwindows Display Server
Security", "[Motif] How to Create Displays on Workstations That Are Not Logged
In". Try to set up a security entry for FRED as described in these articles.

Regards,
Stephan 
5801.2GRIM::MESSENGERBob MessengerThu Mar 13 1997 10:5023
When ICO.EXE can't open the display it executes this code:

                perror("Cannot open display\n");
                exit(-1);

Maybe the status code of %X38004 is generated by the C run-time library
when exit() is called with an illegal status code.

I'm not sure exactly how the CDE login process works, but it's quite
possible that dtlogin needs to set some things up (properties or whatever)
before xsession.com can be run successfully.

Another possibility is that an X program is being run before ICO for some
reason (e.g. it might be started from Fred's LOGIN.COM).  When that X
program exits it will reset the server unless it called XSetCloseDownMode
with RetainPermanent or RetainTemporary.  Then ICO might very well get a
"connection aborted" error when it tries to open a display while the
server is resetting.

Please post the contents of the customer's sys$manager:decw$server_0_error.log
file.

				-- Bob
5801.3Server log faxed to me; Shows Open3D license errorsCSC32::M_KETERMike Keter, Customer Support Center/CSThu Apr 03 1997 14:4624
The customer faxed me the decw$server_0_error.log file.  He did not have email.

The file looked normal.  The version of the server was T6.2-950505.  The 
extensions loaded were Adobe_DPS, Xie, DEC_Xtrap, Multi_Buffering, X3D_PEX,
glx, and decstereo.  The transports Common, DECnet, and Local were all attached.

Right after the ffbvmsScreenInit: and the Xtrap being loaded, it showed the
following errors:

 PexExtensionInit: PEX License Checking failed
 PEX will not run without a valid Open3D license enabled
 GLXExtensionInit: DEC OpenGL license checking failed.
 OpenGL will not run without a valid Open3D license enabled.

After this it stated:

 10:14:38 Calling the dispatcher
 10:14:51 vmsScreenClose: Closing screen down

It repeated this sequence (from the ScreenInit) 3 times.

If you want to see the fax, what is your fax number?

mike keter
5801.4GRIM::MESSENGERBob MessengerThu Apr 03 1997 15:2710
I think the Open3D license errors are normal and expected if they've
installed Open3D to get 2D device support and aren't using it for 3D work
(so they haven't installed the 3D licenses).

You should probably elevate this as an IPMT case, but I don't know if what
the customer is trying to do is supported.  The CDE login process is
different from the DECwindows login process and it might not be so easy to
bypass the normal login procedure.

				-- Bob