Skip to main content
Question

SystemCaller and FME Server Linux edition

  • November 28, 2016
  • 4 replies
  • 61 views

Forum|alt.badge.img

Cheers!

I'm working on a FME routine containing quite a few SystemCaller transformers containing psql calls to remote DB servers. This worked fine on Win and then suddenly I decided to try out FME for Linux ;0

Thing is that I'm left clueless of how to use the SystemCaller to pass my command to a Linux shell.

Trying the following from SystemCaller:

"sudo -u postgres /opt/fmeserver/resources/temp/truncate_temp_db.sh"

And the .sh is just your plain simple psql command to a remote server:

"psql -h <host> -p <port> -U <user> -d <database> -c "<SOME SQL HERE>;"

Permissions to execute .sh is set to all users hoping that "fmeserver" user have the neccesary privileges, but I still haven't had any luck with this approach. I'm not that Linux savvy I have to admit so if someone can give me a nudge in the right direction - I'd really appreciate that. I can revert to using SQL executor for this but I really want to know if SystemCaller is any good on FME for Linux.

Kind regards,

Saamot

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

mark2atsafe
Safer
Forum|alt.badge.img+59
  • Safer
  • November 28, 2016
I don't see why it wouldn't work. Do you get an error message anywhere that might help to debug this. When you say you have no luck, what happens? I would also turn on log debug under the FME Options to give a little more information in the log about what action is being carried out.

 


fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • November 28, 2016
I don't see why it wouldn't work. Do you get an error message anywhere that might help to debug this. When you say you have no luck, what happens? I would also turn on log debug under the FME Options to give a little more information in the log about what action is being carried out.

 

Can you run those exact commands from the command line when logged in as the user under whom the FME Server runs? I can imagine lots of ways that doing "sudo" without the right permissions/paths could go off the rails.

ravenkopelman
Safer
Forum|alt.badge.img+1

SystemCaller is fully supported on Linux.  Assuming that the postgres user requires a password for sudo, you'll need something like

echo <password> | sudo -S -u postgres /opt/fmeserver/resources/temp/truncate_temp_db.sh

in order to avoid hanging FME while a password is waited for.  If that is not the problem, please post a description (or log snippet) of how your workspace is failing.


Forum|alt.badge.img
  • Author
  • December 2, 2016

SystemCaller is fully supported on Linux.  Assuming that the postgres user requires a password for sudo, you'll need something like

echo <password> | sudo -S -u postgres /opt/fmeserver/resources/temp/truncate_temp_db.sh

in order to avoid hanging FME while a password is waited for.  If that is not the problem, please post a description (or log snippet) of how your workspace is failing.

Exactly the solution I was looking for. Thanks!  :)