Load generator bug. - Complex Event Processing

Hello,
I'm using .cmd script to run two generators.
start cmd /K runloadgen.cmd modelu_100.prop
start cmd /K runloadgen.cmd modelq_100.propmodelq_100.prop contains startRate parameter
test.csvDataFile=test_queries_500.sql
# port the server will listen on for client connection
test.port=9011
# server host (localhost if not specified)
#test.host=nwbInputQueries.csv
# do not change the packetType
test.packetType=CSV
test.secs=100
test.rate=1
test.startRate=10
test.rampUpSecs=1which causes an error
Exception :
Settings:
test.propFile=modelq_100.prop
test.mode=client
test.host=
test.port=9011
test.verbose=false
test.statInterval=2000
test.latencyStats=false
test.rate=1
test.startRate=10
test.rampUpSecs=0
test.timeSyncPort=0
test.senders=1
test.reportUnchangedQuotes=true
test.filePerSender=false
test.secs=100
test.packetType=CSV
test.stocksFile=
test.stocksFileLength=0
test.csvDataFile=test_queries_500.sql
test.ticksPerPacket=20
test.loopBack=true
test.senderSkew=0
Exception in thread "Main Thread" java.lang.RuntimeException
        at com.bea.wlevs.adapter.packet.impl.marketsim.TestMain.runClient(TestMa
in.java:279)
        at com.bea.wlevs.adapter.packet.impl.marketsim.TestMain.testRun(TestMain
.java:122)
        at com.bea.wlevs.adapter.packet.impl.marketsim.TestMain.main(TestMain.ja
va:83)It's happening only when rate is diffrent from startRate. ;-)
I hope this bug will be fixed, same like full CSV standard support not just comma split. ( less then 5 exctra characters in regex of split.. )
Quick fix:
start cmd /K runloadgen.cmd modelu_100.prop
// Short
start cmd /K runloadgen.cmd modelq_100_10inOneSecFor5sec.prop
// Sleep 5secs
ping -n 5 127.0.0.1 >NUL
// Rest with 1 row per second
start cmd /K runloadgen.cmd modelq_100.propThanks,
R.
Edited by: zatzy on 2009-11-30 16:08

Related

rwbuilder.conf /how to enter port for mailServer

I try to setup mail from oracle reports. As far as I have seen within rwbuilder.conf I have to define the mailServer. How can I enter there the necessary port no? Every trial had just as result that Oracle Reports was not starting itself. Any idea?
Sorry to say that it is currently not supported. That is, you cannot specify a different port number :-(
That said, you can write a simple script that will act as a proxy between Reports and your mail server. The script has to listen on port 25, and stream the data to/from your mail server. In your rwbuilder.conf file, you specify the mailServer as localhost.
Here's a proxying script written in Python, to start with (you need a Python interpreter for Windows/Linux/Solaris):
---- 8< ----
# mailproxy.py
from socket import *
from threading import Thread
from select import select
MAIL_HOST = 'my.mail.server'
MAIL_PORT = 2500
def handle_client(client, addr):
####print 'client:' + str(client)
####server = socket(AF_INET, SOCK_STREAM)
####server.connect((MAIL_HOST, MAIL_PORT))
####cs_pair = [client, server]
####while 1:
########read_fds, ignore, ignore = select(cs_pair, [], [])
########if not tunnel(read_fds, client, server):
############break
####print 'closing:' + str(client)
####[s.shutdown(2) for s in cs_pair if s != None]
####[s.close() for s in cs_pair if s != None]
def tunnel(read_fds, client, server):
####for fd in read_fds:
########buf = fd.recv(1024)
########if buf == None or buf == '':
############return False
########if fd == client:
############server.send(buf)
########else:
############client.send(buf)
####return True
def main():
####proxy = socket(AF_INET, SOCK_STREAM)
####proxy.bind(('', 25))
####proxy.listen(1)
####while 1:
########c = proxy.accept()
########th = Thread(target = handle_client, args = c)
########th.start()
if __name__ == '__main__':
####main()
---- >8 ----
[!!!] Replace all '#' signs with spaces (OTN Forums don't support multiple consecutive spaces, so I had to do this).
Set the values for MAIL_HOST and MAIL_PORT (see above) to your mail server, and set mailServer in rwbuilder.conf to localhost, and run this:
C:\> python mailproxy.py
Let me know if this works ;-)
PS: A Python interpreter for Windows can be downloaded here:
http://python.org/ftp/python/2.2.3/Python-2.2.3.exe
One for Linux/Solaris can be downloaded from the same site.
I have got it running.
The syntax in rwbuilder.conf has to be:
<pluginParam name="mailServer">ipaddress port</pluginParam>
for example:
<pluginParam name="mailServer">192.1.1.99 25</pluginParam>
This is not supposed to work. Have you tried with other port numbers? Port 25 is the default.
You mentioned in your original post that you want to run the mail server on a different port. Howcome you're using 25 now?
I need port 25, so I was talking in general about ports. Without the port entry it was not working. I can´t test it with another port, as the mailserver is on another site, so that I can´t change configuration there. Sorry 
BTW just to close this, what you have observed is weird. Firstly, port 25 is the default SMTP port, so it's supposed to work. Secondly, specifying the port number in the mailServer config is not supported, and as far as my knowledge goes, is not supposed to work. Since it's working for you, great!

loops in wlst

I'm trying to create a script that will configure a domain based on properties in a file and I'm have a problem finding a solution on iterating a list of managed server names I need to create. Has anyone done this? The code is below.
in properties file:
ManagedServers=('test1','test2','test3')
in wlst script:
def createServers():
# ManagedServers=('test1','test2','test3')
try:
print "attempting to create managed server"
cd('/')
for msServer in ManagedServers:
try:
theBean = cmo.lookupServer(msServer)
if theBean == None:
print "Creating Managed Server" +msServer
ms = create(msServer,'Server')
ms.setListenPort(int(ServerPort))
ms.setMSIFileReplicationEnabled(0)
ms.setManagedServerIndependenceEnabled(0)
except java.lang.UnsupportedOperationException, usoe:
print "ERROR: Unsupported Operation creating server", +usoe
except weblogic.descriptor.BeanAlreadyExistsException, bae:
print "ERROR: Managed Server " msServer " already exists"
pass
if createCluster=='true':
assign('Server', msServer, 'Cluster', clusterName)
except Exception:
print 'This resource Server with name '+msServer
print ' already exist.' 
this was answered awhile ago. the answer is:
msSplit=String(ManagedServers).split(",")

Script for starting managed server using WLST: NameError: theInterpreter

Can someone please help me with this:
I am writing a script that I can call from a linux command line, that will start a specific managed server. Right now I have this:
(The indentation in my scripts is ok, but the spaces seem to disappear when I post this. Sorry for that.)
restart.sh:
WL_HOME=/opt/bea/weblogic81
CLASSPATH=${WL_HOME}/server/lib/weblogic.jar:${WL_HOME}/common/lib/config.jar:${WL_HOME}/common/lib/comdev.jar:${WL_HOME}/common/lib/3rdparty.jar
CLASSPATH=${CLASSPATH}:./jython.jar:./wlst.jar
export CLASSPATH
PYTHONPATH=.:./extended
export PYTHONPATH
echo CLASSPATH=${CLASSPATH}
echo arg: $#
java -Dweblogic.security.TrustKeyStore=CustomTrust -Dweblogic.security.CustomTrustKeyStoreFileName=./trust.jks -Dweblogic.security.SSL.ignoreHostnameVerification=true weblogic.WLST ./restartserver.py "$#"
restartserver.py:
import wlstModule as WLST
def doConnect() :
user = "Admin"
password = "adminpassword"
adminURL = "http://servername:8001"
WLST.connect(user, password, adminURL)
def main() :
doConnect()
WLST.start("manserver1", "Server")
main()
When I call the shell script (which in turn calls the jython script) I get the following output and Error Message:
CLASSPATH=/opt/bea/weblogic81/server/lib/weblogic.jar:/opt/bea/weblogic81/common/lib/config.jar:/opt/bea/weblogic81/common/lib/comdev.jar:/opt/bea/weblogic81/common/lib/3rdparty.jar:./jython.jar:./wlst.jar
arg:
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Connecting to weblogic server instance running at http://servername:8001 as username admin ...
Successfully connected to Admin Server 'adminserver' that belongs to domain 'internet'.
Traceback (innermost last):
File "./restartserver.py", line 11, in ?
File "./restartserver.py", line 12, in main
File "/tmp/temp1.py", line 578, in start
NameError: theInterpreter
/tmp/temp1.py is a script that is automatically created when calling WLST, from what I can figure out. Line 578 reads:
def start(name, type="Server", listenAddress="localhost",port=7001,block="true"):
if connected=="false":
print "start: "+"Not connected. You will need to connect to a running server to call this function."
return
try:
WLS.start(name,type,listenAddress, port, block, theInterpreter) <------------line 578
except ScriptException,e:
if exitonerror=="true":
raise WLSTException, e.getMessage()
else:
print e.getMessage()
From what I can tell, the problem is that there is no (local or global) variable called "theInterpreter". But I can't fix that because the script is automatically generated anew each time I call my script. How can I start my server via wlst using my script?
Additional information: I am working with WebLogic 8.1sp5.
--
Edited by hanneke at 10/10/2007 11:35 PM 
I think your error comes from this
your line 578
WLS.start(name,type,listenAddress, port, block, theInterpreter)
It should be WLST.start 
No, that's not it:
lines 17 and 23 of temp1.py:
import weblogic.management.scripting.WLScriptContext as wlctx
WLS = wlctx() 
Finally found a solution: removing the import of the wlstModule and calling the wlst commands directly works.
When using the wlstModule, I was in the wrong namespace, where there was no theInterpreter.

5200:Error executing query: null

I am getting the error message 5200:Error executing query: null when trying to run a report that was perfectly fine a week ago. I searched on the internet and running the utility DeletePOV.cmd seems to resolve this issue for a lot of people. My issue is, I'm not sure what I need to modify in this file in order for it to work for me. I have tried just double clicking on this cmd file and nothing happens.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SETLOCAL
#ECHO OFF
TITLE HR Delete User POV Utility
if "%1" == "" goto Usage
if "%2" == "" goto Usage
if "%3" == "" goto Usage
if "%4" == "" goto Usage
SET CLASSPATH=F:/Hyperion/HyperionReports/lib;F:/Hyperion/HyperionReports/lib/HAB.jar;F:/Hyperion/HyperionReports/lib/HReports.jar;F:/Hyperion/HyperionReports/lib/HyperionADMWidgets.jar;F:/Hyperion/HyperionReports/lib/activation.jar;F:/Hyperion/HyperionReports/lib/jakarta-regexp-1.2.jar;F:/Hyperion/HyperionReports/lib/mail.jar;F:/Hyperion/HyperionReports/lib/swingall.jar;F:/Hyperion/common/ADM/7.0.1/lib;F:/Hyperion/common/ADM/7.0.1/lib/adm.jar;F:/Hyperion/common/ADM/7.0.1/lib/ap.jar;F:/Hyperion/common/CSS/2.5.3/lib/css-2_5_3.jar;F:/Hyperion/common/loggers/Log4j/1.2.8/lib/log4j-1.2.8.jar;F:/Hyperion/common/XML/JAXP/1.2.2/dom.jar;F:/Hyperion/common/XML/JAXP/1.2.2/jaxp-api.jar;F:/Hyperion/common/XML/JAXP/1.2.2/sax.jar;F:/Hyperion/common/XML/JAXP/1.2.2/xalan.jar;F:/Hyperion/common/XML/JAXP/1.2.2/xercesImpl.jar;F:/Hyperion/common/XML/JAXP/1.2.2/xsltc.jar;F:/Hyperion/HyperionReports/JRE/Sun/1.4.1_03/lib/i18n.jar;F:/Hyperion/HyperionReports/JRE/Sun/1.4.1_03/lib/charsets.jar;F:/Hyperion/common/XML/JDOM/0.8.0/jdom.jar;F:/Hyperion/common/JCE/1.2.2/US_export_policy.jar;F:/Hyperion/common/JCE/1.2.2/jce1_2_2.jar;F:/Hyperion/common/JCE/1.2.2/local_policy.jar;F:/Hyperion/common/JCE/1.2.2/sunjce_provider.jar;F:/Hyperion/HyperionReports/lib/planning/ext/servlet.jar
"F:\Hyperion\HyperionReports\JRE\Sun\1.4.1_03\bin\java" com.hyperion.reporting.reportstore.DeleteUserPov %1 %2 %3 %4 %5
goto End
:Usage
ECHO Usage: DeleteUserPov <ReportsAdminUserName> <AdminPassword> <ReportServerName> <DataSourceUserName>__<DataSourceServerName>__<AppName>__<DbName>__<DataSourceType> [ShowOnly]
ECHO The 4th argument can use Regular Expressions. A link which describes in detail what a regular expression is "http://jakarta.apache.org/regexp/apidocs/"
ECHO We can pass an optional 5th argument ShowOnly at the end to display a list of UserPov's which satisfy the search criterea.
ECHO
ECHO An example for Essbase datasource would be DeletePov hyperion reports localhost hyp__localhost__Sample__Basic__Essbase
ECHO An example for HFM datasource would be DeletePov hyperion reports localhost hyp__localhost__Hfm__Hfm__FinancialManagement
ECHO An example for Planning datasource would be DeletePov hyperion reports localhost hyp__localhost__Plan1__Plan1__Planning
:End
ENDLOCAL 
You will have to run the utility in the command prompt of the server. Within the command prompt, Navigate to the location where the utility is present and run the below command:
DeleteUserPov <ReportsAdminUserName> <AdminPassword> <ReportServerName> <DataSourceUserName>__<DataSourceServerName>__<AppName>__<DbName>__<DataSourceType>
An example for Essbase datasource would be DeletePov hyperion reports localhost hyp__localhost__Sample__Basic__Essbase
An example for HFM datasource would be DeletePov hyperion reports localhost hyp__localhost__Hfm__Hfm__FinancialManagement
An example for Planning datasource would be DeletePov hyperion reports localhost hyp__localhost__Plan1__Plan1__Planning
HTH-
Jasmine.

Attempting to start NodeManager with WLST

I have a WLST script that list all the configured nodemangers in a domain. I use that list to make a menu. In theory I am trying to have a user pick a nodemanager from the menu and start it without providing any other information. It's not working out well. Here is what I am doing:
#Create Menu
def display():
nm = cmo.getMachines()
menuItems = {}
num = 1
for nodeName in nm:
print "%d. %-3s" % (num, nodeName.getName())
menuItems[num] = nodeName.getName()
num = num + 1
try:
selection = raw_input("Make a Selection: ")
print ""
print "You selected %s" % menuItems[int(selection)]
choice = menuItems[int(selection)]
return choice
except KeyError, ValueError:
print "%s is not a menu option!" %
I make the following call: pick = display()
This stores the nodemanager name in var pick to use later.
I then run the following method: StartNodeManager(pick)
The contents of the method:
StartNodeManager(pick)
serverRuntime()
WLHome=cmo.getWeblogicHome()
NODEManagerHome=WLHome+'/common/nodemanager'
domainConfig()
cd('/Machines/' pick '/NodeManager/' +pick)
nodeIP = cmo.getListenAddress()
nodePort = cmo.getListenPort()
startNodeManager(verbose='true', NodeManagerHome=NODEManagerHome, ListenPort=nodePort, ListenAddress=nodeIP)
When 'startNodeManager(verbose='true', NodeManagerHome=NODEManagerHome, ListenPort=nodePort, ListenAddress=nodeIP)' command is run I get the following error:
Problem invoking WLST - Traceback (innermost last):
File "/home/beaadmin/bin/scripts/wlst/nodemanager-v103.py", line 123, in ?
File "/home/beaadmin/bin/scripts/wlst/nodemanager-v103.py", line 105, in StartNodeManager
File "<iostream>", line 1589, in startNodeManager
TypeError: setProperty(): 2nd arg can't be coerced to String
Is that saying the NodeManagerHome value is throwing the exception? When I set all the vars manually in WLST and run the startNodeManager command it runs fine.
Any ideas?
The code for the StartNodeManager method is as follows:
Edited by: cwells3rd on May 8, 2012 2:25 PM
Edited by: cwells3rd on May 8, 2012 2:27 PM 
The issue is with the ListenPort value.
cmo.getListenPort() returns an integer whereas the startNodeManager command is expecting a string.
So, your script should have an additional line for string conversion.
nodePort = cmo.getListenPort()
nodePortS=str(nodePort)
startNodeManager(verbose='true', NodeManagerHome=NODEManagerHome, ListenPort=nodePortS, ListenAddress=nodeIP)Arun 
Issue resolved, thanks for the assist Arun. 
Ran into another snag. While casting the port to a string from an int resolved the previous issue, it appears that the nodemanager I start dies when the script I use to execute it completes and exits. I am assuming that the start of the nodemanager is tied to the terminal session used by the script and when the script ends the terminal ends and taked the nodemanager process with it.
From the command line I can use the Linux/Unix 'nohup' command to get around this. Is there something similar Python/Jython/WLST call I can use? Is there a value I can add to the nodemanager.properties file to ignore the terminal when it goes away so the process remains running?
Thanks in advance. 
May be you can try the python os.spawnlp utility
import os
os.spawnlp(os.P_WAIT, 'startNodeManager')I have not personally tried it. I have picked it up from the python documentation.
http://docs.python.org/library/os.html#os.spawnl
Please try it and update me with your comments, issues etc..
Arun 
I looked that up and tried running it a couple of different ways and got the following:
os.spawnlp(os.P_WAIT, startNodeManager(verbose='true', NodeManagerHome=NODEManagerHome, ListenPort=nodePortS, ListenAddress=nodeIP))
Problem invoking WLST - Traceback (innermost last):
File "/home/beaadmin/bin/scripts/wlst/nodemanager-v103.py", line 141, in ?
File "/home/beaadmin/bin/scripts/wlst/nodemanager-v103.py", line 120, in StartNodeManager
AttributeError: class 'org.python.modules.os' has no attribute 'P_WAIT'
os.spawnlp(startNodeManager(verbose='true', NodeManagerHome=NODEManagerHome, ListenPort=nodePortS, ListenAddress=nodeIP))
Successfully launched the Node Manager.
The Node Manager process is running independent of the WLST process.
Exiting WLST will not stop the Node Manager process. Please refer
to the Node Manager logs for more information.
The Node Manager logs will be under /dsto/sw/dev/bea/WEBLOGIC.11.1/oracle11g/wlserver_10.3/common/nodemanager
Node Manager starting in the background
Problem invoking WLST - Traceback (innermost last):
File "/home/beaadmin/bin/scripts/wlst/nodemanager-v103.py", line 141, in ?
File "/home/beaadmin/bin/scripts/wlst/nodemanager-v103.py", line 120, in StartNodeManager
AttributeError: class 'org.python.modules.os' has no attribute 'spawnlp'
Still investigating..... 
I want to note that I am using ksh as a wrapper to call the Python scripts with the following command:
java weblogic.WLST -skipWLSModuleScanning -i /home/beaadmin/bin/scripts/wlst/nodemanager-v103.py $ACTION
Maybe if I use the 'nohup' utility on this call it will work. I will give it a shot and update. 
nohup didn't work, I think I had an error with the output of the utility. Still researching...

Categories

Resources