Solved

Change beasvc.exe default stdout log rotation parameters on BEA Weblogic Server 10.0

Posted on 2008-06-12
15
1,824 Views
Last Modified: 2013-12-10
I'm trying to change default log rotation parameters for weblogic server service as suggested here:
http://edocs.bea.com/wls/docs100/server_start/winservice.html#wp1193277

my installsvc.cmd contains:
....
set ROTATION_TYPE = TIME
set TIME_START_DATE = Jun 12 2008 15:07:00
set TIME_INTERVAL_MINS = 3
set STD_LOG=C:\logs\stdout.log
beasvc.exe -install....  -log:"%STD_LOG%"
......

This is the sniplet from the stdout.log:
......
[Thu Jun 12 15:45:09 2008] [I] [initLog] initializing logger
[Thu Jun 12 15:45:09 2008] [E] [initLog] No 'ROTATION_TYPE' header found. 'TIME' based rotation will be used by default.
[Thu Jun 12 15:45:09 2008] [E] [initLog] No 'TIME_START_DATE' header found or value is invalid. Rotation will take place every 24 hours beginning today at 23:59:59
[Thu Jun 12 15:45:09 2008] [E] [initLog] No 'TIME_INTERVAL_MINS' header found. Using the default value of 24 hours.
[Thu Jun 12 15:45:09 2008] [I] [initLog] TIME based log rotation is ON
[Thu Jun 12 15:45:09 2008] [I] [trigger] First rotation due in 29690 secs
[Thu Jun 12 15:45:09 2008] [I] [ServiceStart] console allocation successful. THREAD_DUMP redirection enabled
[Thu Jun 12 15:45:09 2008] [I] [ServiceStart] About to execute CreateThread()
.....
the service then starts ok and works with default settings, but that's not what I'm looking for...

any ideas are welcome ;)
thanks!
0
Comment
Question by:pmasek
  • 9
  • 6
15 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 21782685
Do you run the script with a user that has privileges to modify the registry? f you look a bit further down from the link you posted you will see the relevant section.
0
 

Author Comment

by:pmasek
ID: 21783271
yes, the service is running under system acount.
0
 
LVL 35

Expert Comment

by:girionis
ID: 21783324
It might sound stupid, but are you rnning the right file? Yu might have more than one and you don't run the one you need to.
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:pmasek
ID: 21783592
what you mean by 'right file'? is that the service install script? i can see the results from changes in the service install script in the log for other settings...
0
 
LVL 35

Expert Comment

by:girionis
ID: 21784679
Yes this is the one, I was just wondering if you have two instances of WebLogic installed. I can't think of anythign else, your script seems correct. The final thing I would suggest is that maybe you need to do it as the docs say, do not use "set" but rather use the hash (#) symbol (although I am pretty sure this is used for comments) in front of the settings

# ROTATION_TYPE = TIME
# TIME_START_DATE = Jul 17 2003 05:25:30
# TIME_INTERVAL_MINS = 1440
0
 

Author Comment

by:pmasek
ID: 21794720
thanks for your ideas girionis, yes i've tried with # signs instead of set but to no avail, it was failing even earlier...
0
 
LVL 35

Expert Comment

by:girionis
ID: 21794950
Have you tried without "set" and "#"? I can't think of anything else.
0
 

Author Comment

by:pmasek
ID: 21796066
tried that too... same result as with set...
0
 
LVL 35

Expert Comment

by:girionis
ID: 21798050
I am not sure what else you can try, sorry :(
0
 
LVL 35

Expert Comment

by:girionis
ID: 21801722
Can you do something else?

Define these variables

# ROTATION_TYPE = TIME
# TIME_START_DATE = date-in-required-format
# TIME_INTERVAL_MINS = number-of-minutes

in a separate file (as they are, with the hash in front of them). Name it "test.txt" for example. Make sure you press enter after the last line.

Then modify the script to start by passing this file in the log:

beasvc.exe -install....  -log:<absolute path to your test.xtx file>
0
 
LVL 35

Expert Comment

by:girionis
ID: 21801730
> Define these variables

And make sure you define them at the top of the file.
0
 

Author Comment

by:pmasek
ID: 21806157
-log:pathToFile is apath to the actual logfile in which the output will be written, it is not a parameter for configuration file...

thanks for your ideas :)
0
 
LVL 35

Accepted Solution

by:
girionis earned 500 total points
ID: 21808276
Not according to the URL you posted.

2. Edit the file you specified in the -log: pathname argument. If a file does not exist, create one.
For example, if you issued the example command in step 3. in the previous section, create a file named d:\bea\wlserver6.1\config\mydomain\myserver-stdout.txt.
3. Do one of the following:
If you want the Windows service to rotate the message file at a specific time interval regardless of file size, add the following statements ***at the top of the file***, each statement on a separate line (make sure to press the Enter or Return key after typing the last line):
# ROTATION_TYPE = TIME
# TIME_START_DATE = date-in-required-format
# TIME_INTERVAL_MINS = number-of-minutes
....
....

0
 

Author Closing Comment

by:pmasek
ID: 31466781
well, what can i say, RTFM properly! Thanks a lot girionis!
0
 
LVL 35

Expert Comment

by:girionis
ID: 21811014
I should have RTFM as well. Thanks for accepting :)
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question