[solved] cron refuses to run a command

For some reason, cron just won't run a one particular command.
Here's my crontab:
*/1 * * * * /usr/bin/modprobed_db store &> /dev/null
*/1 * * * * touch ~/.config/modopodo &> /dev/null
The second command is there just to check cron is working. And yes, it works. Each minute it creates that file.
But the first one just won't work.
I moved it underneath the second command - no difference.
I changed cronie to dcron - no difference.
But when I try this command in terminal - it works perfectly fine.
Why?
Last edited by Lockheed (2013-11-28 07:32:18)

@WonderWoofy, that is a good point. I installed the new version and now it seems to work with cron.
However, I am still puzzled why the last one didn't work in cron, while it worked in terminal.

Similar Messages

  • [SOLVED] Perl refuses to run certain utilities

    [Aside: Sorry, not really an Arch newbie, but I am a forum and Perl newbie; not sure where else to post this.]
    I am the current maintainer of the AUR package called mesa-demos-git; it was flagged out-of-date, and I was going to examine the problem (and throw in the new VCS syntax for good measure) when I was greeted with this fun little error:
    ==> Starting build()...
    autoreconf: Entering directory `.'
    autoreconf: configure.ac: not using Gettext
    autoreconf: running: aclocal -I m4
    Attempt to reload Scalar/Util.pm aborted.
    Compilation failed in require at /usr/lib/perl5/site_perl/Data/Dumper.pm line 297.
    aclocal: error: echo failed with exit status: 1
    autoreconf: aclocal failed with exit status: 1
    Running aclocal by itself in a directory with a configure.ac fails, as one would expect from the above error (even though it has worked in the past on other packages I've updated in the last couple weeks).
    I also wasn't thinking for a while and thought it was a missing module, so I ran cpan to try to install it, but cpan fails with the same error.
    Yeah, so something's wrong with the perl configuration on my system; I tried a `pacman -Rnsdd perl` and a reinstall, but to no avail. Actually, since no package seems to own /usr/lib/perl5/site_perl/Scalar/Util.pm, I have no idea where to start.
    What's going on here and how can I even begin to solve this?
    Last edited by luolimao (2013-05-28 03:03:46)

    Does any package own anything in site_perl? I ask because that directory is empty on my system. I'm wondering if those files have been installed manually and are being used instead of the versions in core_perl/vendor_perl such as /usr/lib/perl5/core_perl/Scalar/Util.pm, for example.

  • Udev refuses to run my scrips [solved]

    I've created a udev rule at /etc/udev/rules.d/81-zte.rules with the following:
    SUBSYSTEMS=="usb", ATTRS{product}=="ZTE HSUSB Device", KERNEL=="sd?1", NAME="%k", SYMLINK+="zte", GROUP="storage", RUN+="/home/afulm/.scripts/zte.sh"
    It works except that it for some reason refuses to run my script. What have I done wrong?
    The script is a simple scripts that mounts my device:
    #/bin/bash
    notify-send 'ZTE Blade mounted.' --icon=dialog-information
    sudo mount /mnt/zte
    thunar /mnt/zte
    Last edited by afulm (2012-09-17 15:59:27)

    stewie wrote:
    #/bin/bash
    notify-send 'ZTE Blade mounted.' --icon=dialog-information
    sudo mount /mnt/zte
    thunar /mnt/zte
    Is this script executable?
    It also looks like you might have the first line wrong. I think it should be:
    #!/bin/bash
    Oops.
    lucke wrote:
    Those commands are run by root (thus sudo is redundant) and they have no knowledge of your X session.
    DISPLAY=:0.0 su yourusername -c "thunar /mnt/zte"
    would probably work and for notify-send (which uses dbus) see this topic. You can test those commands by running them as root in a virtual console and observing whether you see the desired effect in your X session.
    Thanks it works now.

  • [Solved] stumpwm: how to get rid of newline using run-shell-command

    Hi all,
    in order to set up my mode-line for stumpwm, I've been using the commad
    run-shell-command such as in:
    (setf *screen-mode-line-format*
    (list
    '(:eval (run-shell-command "date" t))
    '(:eval (run-shell-command "date" t))))
    However, each instance of run-shell-command creates an unnecessary
    newline (so that my mode line contains two lines without necessity).
    Do you know how I can get rid of this newline?
    Thanks!
    Last edited by falsum (2011-05-23 07:12:27)

    jiyuu wrote:
    I didn't test it but the function you want is 'string-trim' or 'string-right-trim'.
    You use it like this:
    (string-trim '(#\Newline) my-string)
    So in your case:
    (setf *screen-mode-line-format*
    (list
    '(:eval (string-trim '(#\Newline)
    (run-shell-command "date" t)))
    '(:eval (run-shell-command "date" t))))
    That works perfectly well. Thanks a lot jiyuu!!

  • [solved] KDE4 AltF2 no "Run Command" option, only works with menu apps

    Well, in Kubuntu, when I pressed Alt F2, and typed 'kdesudo nvidia-settings' (for example), which wasn't in the menu, there was an option to simply run the command (like with GNome, KDE3, and pretty much everything else), but on here, it doesn't show up. I'd really like to know how to add it. I'm using KDEmod BTW. EDIT: Hmm I logged off and on and it suddenly showed up, yay
    Last edited by doorknob60 (2008-09-29 04:32:45)

    The linker is compiling your binary to the default location of 0x8000000. This is fine for Linux to load as an application (even with less than 128MB memory, Linux can use the MMU on the CPU to map anything to 0x8000000). However with ring0 code you are dealing with real physical memory locations. You would need either a linker script (which you can look up, also see: http://wiki.osdev.org/Linker_Scripts) or to specify the options on the command line with
    ld -Ttext 0x100000 etc.
    0x100000 is at 1MB, so that leaves BIOS memory unaffected. For memory management past that you should read a memory map, which is beyond the scope of this.
    Edit: Fix formatting issues.
    Last edited by sdkmvx (2009-10-12 19:41:52)

  • [SOLVED] Error running install command for soundcore

    Hi,
    I use OSSv4 instead of ALSA. Everything is working correctly but I noticed an error message in the bootlog:
    systemd-udevd[204]: Error running install command for soundcore
    What does this mean? Why is there an error?
    Of course I blacklisted the ALSA module as it is described in the wiki: https://wiki.archlinux.org/index.php/OSS#Install
    best regards
    nuc
    Last edited by nuc (2013-02-07 18:09:57)

    Ok, thanks for the info.
    But why does the wiki suggest to run "install soundcore /bin/false" instead of just "blacklist soundcore"? In earlier revisions the wiki suggested to do "blacklist soundcore" (https://wiki.archlinux.org/index.php?ti … did=231068).
    Doesn't this actually have the same effect?
    EDIT:
    I found this https://wiki.archlinux.org/index.php/Ke … acklisting
    Last edited by nuc (2013-01-27 18:20:01)

  • [SOLVED] Running sudo command to be executed on dmenu

    I'm using "sudo grub-reboot 2". What is the best way to run this command with dmenu, considering that sudo is necessary, without sacrificing security?
    Last edited by Quatro (2014-08-19 00:22:24)

    My dmenu power menu script looks like this.
    power_menu.sh
    #!/bin/bash
    # dmenu2 power menu
    OPT=$(echo -e "suspend\npoweroff\nreboot" | dmenu -f -h 28 -fn "Ubuntu Mono-12" -x 460 -y 370 -w 360 -nb black -nf white -sb white -sf black )
    case $OPT in
    suspend) sudo systemctl suspend ;;
    poweroff) sudo systemctl poweroff ;;
    reboot) sudo systemctl reboot ;;
    esac
    And the following file allows me to run those commands without being prompted for a password.
    /etc/sudoers.d/include
    slithery ALL=(ALL) NOPASSWD:/usr/bin/systemctl suspend
    slithery ALL=(ALL) NOPASSWD:/usr/bin/systemctl poweroff
    slithery ALL=(ALL) NOPASSWD:/usr/bin/systemctl reboot
    Just use these as an example and you should get what you're after.
    Last edited by slithery (2014-08-18 11:52:31)

  • [SOLVED] Running Two Commands at Boot

    I've tried adding to the Startup Manager in Gnome and since that didn't work, I tried adding to rc.local to no avail. The only way I can run these scripts is manually through the terminal. The commands are to enable wireless and compiz:
    wireless.sh
    sudo wicd -foe
    /usr/bin/wicd-client
    compiz.sh
    LIBGL_ALWAYS_INDIRECT=1 compiz --replace ccp & emerald --replace &
    Here's what I put in rc.local
    /etc/rc.local
    #!/bin/bash
    # /etc/rc.local: Local multi-user startup script.
    sh ~/Scripts/wireless.sh
    LIBGL_ALWAYS_INDIRECT=1 compiz --replace ccp & emerald --replace &
    Last edited by vahnx (2010-08-31 05:30:34)

    They didn't work in rc.local since that loads before you log in (I think right after it finishes loading all the daemons). You'll need to run the full path (not using ~). Also, that won't help you with running GUI apps (like compiz, or the wicd tray icon). Also, if your sudo asks for a password that's probably why it doesn't work from Gnome startup (not sure about the compiz one, maybe try putting env before the command like "env LIBGL_ALWAYS_INDIRECT=1 compiz --replace ccp && emerald --replace" And oh yeah, to run another command it's "&&", not "&" (you can also use a
    Last edited by doorknob60 (2010-08-31 05:21:31)

  • Cron won't run ioreg, even though I can by hand - ADVANCED UNIX HELP NEEDED

    This is driving me crazy. Cron will not run the ioreg command.
    I have a script that does the following:
    #! /bin/tcsh
    set THEDATE = `date`
    set ME = `whoami`
    echo -n "$ME; $1; $THEDATE; " >> ~/Documents/BatteryStat/battery.log
    ioreg -f -n AppleSmartBattery -r | grep -e 'ExternalConnected\|CurrentCapacity\|FullyCharged\|Amperage\|LegacyBatteryInfo\ |AvgTimeToFull\|AvgTimeToEmpty\|DesignCapacity\|Temperature\|CellVoltage\|Instan tAmperage\|CycleCount\|Voltage\|IsCharging\|InstantTimeToEmpty\|TimeRemaining\|M axCapacity' | tr '\n' ';' >> ~/Documents/BatteryStat/battery.log
    echo >> ~/Documents/BatteryStat/battery.log
    If I run it from the command line I get what I expect: a bunch of data dumped to this log file. If I stick it into cron, however, I only get my login, the first argument to the script and the date. No output from the ioreg command.
    I know that cron is really just a wrapper for launchd or something like that and that the issues I am having have to do with the fact that the "user" under which the cron job is running is not the console user. Or something like that. It is all just a bit over my head. But it is certainly driving me completely insane!
    Does anyone have any ideas how to make cron actually do something useful? (this is the second time that I have tried to use cron for a script and the second time it refuses to run for what I am guessing are similar reasons).
    Any help is (or even just clues are) greatly appreciated.
    ben

    Absolute paths. Of course. Seems so obvious now but it really had me stumped. Absolute paths solved it. Mark, thank you SO much.
    My machine has been acting really really flaky with the battery and this script will hopefully help me either get a new one or find out if the PMU is the problem.
    Ray, I tried looking for the UNIX forum, but I can't find it (which is rather embarrassing... being so lost that you cannot even find the the forum where you would ask for directions). Where is it?
    Thanks again for your help.
    Ben

  • Error when running netca command

    Hi guru's,
    My database version ;11.1.0.7
    i am running netca command in linux
    in /u01/oracle/TEST/db/tech_st/11.1.0/network/admin
    i am going to TCPs litener with port 2484.
    following error is appeared
    so please Guide me to solve this problem.
    Oracle Net Services Configuration:
    Xlib: connection to ":0.0" refused by server
    Xlib: No protocol specified
    java.lang.NullPointerException
    at oracle.ewt.lwAWT.BufferedApplet.<init>(Unknown Source)
    at oracle.net.ca.NetCA.<init>(Unknown Source)
    at oracle.net.ca.NetCA.main(Unknown Source)
    Oracle Net Services configuration failed. The exit code is -1
    Regards,
    ***SBJ***

    user8909477 wrote:
    i am running netca command in linuxGreat. But WHICH Linux???? Surprisingly it makes a difference. Just like asking to talk to a person, and specifying by family name, you might get the mother, the father, the son - and each might give a different response.
    >
    in /u01/oracle/TEST/db/tech_st/11.1.0/network/admin
    i am going to TCPs litener with port 2484.
    following error is appeared
    so please Guide me to solve this problem.
    Oracle Net Services Configuration:
    Xlib: connection to ":0.0" refused by server
    Xlib: No protocol specified
    Are you logging on as root? Are you SU'ing to Oracle or trying to run as riit?
    Try logging out - all the way out. Don't stop there, you need to log ALL the way out.
    And then log in as user Oracle.
    Logging in as root causes all sorts of headaches. Only SU to root, and then only when you absolutely need it.
    Now that you have logged out of root, and logged in (not just su'd) to oracle, what happens??

  • Cron job not running - script uses rsync, ssh (with id_rsa)

    Does anyone know how to get cron to run a rsync/ssh script which uses id_rsa for passwordless logins?
    I have a backup script I have slaved for months over that works wonderfully when running it from the command line.
    It uses rsync and connects with SSH (passwordless using ssh keys). I have setup id_rsa and id_rsa.pub for passwordless logins (this is my user account, and connects using root@ to the server)
    As stated all works find when run from the command line. But when I setup a cron job to run this file (exact same line I run from the command line) it does not execute. Actually, it does run, as I have an email notifiction which sends to me. It is just the rsync/ssh part that does not run.
    I have spent days and days trying to figure it out. No error messages occur, nothing.  Took me a while to find out cron is emailing the user account on Lion the messages (not to a proper email address).
    The error shows a permission denied, which I believe to be the cron user cannot use the id_rsa/ssh connection.
    Cron is running the script as my user, the same I use on the command line. I even tried copying the id_rsa to the root user .ssh folder in case cron is running as root but that does not work either.
    So does anyone know how to get cron to run this rsync/ssh script which used id_rsa for passwordless logins?
    Thanks a lot

    YES! Got it working, finally!
    So the issue is indeed cron/launchd not being able to access the ssh-agent which holds the key.
    So this is the solution...
    Download keychain for Mac:
    http://www.funtoo.org/wiki/Keychain
    Then once its installed and configured, the script to run needs this added to the top:
    eval `keychain --noask --eval id_rsa` || exit 1
    Note I am using id_rsa whereas keychains instructions refer to id_dsa so I just changed it and it works OK.
    When the script runs the first time it asks for the key password. Then it works from then on.
    What I do not know yet is will I need to re-enter the password when I logoff/logon again. That will cause an issue as I auto restart the Mac every day which means if I am off for a few days backup will stop (can you see the madness in this issue!).

  • How to use addKeyListener in a program running using command prompt

    Does anyone have any idea how to add the addKeyListener to a program running using command prompt.
    Let me explain how the program run.
    The program is start and accept call from other program. But from time to time, I need to issue some command by pressing the keyboard, let say, ESC is closed the program, F1 is showing the stated. F2.... (This is all need to run in the command prompt windows)
    My problem is this program does not have any gui interface, so how can it be added?
    i do it this way
    public void key(){          
    addKeyListener(this);
    But it have compile error.
    mainServerImpl.java:87: cannot resolve symbol
    symbol : method addKeyListener (mainServerImpl)
    location: class mainServerImpl
    addKeyListener(this);
    I did implement KeyListener. But just don't know how to solve this error.
    can anyone tell me how to solve it or point me a source that can help.
    Thank in advance!
    Regards,
    Tai Tan

    Write your own Thread, to do this:
    public class KeyThread extends Thread {
       public void run {
          while(true) {
             int i = System.in.read();
             if(i == 123) {
                break; // to stop the thread
    // in your main:
    Thread keyThread = new KeyThread();
    keyThread.start(); // calls run() of the thread

  • Running ssh command from java and then answering password prompt

    Hi,
    I have a situation that has not solved yet. I am running ssh command from unix terminal without any problem, and then i enter password.
    For example :
    [oracle@fuata]:/export/home/oracle> ssh -N [email protected] -L 9901:127.0.0.1:9999
    Password:
    It is working. I have question that how can i perform this in java? I am thinking that i can run ssh command by using Runtime Class, it is ok. But how can i answer the password? I am a bit confused. Is there any example looks like this?
    Thanks for responses.

    futi wrote:
    Thanx. Firstly i insisted to do this without jsch but actually this is harder than jsch. I edit some of code pieces PortForwardingL.java and could run it. It works problem-free. Could you say why you "insisted" on this approach. It can't be for speed+ since jsch is very fast. It can't be for portability+ since jsch is portable but the use of Runtime.exec() requires the installation of ssh software. It can't be because of limitations+ since jsch is a fully featured library. It can't be for security+ since jsch is secure. It can't be for ease of use+ since jsch is much easier to use than ssh with Runtime.exec(). Unless it's a licensing issue, it can't be for commercial+ reasons since jsch is free. The only reason I can think of why one would "insisted" on this approach is if it is for some college project.

  • WLST - Failing to run nmConnect() command / node manager becomes unreachabl

    Hello guys,
    I'm facing some issues to setup some configurations of one application that I've deployed on weblogic 10.3.3.0.
    One of the needed steps in order to configure this applications is open the WLST in offline mode an run 2 commands:
    */bea/mytrack/wlserver_10.3/common/bin/wlst.sh*
    Then I try to connect in the nodemanager:
    * wls:/offline> nmConnect('admin30800','weblogic_password',port='30801',domainName='track30800')*
    The following error returns:
    Connecting to Node Manager ...
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=thawte Primary Root CA - G3,OU=(c) 2008 thawte\, Inc. - For authorized use only,OU=Certification Services Division,O=thawte\, Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 3,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 2,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R3". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "OU=Security Communication RootCA2,O=SECOM Trust Systems CO.\,LTD.,C=JP". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=VeriSign Universal Root Certification Authority,OU=(c) 2008 VeriSign\, Inc. - For authorized use only,OU=VeriSign Trust Network,O=VeriSign\, Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=KEYNECTIS ROOT CA,OU=ROOT,O=KEYNECTIS,C=FR". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GeoTrust Primary Certification Authority - G3,OU=(c) 2008 GeoTrust Inc. - For authorized use only,O=GeoTrust Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    Traceback (innermost last):
    File "<console>", line 1, in ?
    File "<iostream>", line 123, in nmConnect
    File "<iostream>", line 646, in raiseWLSTException
    WLSTException: Error occured while performing nmConnect : Cannot connect to Node Manager. : Access to domain 'track30800' for user 'admin30800' denied
    I did some research and found this thread here: http://kr.forums.oracle.com/forums/thread.jspa?threadID=788163
    that solves the initial problem, however after I performed the nmConnect and a storeUserConfig() command, I exit() from the WLST and restart the node manager with success, the node manager becomes unreachable.
    I used the WL adm console and access -> appdomain -> environments -> machines -> monitoring -> node manager status to check the unreachable status.
    Thanks in advance,
    Davinod

    Nice it worked!!
    However when I try to start the servers controlled by this node manager I got this error:
    -sh-3.2$ <Jul 14, 2011 8:43:42 AM> <WARNING> <Exception while starting server 'track30800-01'>
    java.io.FileNotFoundException: /u01/track30800/user_projects/domains/track30800/servers/track30800-01/data/nodemanager/boot.properties (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at weblogic.nodemanager.server.ServerManager.saveBootIdentity(ServerManager.java:495)
    at weblogic.nodemanager.server.ServerManager.saveStartupConfig(ServerManager.java:438)
    at weblogic.nodemanager.server.ServerManager.start(ServerManager.java:301)
    at weblogic.nodemanager.server.Handler.handleStart(Handler.java:567)
    at weblogic.nodemanager.server.Handler.handleCommand(Handler.java:118)
    at weblogic.nodemanager.server.Handler.run(Handler.java:70)
    at java.lang.Thread.run(Thread.java:619)
    Jul 14, 2011 8:43:42 AM weblogic.nodemanager.server.Handler handleStart
    WARNING: Exception while starting server 'track30800-01'
    java.io.FileNotFoundException: /u01/track30800/user_projects/domains/track30800/servers/track30800-01/data/nodemanager/boot.properties (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at weblogic.nodemanager.server.ServerManager.saveBootIdentity(ServerManager.java:495)
    at weblogic.nodemanager.server.ServerManager.saveStartupConfig(ServerManager.java:438)
    at weblogic.nodemanager.server.ServerManager.start(ServerManager.java:301)
    at weblogic.nodemanager.server.Handler.handleStart(Handler.java:567)
    at weblogic.nodemanager.server.Handler.handleCommand(Handler.java:118)
    at weblogic.nodemanager.server.Handler.run(Handler.java:70)
    at java.lang.Thread.run(Thread.java:619)
    <Jul 14, 2011 8:43:42 AM CDT> <Error> <NodeManager> <BEA-300048> <Unable to start the server track30800-01 : Exception while starting server 'track30800-01'>
    Edited: Should I change the chmod for 777 for this file in order to check that all users have write permission?
    -rw-r--r-- 1 root iluser 193 Jun 24 11:05 boot.properties
    Did I miss a step?
    Thanks,
    Davinod
    Edited by: davinod on Jul 14, 2011 6:58 AM

  • Running Unix Command from WEB-APPLICATION

    Hi all,
    I want to run unix command from a java-based web application. the basic code part is this ---
    public class RunCommand
          public String runIt()
              String s = null, returnString = "";
              Process p=null;
              try
                       Runtime rt = Runtime.getRuntime();
                  p = rt.exec("sh testPOC.ksh");
                  p.waitFor();
                  BufferedReader stdInput = new BufferedReader(new
                       InputStreamReader(p.getInputStream()));
                  BufferedReader stdError = new BufferedReader(new
                       InputStreamReader(p.getErrorStream()));
                  // read the output from the command
                  returnString += "Here is the standard output of the command:<br>";
                  while ((s = stdInput.readLine()) != null) {
                      returnString += s;
                  // read any errors from the attempted command
                  returnString += "Here is the standard error of the command (if any): <br>";
                  while ((s = stdError.readLine()) != null) {
                      returnString += s;
              catch (IOException e)
                  returnString += "exception happened - here's what I know: ";
                  returnString += "error-> " + e.getMessage();
              catch(Exception e)
                returnString += "exception happened - here's what I know: ";
                  returnString += "error-> " + e.getMessage();
              return returnString;
      }this class is kept as an inner class. The control comes to its outer class, from servlet, from which the runit() is called. but the exception is occuring at line of p=rt.exec(.....). it tells "<command name> : not found transaction completed" [got this using getMessage() method].
    i am unable to show(and see, too) the stacktrace, because i don't have access to that test environment and its log. i can't run this in local because its windows one.
    now can anyone tell me, where is the problem. is there any limitation in web application server/container? this was successful when i used command prompt writing a .java file. Please help me. Thanks in advance...

    Friends, i've got, where the problem is.
    when we run a class file directly from a command prompt, we get an environment with that shell window. but for a servlet application running these kind of commands from a class creates kind of child processes. each and every command is executed as a child process of jvm and don't get those environment. we have 'PATH' variable in the environment. when a command (say, 'dir' or 'sh' or 'ls', etc.) is executed, the shell first search for that executable file (i.e. dir / sh / ls) in the given paths in the variable 'PATH'. this is not available for the child commands of jvm. hence the basic commands are searched in the current directory of the jvm and they are failed.
    i solved the problem giving full path of the commands. like :
    p = rt.exec("/bin/sh runningScript.ksh")

Maybe you are looking for

  • How can we export the data from OAF Page to Excel instead of .csv or .txt

    Hello, How can we export the data from OAF Page to Excel instead of .csv or .txt When i click on the export button it is exporting to txt file, But i need to export the data into Excel by default Please help me Thanks in advance Thanks, Raju We have

  • Final Cut only detects my HD camera as a DV-PAL basic???

    Hi, I'm currently waiting for a director to come to my suite, so we can begin editing a film. This is the first time I'll be using HD footage on my suite, so I've hired a Sony Z1E HDV camera for the digitizing. I'm just trying to get everything ready

  • Creative Cloud updating issues (OSX Mavericks)

    I've been having major issues with updating Creative Cloud apps on my Macbook Pro; I simply cannot update an app. I've tried uninstalling CC, cleaning it with the Cleaner tool, installing it through a root account, etc. etc. but it will simply not wo

  • Report programming issues

    hi in my report i want to trigger a new document when a new document type found. in the below logic i have tried LOOP AT gt_pur_fiaccr. // this table has unique records but not doc type field   read table gt_prules // this table has doc type records

  • Refresh QAS from PRD

    Hi, Can we refresh QAS from PRD backup ? and if so, suggest the steps to do that . REgards,