Remote script execution.

Hello.
I would like to know how to run a script on a remote Linux machine. Can I do this without caring where the local JVM is running?
I haven't done this before, and have searched various places for a concise answer. I have not been successful. Will something like the following work: Runtime.exec("remote.machine\remote.script.sh");. I have also noticed that my searches seem to lead me to discussions of Java RMI, so in thinking RMI has something to say about what I'm doing, I have posted my question here.
Background: I have a java application (a web service in fact) that needs to get information from a back-end system to do its job. It needs to invoke a script that's running on a remote host where the coveted business system resides.
The Runtime.exec() method appears only to run processes on local machines. From the research I have done, the usual fudge here is to know the operating system of the local machine so you might be able to use its remote process execution facilities. However, I don't want to know anything about the local OS, because it could be different between development, testing, and production. I know that the remote OS is Linux.
Is there any way I can get a process to run on a remote machine without having to know about the local machine's OS?
Many thanks in reply,
Owen.

You need obviously the remote system to support this through some facility like remote shell (rsh) or secure shell (ssh). so it depends on how that remote Linux system is set up and what access (userid) you can get for it.
Are you granted some access to that remote Linux machine?
If yes, what kind of?

Similar Messages

  • Remote Script Execution initiated by Nagios Access Denied

    Hi, I am trying to create a powershell script (script 1) set up on our Support Server to execute a Remote Script on a Remote Server (script 2) to Restart a service. Simple - The script works fine when i execute it manually but fails when I try and use Nagios
    to call the Script using NRPE.
    Script 1 Contains (I have cut out all the Nagios inspired stuff)
    invoke-command -computer ws05 -command { & 'C:\Program Files\NSClient++\scripts\script2.ps1' }
    SendEmail
    Script 2 Contains
    Stop-Service spooler
    Nagios is successfully executing Scrip 1 as I get the confirmation email
    Nagios itself returns [ws05] Connecting to remote server failed with the following error message : Ac
    I'm assuming its a Permission issue but cant see how it works when executed manually but not when Executed via Nagios. My Only thought is the fact that the original call is from Nagios which is a Linux based None Domain server.
    Any Thoughts Appreciated
    Carl

    Powershell is not supported on Unix.
    ¯\_(ツ)_/¯

  • Execution of remote script in File Adapter OS Command

    Hello.
    I'm having issues with a remote script placed on a file adapter which fails to execute in a clustered PI (Version 7.1), running on Windows 2008.
    Our current setup is as follows.
    - Machine A and Machine B make up a SAP PI Cluster node.
    - Machine C is our network file share, used as a sandbox for receiving and sending files.
    One given scenario would be having the Cluster picking up a file from a FTP folder (Machine D) and copying it over to a given location in Machine C. This is working without problems in the cluster environment.
    Now, a very specific scenario requires that after copying the file (to folder INPUT), a given script shall be executed over the received file and decide which folder should that file be archived, TO_PROCESS or NO_PROCESS folders.
    So, Outbound Channel is reading from the FTP, Inbound Channel stores in Machine C and has to run a script after message processing.
    The problem here is that the script is stored also in Machine C, so placing the OS Command should refer to a shared path:
    Example:
    sap-machine-c.gca.ad.root\InboundFiles\INPUT
    sap-machine-c.gca.ad.root\InboundFiles\TO_PROCESS
    sap-machine-c.gca.ad.root\InboundFiles\NO_PROCESS
    sap-machine-c.gca.ad.root\Scripts\procFile.bat
    If I give the command of "
    sap-machine-c.gca.ad.root\Scripts\procFile.bat %F" on the receiver channel, checking RWB, Communication channel says the command was executed with success but the file doesn't leave the INPUT folder.
    The script is know to execute with success from both instances, I have logged into each one of them and executed with RFCUSER in SE38 w/transaction RSBDCOS0.
    I have tried to replicate this issue, reducing even the procFile.bat script to just do an "echo" command but still doesn't work (RWB PI says it does).
    It seems to me that executing scripts from remote shares is a no go? Does anyone have a previous experience dealing with these cases?
    Thanks,
    Romeu

    Hi all.
    After taking some hints from this thread, we have found out that the problem lied some where in the installation part of PI.
    We've set up a basic script, local and not remote, and still the system would not execute that command.
    The RWB logs showed successful processing but the Application Server logs were full of errors and stack traces regarding the execution of any command. A support note was raised with SAP support in order to trace these errors.
    I'm therefore closing this question as the original question is not related with remote scripting.
    Thanks all for your help.
    Best regards,
    Romeu

  • Vulnerability in VBScript Scripting Engine Could Allow Remote Code Execution (3016711)

    Can some one help me to download below Security patches which i am not able to download from MS Web site?
    Vulnerability in VBScript Scripting Engine Could Allow Remote Code Execution (3016711)
    Vulnerability in VBScript Scripting Engine Could Allow Remote Code Execution (3016711)

    Microsoft Releases KB3024777 Update to Fix Botched KB3004394 Patch
    http://news.softpedia.com/news/Microsoft-Releases-KB3024777-Update-to-Fix-Botched-KB3004394-Patch-46...
    Windows 7 Pro SP1 (64-bit), avast! V7 Free, MBAM Pro, Windows Firewall, EMET, OpenDNS Family Shield, IE9 & Firefox (both using WOT & KeyScrambler), MVPS HOSTS file, SpywareBlaster, WinPatrol PLUS, SAS (on-demand scanner), Secunia PSI.
    [I am experimenting with Sandboxie, and believe computer-users who sandbox are acting prudently.]

  • Test Script execution failed.

    I'm getting the Test Script Execution Error - "Test Script execution failed. Reason: The system cannot find the file specifiied"
    This is happening to all my test script files. I can load the test script files, edit the test cases, etc, but cannot execute the test scripts
    If I click on View Test Script Specification, they all come up, and the report shows all the cases in the test script.
    If I look into the directory, they are all there, with the .tsc extension and a file type of TSC
    I created a new TSC this morning, but with the same results
    They were working yesterday. Since then, I did rename one of the test scripts, and changed my build platform from .NET to Java.
    Any thoughts?
    Thanks,
    Allan Gibson
    P.S. I also now note the my what-if analysis files do not run, and are getting a message: run time error '-2146233088 (80131500)': Batch process has failed. Reason: the system cannot find the file specified (OPA-E00241). When I press the debug button, I'm taken to a screen where the line "Call GetExcelCompilerProxy() .Analyze(ActiveWorkbood)" is highlighted in yellow.
    Edited by: A Gibson on 11-Sep-2012 9:02 AM
    Edited by: A Gibson on 11-Sep-2012 9:09 AM

    Hey Allan,
    It looks like it either can't find the Java component it needs to run or the test script for some reason. If you look in the bin directory of the OPM install (which is normally something like c:\program files\Oracle\Policy Modeling\bin) do you see a file called determinations-remote-clr.jar? If not it sounds like something's gone wrong with your install.
    If so, can you run the test script in the standalone debugger? Also, if you look at the absolute path of your test script file, does it contain any non-ascii characters? If so, try removing those characters and see if it works.
    Thanks,
    Kristy

  • How to execute Remote scripts using OSB or BPEL

    Hi all,
    Can we execute the Remote Scripts from OSB and BPEL ??
    What is best way to invoke the scripts using OSB ?
    Thanks
    Phani

    Sutirtha,
    Thank you very much. I really appreciate all of your responses.
    I have one more question ( Sorry for flooding you with lot of questions :) )
    How to capture the errors which occured inside the SQL Scripts.
    My scenario is like this. I have two sql scripts Script_1.sql and Script2.sql namely. I would like to put dependency on the execution of the scripts.
    If Script_1.sql executes succesfully without any errors, then EXECUTE Script_2.sql
    else if Script_1.sql execution contains errors then DON'T EXECUTE Script_2.sql
    As of now, i observed that the Process flow shows Success State even if there is an error in the sql script execution. Because of which i was not able to put dependency on the execution of the scripts.
    I think i can do it by tweaking(changing) the code inside the SQL Scripts, like logging the errors in some log table and reading it before the next script execution.
    But the restriction is, I Should not touch/change the existing SQL Scripts.
    Do we have any mechanism in the ProcessFlows to identify the SQL Errors that occurred during execution of SQL Scripts ?
    Please suggest any idea on this. It will be great if you can help in this.
    Thanks in advance,
    SriGP.

  • Setting script Execution in GPO

    Hi,
    I would like to enable Script Execution for APPV clients through GPO.
    There are 3 options:
    1. Allow only signed scripts
    2. Allow local scripts and remote signed scripts
    3. Allow All.
    I guess option 2 will be the right one.
    Option 1 is not enough. Yes? No?
    "When you hit a wrong note it's the next note that makes it good or bad". Miles Davis

    That depends on the scripts ;-)
    To run App-V's 'native' scripts and commands (like get-appvclientsomething), local+remote-signed is the choice.
    But if you want to create your own powershell scripts (and don't want/can sign them), you'd need to use a relaxed policy (Allow all).
    Remember that - besides the Powershell execution policy - also the App-V client itself has to be enabled to run scripts if you want to use scripts within the App-V packages
    Falko
    Twitter
    @kirk_tn   |   Blog
    kirxblog   |   Web
    kirx.org   |   Fireside
    appvbook.com

  • Error with dbms_scheduler and shell script execution

    Hi,guys.
    I have an issue with a dbms_scheduler and a shell script execution. So, the shell script as it self works fine, when i'm executing ./test.sh all process is running, but when i'm executing the script from dbms_scheduler it just simply doesn't work. Actually it works, but some of executable information in sh doesn't work, seems it just jump over of the part of the script. Sendmail part is running, maybe there is problem with rman script as it self?
    DB version: 10g
    And my scripts:
    Shell scripts (permisons 755):
    #!/bin/ksh
    export PATH=/home/oracle/product/asm_home/bin:/home/oracle/product/db_home/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/oracle/bin:/usr/bin/X11:/sbin:.
    export ORACLE_BASE=/home/oracle/product
    export ORACLE_SID=zabbix
    export ORACLE_HOME=/home/oracle/product/db_home
    ${ORACLE_HOME}/bin/rman<<EOF
    connect target /
    run {backup recovery area delete all input;}
    EOF
    {       echo "From:[email protected]"
            echo "To: [email protected]"
            echo "Subject: Recovery area"
            echo 'Content-Type: text/html'
            echo
            echo '<html><body><table border="1" cellspacing="1">'
            echo '<tr><td><b>Process</b></td><td><b>Statuss</b></td></tr>'
            echo "<tr><td>RMAN</td><td><b>Works</b></td></tr>"
            echo "</table></body></html>"
    } | sendmail -tIn the first part i'm exporting all of the important stuff for oracle, then I call RMAN with specific atributes. And then there is just simply sendmail functionality inside script to represent if script works (for now).
    And below pl/sql script:
    begin
      DBMS_SCHEDULER.CREATE_JOB
      job_name => 'FLASH_RECOVERY',
      job_type => 'EXECUTABLE',
      job_action => '/home/oracle/backup/test.sh',
      start_date => sysdate,
      job_class => 'DEFAULT_JOB_CLASS',
      enabled => TRUE,
      auto_drop => FALSE,
      comments => 'FLASH RECOVERY USAGE AREA backup and delete'
      END;
      /And this job execution:
           begin
               DBMS_SCHEDULER.run_job (job_name =>'FLASH_RECOVERY',use_current_session => TRUE);
           end;What can be wrong? For me, I think it's something with permisions.
    I hope you got my idea and could help me.
    Tom
    Edited by: safazaurs on 2013.18.2 22:16

    There is no error, i just receive all the time e-mail, seems it jumps over rman. I tried almost everything and still couldn't get result as i want. And, if i'm running script from command line - it works. Rman calls, and starts to recover archivelogs.

  • Error when using FTP in iWeb 09! "Error 500: Script Execution Failure"

    I have my domain through 123-reg and I have free hosting with host-ed.net when I add a simple index.html file my website works fine displaying the 1 line of text that I asked for, so it is all configured correctly.
    How ever when I use the FTP upload thought iWeb '09 I always get "Error 500: Script Execution Failure"
    www.breslan.co.uk
    Anyone know why?

    I have logged into my hosting and changed the permissions to '755' and move the files from the folder iweb used to the root of the site i know get "Parse error: syntax error, unexpected T_STRING in /~/www/breslan.co.uk/index.html on line 1" there is only 1 line of code in index.html and that is
    <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><meta http-equiv="refresh" content="0;url= Welcome.html" /></head><body></body></html>
    please help!

  • Java 6 updates 22 thru 24 does not allow ASP Remote Scripting calls

    The Java 6 update 22 thru 24 all prevent ASP Remote Scripting from working correctly, causing applications using Remote Scripting via the standardized rs.htm code to fail. This is well documented with examples at the Java Forums page http://www.java-forums.org/new-java/36522-java-jre-6-update-21-22-rs-problem.html
    To date I have not been able to find anything that indicates Oracle is aware of this problem and is trying to fix it. If there is a fix, please contact me with it immediately!

    876886 wrote:
    Is there any update on this?
    is it fixed?Whats stopping you from installing update 26 and trying it out? Or did you think that this is an Oracle technical support forum where actual Oracle employees post?
    Note that if nobody bothered to create a bug report for this problem (because I see no evidence of that in either forum) then the answer is likely no.

  • Script execution problem

    dear sir
    i got a problem with script execution. i have successfully  activate the form painter in ABAP editor. but i am getting the error like "Form  ZLASRISUD language EN is not active and has no errors". please give me the solution for above as soon as possible.

    dear sir
    i got a problem with script execution. i have successfully  activate the form painter in ABAP editor. but i am getting the error like "Form  ZLASRISUD language EN is not active and has no errors". please give me the solution for above as soon as possible.

  • Java Web Start and Remote Scripting Incompatibility?

    I recently installed the Java Web Start plugin to Internet Explorer, in order to run Sun's version of the Java Virtual Machine.
    After the install, I am receiving errors when trying to run a web application that uses the Remote Scripting technology for client-server communication.
    I think this might be related to the Java 2 security model, which requires all Java applets to be signed. The Remote Scripting client-side component seems to be unsigned, so that may be causing my problem.
    Does anyone have a solution for this problem?
    Any help is greatly appreciated.
    Best Regards,
    Nicole Roberts

    Hi,
    I had the same problem on a unix server!
    The new build of IE on Windows 2003 from Microsoft that excludes the JVM (Java Virtual Machine), works fine with the JVM coming from Sun, except for the following.
    We are experiencing problems, that if we are not logged in as Domain administrator, we get an Apache security prompt to log on, as soon as the RSProxy class is used. It seems that the Class is not picking up the current session, but tried to create another session, without a userid, and then prompts you for your login details.
    We still cannot figure out, why it does not do it with the Domain Administrator account.
    Can someone please have a look into this.
    I think there is a simple configuration problem somewhere, that will allow seamless integration with Sun's JVM.
    I could resolve it so far by loading the Microsoft JVM back into Win2k3 theough the Visual Studion 6 Cd's, but I don't like the idea of that!

  • Automation Script execution

    Hello All,
    How i will do Automation script execution in Production
    We have a bunch of scripts (Packages , DDL & DML ) everyday. What is the better aproach to do automatic script execution without any issues ?

    Hi,
    You have two options.
    1) Oracle job scheduler
    2) Windows Tasks
    Oracle job scheduler you can run it by your requirement. you can create it like below:-
    begin
    DBMS_SCHEDULER.CREATE_JOB(
    JOB_NAME           =>      'JOB_FOR_TEST',
    JOB_TYPE           =>      'PLSQL_BLOCK',
    JOB_ACTION         =>      'begin YOUR_PROCEDURE_NAME; end;',
    START_DATE         =>      SYSTIMESTAMP,
    END_DATE           =>      NULL,
    COMMENTS           =>      'JOB IS CREATED FOR TEST ONLY.',
    ENABLED            =>      TRUE,
    REPEAT_INTERVAL    =>      'freq=daily; byhour=20; byminute=0; bysecond=0;');
    end;
    /Above job will run on 8pm daily.
    likewise since i dont know whether you are on windows or linus or unix etc... you can scheduler windows level tasts...

  • Report script execution is getting failed

    Hi ,
    We are facing one strange issue while executing the Essbase report script. I am new to the report script and I am not getting how to resolve the issue.
    When we are changing the year in code from FY13 to FY14 the script is getting failed however the same script is successfully generating the report if we keep year as FY13 in code.
    Could you please let me know where would be the problem , below is the part of the code form Report script.
    {MISSINGTEXT "0"}  // replace #Missing with 0
    <Link ((<LEV("Customer", "Lev0,Customer")) AND ( <IDESC("All Customers")))
    <Link ((<LEV("Product", "Lev0,Product")) AND ( <IDESC("All Products")))
    <Link ((<LEV("Period", "Lev0,Period")) AND ( <IDESC("YearTotal")))
    FY14

    Hi ,
    I am getting below error message.
    "Report Script execution Failed. Please see message panel for details " and in message panel It is not showing any details , just displaying Execute Report script Failed with date and time details.
    I also checked that FY14 do exist in the application and no duplicate FY14 member exist in the outline.
    Could you please suggest where would be the problem.

  • Get Agent IP Address During Script Execution

    Good Evening,
    I'm looking for a little advice...  I'm trying to develop a method of alerting agents to the fact they are not ready.  I have a script that can dynamically change the wallpaper on an IP phone.  My aim is to add a step to the "Select Resource" portion of a script that will execute if an agent doesn't answer a call presented to them.  However in order for this script to work it requires the IP address of the phone the agent is logged on to.  Can anybody recommend a method of getting this IP dynamically during script execution?  We use EM so statically defining IPs in an XML document wouldn't be appropriate.
    On a similar note I'd also need a method of executing the same script when an agent manually alters their state to ready.  i.e. When they change to ready on the IP Phone Agent I'd like to be able to intercept that process as it takes place and automatically trigger this same script.
    I'm using UCCX 8.5(3).
    Hope that makes sense.  Any suggestions regarding how to achieve this would be much appreciated.
    Much appreciated,
    Ryan

    I don't write enough scripting to know for sure if the agent's phone's IP address would be available anywhere in the UCCX enviornment by default but I'm going to go with 'probably not'. You'd need to obtain this information from CUCM, the most straightforward method would likely be to use CUCM's AXL interface to pull this information. The HTTP Document Step may be able to produce the necessary AXL requests I guess, but I've never tried.
    Cheers,
    Kris

Maybe you are looking for

  • How to connect 3 displays to Satellite P875-321?

    Hi, Beside the inbuilt laptop display my P875-321 has an HDMI output and an RGB output. I'd like to use both the HDMI and the RGB output as extended displays (no mirrored but different content), and the laptop display as primary dsiplay. How to creat

  • G7 B5Z56UA No sound

    Running Win 8, Product # is B5Z56UA#ABA and Serial # is [Edited for Personal Information].  My audio has suddenly gone out.  I can hear system sounds such as those that I can 'Test' from the Control Panel, Sound & Hardware section.  But if I try to p

  • EWM Installation on ERP as an add on

    Dear All, We are planning for EWM Installation or ERP EHP7 as an Add-on. I have few queries..? 1. Can I directly download the EWM Components and install it without xml via saint? 2.  what components do I need to install for EWM ? 3. If the installati

  • [Authorization] Entry Qty Based on Material Group

    Dear gurus, I've requirement like this: In tx. VL02N, in picking tab, picked qty can only be entered by personnel based on material group (there's material no. in that screen, and can be traced to get material group). Is it possible? Regards,

  • Subversion client: add subversion property to multiple files fails.

    File browser allows to mark multiple files and then select "add subversion property" in german schown as "Subversion Eigenschaft hinzufügen". This opens a dialog "VCS Operation" showing all selected files with columns name, location and Select. After