how to debug an expect script running on a tomcat server
Hello everyone,
I have a small expect script as follows;
when i run this script as another user the above works great!!
But when i invoke the above script from tomcat server(using a java programme to execute the script) as user "tomcat6"
the script doesn't execute fully. How can i debug this issue?
when i issue the command ps -ef;
I see that tomcat6 user has called the script and the process is running.
i also see the bash command also invoked, also i see "su randeel" command also being running.
But i don't know how to debug this issue. I am new to expect,ubuntu.
Any kind of help would be appreciated.
Thank you,
Randeel.
Last edited by radoulov; 11-25-2010 at 06:17 PM..
Reason: Code tags, please!
If all else fails, you can truss, tusc or strace the tomcat process as it get the service call that runs expect, to see where it stops. Use a realistic timeout, and it may tell you where it hung.
I have 3 servers A, B, C and server B is having some files in /u01/soa/ directory, these files i want to copy to server C, and i want to run the script from server A.
Script(Server A) --> Files at Server B (Source server) --> Copy the files to Server C(Target Server).
We dont have RSA key... (4 Replies)
My cron file. Copied $PATH
# Minute Hour Day of Month Month Day of Week Command
SHELL=/bin/ksh
PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/perl/lib:/perl/lib/lib/perl5:/perl/scripts:.:/perl/lib/local:/home/popeye:/temp
0... (3 Replies)
I have an Ubuntu machine that I'd like to update automatically. I've written an expect script to run the aptitude package manager and update my packages. Essentially it does:
aptitude update && aptitude upgrade while answering "yes" at the appropriate time.
It works quite nicely when run... (4 Replies)
Hello,
is it possible to debug a script that is already running "on-demand"?
Somehow a command like "set -x" but once you've executed the script. And another one to disable debugging?
Thank you (0 Replies)
Is there any possibility of running the PHP script in a debug mode ?
If so, do i have to download any package? Any free downloads available?
Can anyone please guide me through? Am a newbie in PHP scripting.
Thanks in Advance! (1 Reply)
Hi All,
I am using a expect script to run a shell script on remote server, the code is as follows. But the problem is that it executes only first command, and hangs it doesn't run the next commands.
spawn ssh $uid@$host
expect "password:"
send "$password\r"
expect "*\r"
send... (2 Replies)
Hi!
I want to start OO in headless mode via expect -
the oo command would be
su - root -c "/usr/lib/openoffice/program/soffice -headless -nofirststartwizard -norestore -nolockcheck -nocrashreport -nodefault -accept='socket,host=0.0.0.0,port=8100;urp;StarOffice.Service'"
and the expect... (2 Replies)
Hi,
I have installed
following software on my linux machine.
Is there anything else required to run jsp pages on linux machine?
Please Help
Here are some details that might be helpful.
# lsb_release -a
LSB Version: ... (3 Replies)
I'm new to expecting and i want to create a script to ssh to a device,check is a process is running and display that the process is running or not.This is what i have so far
After executing this script i get an error.
#!/usr/bin/expect
set timeout -1
set ip "machine ip goes here"
set... (5 Replies)
hey there
we cant seem to get jsp to load pages properly on linux running tomcat 4 server. everytime we run .jsp files, the source code comes up instead of the actual file contents. any suggestions??
cheers
mile1982 (1 Reply)