DX NetOps

  • 1.  Unable to execute perl script using menu items

    Posted Mar 12, 2018 04:10 AM

    Hi,

     

    I want to execute a perl program which is in my linux machine using right click tool.I have made changes in /usr/Spectrum/custom/console/config/custom-menu-config.xml file .

     

    my custom-menu-config.xml file looks like this:

     

    My perl script

     

     

    I am able to execute my perl program using command prompt.But when I am trying to execute using menu items I am unable to get output my oneclick is showing empty output:

     

    Can someone suggest me where I am going wrong.



  • 2.  Re: Unable to execute perl script using menu items

    Posted Mar 12, 2018 04:33 AM

    The script should run as spectrum owner. Are you able to execute the script if you're logged in as spectrum owner? It's a better idea to have everything that is not from the default SPECTRUM installation located in $SPECROOT/custom. This way, the file would have permission to be executed by the spectrum owner and you'll have everything in one place if you want to migrate configurations across servers.



  • 3.  Re: Unable to execute perl script using menu items

    Posted Mar 12, 2018 05:18 AM

    Thanks for reply Catalin.

    I am able to execute script as spectrum owner from linux. I have copied the perl script to $SPECROOT/custom location. But from oneclick menu I am unable to execute the script my output window is showing empty.



  • 4.  Re: Unable to execute perl script using menu items
    Best Answer

    Posted Mar 12, 2018 11:13 AM

    If the program has been just added,  a OneClick tomcat restart is required, as Tomcat will scan this file custom-menu-config.xml on startup and create a list of programs that it will allow to run.  This has been done as enhancing security since Spectrum 9.4.0.



  • 5.  Re: Unable to execute perl script using menu items

    Broadcom Employee
    Posted Mar 12, 2018 06:53 PM

    Hi Sheethal,

     

    I have tested your script in my lab (Spectrum 10.2) and I don't encounter the problem. It works perfectly. What Spectrum version you are using? You may want to enable "Launch Servlet" debug item on OneClick Web Admin > Administration > Debugging (at 2nd header) > Web Server Debug Page (Runtime) page and reproduce the issue. What do you see on Tomcat's log?

     

    Regards,

    Widjaja.