Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


SteveB
2011-01-13T15:43:58Z
Hi,

I've created an SSH task in Visual Cron that attempts to run SQL Loader to insert a bunch of records from some csv files into our database. The issue I'm having is that the oracle installation path doesn't seem to be set in the user's PATH variable when I go through Visual Cron, so the job errors with the output "command not found". I do know, however, that the path is set in the user's profile on the server.

To give you an example of what I'm seeing, if I call export from Visual Cron I get the following value for the path variable:

declare -x PATH="/usr/local/bin:/bin:/usr/bin"


For the same user when logged in using Putty I get this value:

declare -x PATH="/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:/u01/app/oracle/product/10.2.0/db_1/bin"


Is there any reason the values are different?

We're running Visual Cron version 5.5.6 and the target database is Oracle 10.2.0 running on Linux.

If anyone can help, I'd be really grateful.

Thanks in advance,

Steve.
Sponsor
Forum information
Support
2011-01-13T16:33:36Z
Hi Steve,

we have an idea why that happens but it requires a new version to fix and test this. Currently we are in the middle of some other new functionality but we will get back to you as soon as possible.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
SteveB
2011-01-13T16:37:33Z
Thanks, Henrik. In the meantime, can you think of a way I might be able to work around the issue?
Support
2011-01-13T16:38:54Z
No, but if we can give you a version in the meantime, for testing, we will do that.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
SteveB
2011-01-19T13:10:19Z
Hi Henrik,

Thanks for looking into this. I'm being chased at this end for a timescale on when a new release might be available to resolve the issue. Do you have an idea when that might be?

Thanks again,

Steve.
Support
2011-01-21T22:06:57Z
SteveB
2011-01-24T17:37:47Z
Thanks, Henrik. Unfortunately, that doesn't seem to have solved the problem. I'm still not seeing the oracle application home in the SSH PATH variable.
Support
2011-01-25T20:05:22Z
Did you use the Task or the SSH/FTP Browser?

We have only made the change for the Task.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
SteveB
2011-01-26T15:14:15Z
I just used a simple task that connected to the server and executed the export command.

Cheers,

Steve
Support
2011-01-26T15:24:58Z
How can this be reproduced? Do you use the declare command? Could you provide some steps how you set a value and how you retrieve it?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
SteveB
2011-01-27T11:59:52Z
Hi Henrik,

The steps I used were:

1) Create an SSH task within a job
2) The connection should be as a user whose PATH environment variable has an application path in it (in my case this is the oracle installation directory)
3) The task should send the command "export" to the server
4) The output of the task will be the output of the export command. In my case, this does not contain the oracle directory in the PATH variable.

I'm not trying to set the variables myself, just use the ones that are already present for the user on the server.

Cheers,

Steve.
Support
2011-01-27T21:25:11Z
Ok, I was looking for setting the oracle variable the same way as it was originally set. This way we can verify both set and get.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jj1982
2013-04-29T04:06:30Z
Hi,
I'm sorry to bring up an old thread but it seems I'm having the exact same problem. I'm trying to run java app on a remote machine using SSH and the PATH I have on a task (just a echo on $PATH) is different from the one I have on a putty.

I can work around but I'm wondering if it was supposed to be fixed? I'm testing on 6.2.2.

Thanks,
Julien
Support
2013-04-29T09:52:38Z
Originally Posted by: jj1982 

Hi,
I'm sorry to bring up an old thread but it seems I'm having the exact same problem. I'm trying to run java app on a remote machine using SSH and the PATH I have on a task (just a echo on $PATH) is different from the one I have on a putty.

I can work around but I'm wondering if it was supposed to be fixed? I'm testing on 6.2.2.

Thanks,
Julien



Does it matter if you execute with Command or Text option?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jj1982
2013-04-30T00:09:33Z
Hi Henrik,

You are right it works if I use the text option, but I'd like to be able to use the output, it's a useful and convenient feature.
Support
2013-04-30T07:01:15Z
Originally Posted by: jj1982 

Hi Henrik,

You are right it works if I use the text option, but I'd like to be able to use the output, it's a useful and convenient feature.



You are not getting output? The Text should capture as well but perhaps you need to echo/pipe it to the right direction if you do not get it automatically?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jj1982
2013-04-30T07:14:16Z
Oh sorry I was not clear, I get an output but it contains the welcome message of the SSH connection and lines of prompt (e.g. "Welcome to Ubuntu..").
When using the "Send Command" instead of "Send Text" the field Output in VisualCron is the actual standard output of the process and not the whole SSH output.
Support
2013-04-30T07:16:21Z
Originally Posted by: jj1982 

Oh sorry I was not clear, I get an output but it contains the welcome message of the SSH connection and lines of prompt (e.g. "Welcome to Ubuntu..").
When using the "Send Command" instead of "Send Text" the field Output in VisualCron is the actual standard output of the process and not the whole SSH output.



Right, the Command should capture just the command and Text should capture normal output. I will check if it is possible to work with environment Variables for a future version.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jj1982
2013-04-30T07:29:55Z
Ok good, actually when using the "Send Text" the env. variables are working just it doesn't seem to work in command mode. Unless I'm doing something wrong.
Can you reproduce the problem ?
Support
2013-04-30T09:31:38Z
Most likely the rest of PATH is set during shell startup - when it parses .bashrc or other corresponding file.

But, when executing command tunnel, shell is not started and these commands are not parsed.

It is technically possible to add env variables but we do not support that in the Task - yet. I am moving this topic to Feature requests.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jj1982
2013-05-01T23:55:50Z
Yes that's what is happening I believe.
I know it's not easy to give an answer but do you think it's a feature that could be ready in a month / 3 months / a year ? It's just to give me visibility as I'm comparing different solutions.

Thanks.
Support
2013-05-02T07:08:07Z
I think 3 months seems like a good guess right now. We have some larger things to work at first but then we will work on smaller changes like this.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jj1982
2013-05-02T23:58:32Z
Support
2013-07-04T12:25:23Z
This feature has now been added for upcoming 7.0.0. It will be published in the beta forum tomorrow.

http://www.visualcron.co....aspx?g=posts&t=3175 
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top