Jade Triggerring External File in Linux

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Jade Triggerring External File in Linux

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:56 pm

by Scott Sheng >> Sun, 22 Jan 2006 5:16:18 GMT

I am facing a problem for Linux system integration. Currently, after a Jade Linux System generates a csv file, it will trigger a startnotify_pos.sh. This *.sh file will execute another notify_pos.php file to send the csv file to another Linux server (Server B) within the same network. However, now, after the csv file is generated, the startnotify_pos.sh/notify_pos.php file is not triggered successfully.

Pls note that it has nothing to do with file permission as both my startnotify_pos.sh and notify_pos.php are with full permissions (user, group, owner execution, read, write are true).

I use createExternalProcess method to trigger the startnotify_pos.sh and write its return value, this method will show the Jade Interpreter Output Viewer to show whether the file is triggered successfully when csv export finishes.

For the first time, I have a terminal opened (PuTTY) on my pc. Then I export the csv file. The Jade Interpreter Output Viewer shows that startnotify_pos.sh is triggered successfully, and in the terminal window I saw the php file being run (it shows the integration folders being processed). The file is transferred to Linux server B successfully. However, it seems that the php file did not end and did not return back to [root@JadeLinuxServer root]#. Then I close the PuTTY session.

After closing, I tried exporting csv file again. This time, the csv file is created in the integration folder in Jade Linux server, and Jade viewer shows that startnotify_pos.sh is triggered successfully, but the csv file is not sent to POS server. I doubted that php file needs a terminal to run, so open a permanent terminal at Jade Linux server, however, still unable to send the file over to Linux server B.

I've also tried using notify_pos.php only, but still the csv file is not sent over Linux Server B. If there's a necessary to change notify_pos.php into a *.sh file? Or our solution for this case is correct way?

Does anyone have any idea?

Thanks

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Jade Triggerring External File in Linux

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:56 pm

by allistar >> Sun, 22 Jan 2006 19:54:42 GMT

Rather than using a php file to copy the file, a possibly better way is to scp it. As long as your ssh authorisation keys are set up correctly this is a secure, easy way to copy files between computers.

Allistar.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Jade Triggerring External File in Linux

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:56 pm

by Scott Sheng >> Mon, 23 Jan 2006 3:21:00 GMT

Hi Allistar,
Thanks
About the problem, I've seeked advice from a partner who knows Linux very well and managed to find a solution. He notices that the script and php file we have contains "echo", which may rely on a terminal to show the echo result. I've modified the script and php file to not use echo, and now the triggering has become successful without having a terminal window open

Scott


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 34 guests