Operating System - OpenVMS
1827892 Members
1890 Online
109969 Solutions
New Discussion

Re: CSWS not starting Automatically (VMS 8.3)

 
OwensJ
Advisor

CSWS not starting Automatically (VMS 8.3)

I followed every step in section 2.2.1 for installing CSWS 2.1-1 on my OpenVMS 8.3 I64 Machine, and everything worked fine until I got to the section where it was trying to startup automatically.

as user system:

ran PRODUCT INSTALL CSWS /DESTINATION=DKC0:[000000]

I ran @SYS$MANAGER:APACHE$CONFIG

accepted all of the defaults, created my APACHE$WWW user and gave it a UID,groupID,password. Finished the configuration.

Ran $ @SYS$STARTUP:APACHE$STARTUP and tested it, and can access just fine. (As system)

Then did the following:
Start the HP Secure Web Server at system boot time by adding the following lines to SYS$MANAGER:SYSTARTUP_VMS.COM:
$ file := SYS$STARTUP:APACHE$STARTUP.COM
$ if f$search("''file'") .nes. "" then @'file'

Shutdown the Apache server at system shutdown time by adding the following lines to SYS$MANAGER:SYSHUTDWN.COM:
$ file := SYS$STARTUP:APACHE$SHUTDOWN.COM
$ if f$search("''file'") .nes. "" then @'file'

Rebooted the server... nothing running.
had to manually start it as system again.

What am I missing? I literally did everything word for word the install guide said to do.
18 REPLIES 18
John Gillings
Honored Contributor

Re: CSWS not starting Automatically (VMS 8.3)

Any messages in the startup log, or on the console?

I'd be adding lines like:

$ write sys$output "Starting Apache"
$ file := SYS$STARTUP:APACHE$STARTUP.COM
$ if f$search("''file'") .nes. "" then @'file'
$ write sys$output "Apache status=''$STATUS'"

Is everything that Apace depends on also started? For example, your network? All the right disks mounted? I'd expect Apache startup to be fairly late in the startup sequence.

Remember the startup process doesn't necessarily have all the same quotas as a logged in, interactive process. You may want to use a BATCH job instead:

$ IF F$SEARCH("''file'").NES."" THEN SUBMIT 'file'

(assuming batch queues are started). The batch job will get UAF quotas, rather than the startup defaults, and you get a batch log file with any error messages. If the startup takes time, you may also get the advantage of quicker boot times.
A crucible of informative mistakes
Steven Schweda
Honored Contributor

Re: CSWS not starting Automatically (VMS 8.3)

> [...] adding the following lines to
> SYS$MANAGER:SYSTARTUP_VMS.COM:
> [...]

Where in SYSTARTUP_VMS.COM? I'd vote for
some place after the IP network stuff gets
started. Do you see it (and/or its
neighbors) happening at the console? (That
is, is there any evidence that the magic
command is being executed?)

Anything interesting in the log file
(disk:[CSWS.APACHE.SPECIFIC.*]APACHE$$SERVER.LOG)?

> [...] DKC0:[...]

Is the disk mounted in time?
Rick Retterer
Respected Contributor

Re: CSWS not starting Automatically (VMS 8.3)

Mr. OwensJ,

What is the UIC for the APACHE$WWW account?

It should be as follows:

Username: APACHE$WWW Owner: SECURE WEB SERVER
Account: AP_HTTPD UIC: [477,1] ([AP_HTTPD,APACHE$WWW])
CLI: DCL Tables: DCLTABLES
Default: APACHE$ROOT:[000000]
LGICMD: LOGIN

The UIC Group Name must be AP_HTTPD, and the User must be APACHE$WWW, thus together for the UIC ([AP_HTTPD,APACHE$WWW]).

After ensuring that this is correct...

Did you run the configuration command procedure to properly set the permissions of all the files to the APACHE$WWW user? This is a MUST, otherwise, it will not allow you to startup the Apache software unless you have permissions to access, read and write the log files.

Execute the following command procedure:


$ @sys$manager:apache$config.com

HP Secure Web Server for OpenVMS Alpha
[based on Apache]

This procedure helps you define the operating environment
required to run the Secure Web Server on this system.

To operate successfully, the server processes must have read access
to the installed files and read-write access to certain other files
and directories. HP recommends that you use this procedure to
set the owner UIC on the CSWS files and directories to match the server.
You should do this each time the product is installed, but it only has
to be done once for each installation on a cluster.

Set owner UIC on CSWS files? [YES]


Do you want to enable the impersonation features provided by suEXEC?
If so, the server will support running CGIs using specified usernames.

Enable suEXEC? [NO] no
Setting ownership on files. This could take a minute or two. . . .

When this is finished, then attempt to restart your Apache Server. If it still doesn't start, then check the log file:

Apache$root:[000000]apache$sws.log

Are there any errors in this file?

Cheers,
Rick Retterer


- Rick Retterer



OwensJ
Advisor

Re: CSWS not starting Automatically (VMS 8.3)

I'll answer everyone the best that I can.

Rick,
All is configured exactly as you said...

Username: APACHE$WWW Owner: SECURE WEB SERVER
Account: AP_HTTPD UIC: [477,1] ([AP_HTTPD,APACHE$WWW])
CLI: DCL Tables: DCLTABLES
Default: APACHE$ROOT:[000000]
LGICMD: LOGIN

The UIC Group Name must be AP_HTTPD, and the User must be APACHE$WWW, thus together for the UIC ([AP_HTTPD,APACHE$WWW]).

I even re-insatlled the entire CSWS with this user already created as stated above but the result ended up the same.

There is no information pertaining to an error in the sws.log. Just your typical statistics grid.

John, I added your two additional lines as well, but I cant find any logs in my system that show the startups. I do see the shutdowns when I am SSH'd in remotely, but I dont see the startups in a log file anywhere.

Steven, I put the startup and shutdown commands for apache as the last thing the SYSTARTUP_VMS.COM runs before the exit command, so I'm pretty sure it runs after the network stack, etc.

OwensJ
Advisor

Re: CSWS not starting Automatically (VMS 8.3)

I still have no problems if I manually run startup and shutdown as the system user. I just don't get why it wont startup on its own.
B Novak
Advisor

Re: CSWS not starting Automatically (VMS 8.3)

Can't find any log file??? I would suggest setting up verbose output to capture any messages during a boot that you may be missing. It's dynamic and can be turned on or off at will. You could set it up, reboot your system, check the startup.log file in sys$system for errors/messages/? and then turn it off if choose to do so. The log files don't take up much space and can be invaluable in the event you have any other issues in the future with anything else.

To capture a verbose startup log to sys$system:startup.log, you can
issue the following commands.
$ MCR SYSMAN
SYSMAN> STARTUP SET OPTIONS/VERIFY=FULL/OUTPUT=FILE
SYSMAN> EXIT

Do your reboot and check the file sys$system:startup.log

If you want to turn it off, do the following:

To disable after, use:
SYSMAN> EXIT
SYSMAN> STARTUP SET /OPTIONS /NOVERIFY /OUTPUT=CONSOLE

Good luck!
Bob
Any temporary fix in place longer than 6 months becomes permanent.
Jan van den Ende
Honored Contributor

Re: CSWS not starting Automatically (VMS 8.3)

OwensJ,

To begin with:

WELCOME to th ITRC VMS forum!

My first action would be to edit
SYS$MANAGER:SYSTARTUP_VMS.COM
add a first line:
$ debug = f$verify(1)
and add a last line
$ dummy = f$verify('debug')

Now, change the invocation:

$ file := SYS$STARTUP:APACHE$STARTUP.COM
$ if f$search("''file'") .nes. "" then @'file'
to

$ file := SYS$STARTUP:APACHE$STARTUP.COM
$ if f$search("''file'") .nes. "" then @'file'/output=SYS$MANAGER:APACHE$STARTUP.LOG

The logfile will contain a trace of what happened. It will probably be clear from that, if not, we will take it from there.

In any case, report the final solution here!

Happy hunting.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Rick Retterer
Respected Contributor

Re: CSWS not starting Automatically (VMS 8.3)

Actually, if you are starting up Apache from Systartup_VMS.com, you are in essence starting it up as the "System" account.

I have mine set to startup at boot time by using the command:

$IF F$SEARCH("SYS$MANAGER:SYSTARTUP_VMS.COM") .NES. "" - THEN @SYS$MANAGER:SYSTARTUP_VMS.COM

And this works everytime. I don't define the command as a symbol first however. Everything is in-line.

Rick
- Rick Retterer



Rick Retterer
Respected Contributor

Re: CSWS not starting Automatically (VMS 8.3)

Ooopps, what am I thinking....


$ IF F$SEARCH("SYS$STARTUP:APACHE$STARTUP.COM") .NES. "" -
THEN @SYS$STARTUP:APACHE$STARTUP.COM


Thats' what I meant to have said.

Sorry for the confusion.

Rick
- Rick Retterer



OwensJ
Advisor

Re: CSWS not starting Automatically (VMS 8.3)

So I have gotten my issue resovled, and it was due to my lack of knowledge of how the operating system works.

The system is not running in a cluster. And I was modifying the file STARTUP_VMS.COM in the SYSMGR directory under SYS$COMMON instead of the one under SYS$ROOT. So the file was never being run at all. I was just editing a file for the fun of it.

Though in my defense, I'll have to say that the documentation never states to look at that ;) But I should know better, hey it's only my third day using this OS!

Thank you all for your help, maybe my misfortune in this will help someone else in the future!
Rick Retterer
Respected Contributor

Re: CSWS not starting Automatically (VMS 8.3)

Well, for only 3 days of hands-on with the OpenVMS software, you are doing well. Some folks never catch on to the SYS$COMMON/SYS$SYSROOT directory structures.

I hope that you fall in love with OpenVMS as I have, and many others before me have. I'm 21 years supporting OpenVMS, and I am still as enthusiastic about it today as I was 21 years ago. I hope you will be as well.

It's as rock solid OS, and built like an anvil.

This is no kidding, we had a server in our ice-lab that had been up for over 2 years without a reboot... and it was still humming along as smoothly as the day that we booted it up.

Enjoy, and thanks again for sharing with us the solution to your specific problem.

Cheers,
Rick Retterer


- Rick Retterer



RBrown_1
Trusted Contributor

Re: CSWS not starting Automatically (VMS 8.3)


Glad you got it fixed.

Since you say your are not in a cluster, in your place, the next thing I would do is get all of the command files out of SYS$SPECIFIC:[SYSMGR] and into SYS$COMMON:[SYSMGR].

Generally, you want all of your stuff in SYS$COMMON:[etc]. The SYS$SPECIFIC stuff is for node specific files when you are running in a cluster.

Have fun!
Steven Schweda
Honored Contributor

Re: CSWS not starting Automatically (VMS 8.3)

> [...] I was modifying the file
> STARTUP_VMS.COM in the SYSMGR directory
> under SYS$COMMON instead of the one under
> SYS$ROOT.

You can certainly use the one under
SYS$COMMON. Around here, for example:

ALP $ show default
SYS$SYSROOT:[SYSMGR]
= SYS$SYSROOT:[SYSMGR]
= SYS$COMMON:[SYSMGR]

ALP $ dire sys$startup:systartup_vms.com;

Directory SYS$COMMON:[SYSMGR]

SYSTARTUP_VMS.COM;15

Total of 1 file.

But that means that you can't be creating
another one under SYS$SPECIFIC, too.
SYS$SYSROOT is a search list, and the
SYS$SPECIFIC part comes before the SYS$COMMON
part, so a file under SYS$SPECIFIC takes
precedence over one under SYS$COMMON.

Note that using a typical DEC-native editor
on SYS$COMMON:[SYSMGR]SYSTARTUP_VMS.COM is
likely to get you a new version under
SYS$COMMON, but using some foreign editor
like, say, Vim, is likely to drop the new
file into SYS$SPECIFIC, the first part of the
search list. Everything's complicated. (And
traps are hidden everywhere.)
Robert Gezelter
Honored Contributor

Re: CSWS not starting Automatically (VMS 8.3)

OwensJ,

I am glad that you sorted out your immediate problem.

A good practice to avoid accidents is to never edit files using one of the search path logical names (e.g., SYS$SYSTEM, SYS$MANAGER, SYS$STARTUP). Always explicitly identify whether it is the SYS$SPECIFIC or SYS$COMMON tree together with the specific directory.

Even though your system is not in a cluster, there is a benefit to the SYS$SPECIFIC/SYS$COMMON dichotomy: It allows you to create alternate systems configurations. These make it far safer for testing changes in startup procedures and parameters.

If your system is not yet in production, you may find my article on Soloist OpenVMS Clusters on OpenVMS.org to be of interest (see http://www.openvms.org/stories.php?story=10/01/13/0826890 ).

As you explore OpenVMS, you will find that it is far more regular than many other systems. While there is no IA64 emulator (other than HPVM on the actual IA64 hardware), you may want to consider creating a virtual Alpha for personal experimentation and education on your home Windows/Linux system. It will allow you to hone your skills in total safety.

- Bob Gezelter, http://www.rlgsc.com
John Gillings
Honored Contributor

Re: CSWS not starting Automatically (VMS 8.3)

Owen,

> And I was modifying the file
>STARTUP_VMS.COM in the SYSMGR directory
>under SYS$COMMON instead of the one under
>SYS$ROOT. So the file was never being run
>at all. I was just editing a file for the
>fun of it.

So, if I'm reading this correctly, you're saying there was an existing STARTUP_VMS.COM in SYS$SPECIFIC which was masking the copy in SYS$COMMON, so the edits you made to the SYS$COMMON were not being executed. You've fixed it by applying the changes to the SYS$SPECIFIC copy.

Correct diagnosis, but probably not the best solution.

There are a few schools of thought here. My preference is to use SYS$COMMON files. Treat all systems as if they are clusters. Keep stuff out of the node specific roots in order to avoid the type of confusion you've just experienced, and to keep nodes as consistent as possible.

If there's a lot of node specific stuff, you may decide to put it in a node specific file, but I'd always add a call to the cluster common code. Something like this:

$ common=F$PARSE("SYS$COMMON",";",F$ENVIRONMENT("PROCEDURE"))
$ IF F$SEARCH(common).NES."" THEN @'common'

A crucible of informative mistakes
OwensJ
Advisor

Re: CSWS not starting Automatically (VMS 8.3)

John,

Actually my name is John as well (Owens is my last name)

$common=F$PARSE "SYS$COMMON",";",F$ENVIRONMENT("PROCEDURE"))
$ IF F$SEARCH(common).NES."" THEN @'common'

Where does this go exactly? I get that you say to treat all systems like they are clusters. So I had startup and shutdown files that existed in the sys$specific (sysroot) instances of SYSMGR which were overriding the ones in the sys$common SYSMGR that I was modifying yes. I've read some people say just to delete those files in the sys$specific.

So in your example, where are you suggesting I put those two statements? Remember I am very new to openvms.
John Gillings
Honored Contributor

Re: CSWS not starting Automatically (VMS 8.3)

John,

>I've read some people say just to delete
>those files in the sys$specific.

Probably better to move them into SYS$COMMON. The trick then, as others have said, is to always refer to the files by their cluster common name when editing. I have a sanity check procedure that looks for files in the common root which may be obscured.


As you've learned, files in a SYS$SPECIFIC root will mask one in SYS$COMMON. If you find some circumstance where it makes sense to have a separate SYS$SPECIFIC file, you can explicitly execute the SYS$COMMON version from it. For example, suppose we want to startup APACHE on just one node. I'm assuming that the TCPIP startup will be in the common startup, so we want to start APACHE after the common has completed.

SYS$SPECIFIC:[SYSMGR]STARTUP_VMS.COM

$ SET NOON ! Continue regardless of errors
$ node=F$GETSYI("NODENAME")
$ self=F$PARSE(";",F$ENVIRONMENT("PROCEDURE"))
$ WRITE SYS$OUTPUT "Executing node specific startup for ''node' at ''F$TIME()' ''self'"
$
$ ! Do stuff which needs to be done before the common startup here
$
$ common= F$PARSE("SYS$COMMON",self)
$ IF F$SEARCH(common).NES."" THEN @'common'
$
$ ! Do stuff which needs to wait until the common startup is complete here
$
$ apache="SYS$STARTUP:APACHE$STARTUP.COM"
$ IF F$SEARCH(apache).NES."" THEN @'apache'
$
$ WRITE SYS$OUTPUT "Node specific startup completed for ''node' at ''F$TIME()'"
$ EXIT

Common startup looks like this:

SYS$COMMON:[SYSMGR]SYSTARTUP_VMS.COM

$ SET NOON ! Continue regardless of errors
$ node=F$GETSYI("NODENAME")
$ self=F$PARSE(";",F$ENVIRONMENT("PROCEDURE"))
$ WRITE SYS$OUTPUT "Executing cluster common startup for ''node' at ''F$TIME()' ''self'"
$
$ ! Do startups
$
$ WRITE SYS$OUTPUT "Cluster common startup completed for ''node' at ''F$TIME()' ''self'"
$ EXIT


This is just one way to configure your cluster. In practice, it's better that all nodes in the cluster run the same software, so the startup procedure is identical for all nodes, and kept in SYS$COMMON. Having common code wherever possible means there's less chance for inconsistencies.

(I also have a policy of never hardcoding anything which can be determined easily. For example, finding the executing procedure name with F$ENVIRONMENT("PROCEDURE"), rather than coding it as "SYSTARTUP_VMS" means that identical code can be used in any of the SYS$STARTUP procedures).
A crucible of informative mistakes
Steven Schweda
Honored Contributor

Re: CSWS not starting Automatically (VMS 8.3)

> [...] The trick then, as others have said,
> is to always refer to the files by their
> cluster common name when editing. [...]

Or, as one other has said, you don't always
_need_ to do that.

Around here, for example, creating a new file
requires some care:

ALP $ show default
SYS$SYSROOT:[SYSMGR]
= SYS$SYSROOT:[SYSMGR]
= SYS$COMMON:[SYSMGR]

ALP $ edit /tpu fred.com
[...]
1 line written to file SYS$SYSROOT:[SYSMGR]fred.com;1

Wrong place. I'll move it:

ALP $ rename fred.com sys$common:

Now it's in SYS$COMMON:

ALP $ dire /date fred

Directory SYS$COMMON:[SYSMGR]

fred.com;1 22-NOV-2010 15:34:46.85

Total of 1 file.

And now, editing it with EDIT /TPU leaves the
new version in the same place:

ALP $ edit /tpu fred.com
[...]
1 line written to file SYS$COMMON:[SYSMGR]fred.com;2

ALP $ dire /date fred

Directory SYS$COMMON:[SYSMGR]

fred.com;2 22-NOV-2010 15:37:25.36
fred.com;1 22-NOV-2010 15:34:46.85

Total of 2 files.

Similarly for EDIT /EDT:

ALP $ edit /edt fred.com
[...]
*exit
SYS$COMMON:[SYSMGR]fred.com;3 1 line

ALP $ dire /date fred

Directory SYS$COMMON:[SYSMGR]

fred.com;3 22-NOV-2010 15:38:05.68
fred.com;2 22-NOV-2010 15:37:25.36
fred.com;1 22-NOV-2010 15:34:46.85

Total of 3 files.


The story may change if a non-native editor
is used:

ALP $ vim --version
VIM - Vi IMproved 6.3 (2004 June 7, compiled Apr 29 2005 10:41:09)
[...]

ALP $ vim fred.com
[...]
"SYS$SYSROOT:[SYSMGR]fred.com" 1L, 16C written

ALP $ dire /date fred

Directory SYS$SYSROOT:[SYSMGR]

fred.com;1 22-NOV-2010 15:39:52.66

Total of 1 file.

Directory SYS$COMMON:[SYSMGR]

fred.com;3 22-NOV-2010 15:38:05.68
fred.com;2 22-NOV-2010 15:37:25.36
fred.com;1 22-NOV-2010 15:34:46.85

Total of 3 files.

Grand total of 2 directories, 4 files.


So, if you avoid creating files under
SYS$SPECIFIC in the first place, then simple
editing is not guaranteed to wreck anything,
provided that you don't use the wrong editor.
Which is a good thing, as I might not be able
to remember to be that careful every time I
edit some command procedure as SYSTEM.