You are not logged in.
Pages: 1
Topic closed
I followed the directions to support for Vertica and it generally works great (also used the post on charting and have it feeding to a d3 global).
But it does not effectively run on startup or logon (I've trying both folders) and errors when used until I run the script manually from the console.
I don't see errors on the scripts in the catalina.out - not sure where else to look on this one.
Offline
Hi,
sorry, I missed your comment on the blogpost. Can you check the configuration in fileserver/etc/scripting/scripting.cf?
The entries scripting.startup.login and scripting.startup.rs control the automatic script-execution on login/startup.
They should either point to
fileserver/bin/onlogin.rs
fileserver/bin/onstartup.rs
if you are using a single login/startup script, or to the folders
fileserver/bin/onlogin.d
fileserver/bin/onstartup.d
if all the content in these folders should be executed. (The default, if I remember correctly, is pointing to a single script, which in turn executes the folder contents).
Cheers,
Thorsten
Hey Thorsten,
Thanks for the very quick reply. I thought that was what it would do when I looked at those files. I've included them below and they are the stock files it came loaded with.
The vertica script is bin/onstartup.d/AddVerticaSupport.groovy and is the the sample off the blog post. Again this works fine when run through the console as you detailed there.
I tried also what you mentioned above of having <rs></rs> point to the onstartup.d folder directly intead of the onlogin.rs script, then restarted the server. I am seeing the same phenomena.
scripting.cf:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<scripting>
<enable>true</enable>
<restrict>
<location>bin</location>
</restrict>
<startup>
<login>fileserver/bin/onlogin.rs</login>
<rs>fileserver/bin/onstartup.rs</rs>
</startup>
</scripting>
</configuration>
onlogin.rs:
base = "/fileserver/bin/onlogin.d";
GLOBALS.findObjects(base + "/*").each{
tout.print base + "/" + it.getName() + "..."
try{
GLOBALS.exec(base + "/" + it.getName());
tout.println "OK"
}catch(Exception e){
tout.println "ERR"
}
}
onstartup.rs:
base = "/fileserver/bin/onstartup.d";
GLOBALS.findObjects(base + "/*").each{
tout.print base + "/" + it.getName() + "..."
try{
GLOBALS.exec(base + "/" + it.getName());
tout.println "OK"
}catch(Exception e){
tout.println "ERR"
}
}
Last edited by japettyjohn (2014-02-12 22:08:48)
Offline
Hi,
I just tried the instructions and for me it's not working either. So we probably broke something in ReportServer. I'll look into this and let you know.
Cheers,
Thorsten
Hi,
I think I found the mistake I made yesterday. Perhaps the solution to you issue is equally simple:
Is it possible, that you logged in, before all the startup scripts were completed?
Try editing the addverticasupport.groovy script and add this line to the very end:
System.out.println("@@@@@@@@@@@@@@ ADDVERTICA @@@@@@@@@@@@@");
Place the script in the onstartup.d folder, restart tomcat and wait until the console displays (or the logfile contains) the ADDVERTICA line. Only after that login as root and check if vertica is available as a database.
Cheers,
Thorsten
Well well! I just tried it and it works like a charm.
Thanks for the help!
Offline
Pages: 1
Topic closed