Solved

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

Posted on 2008-06-12
15
1,836 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

688 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