Use of SFTP::Foreign with backend processing and having problems ( not apparent within the code ) in getting remote SFTP to quit it's processes

	I am running AS 5.10.1 on Windows XP SP3 and attempting to use
sFTP within my processing communicating to MVS/IBM.

	What I am trying to do is to do so many gets, then undef the
variable and re-login and to continue on to end of processing. I did
this with the FTP processing and never had any problems. What I am
seeing is when I do the above and go through the login/undef say three
times, it has the remote processes all still open. If I run through 5
times, then I have five processes open. But if I close the script
completely, then all the processes quit as expected.

	How would I go about figuring out what is missing in making
these processes quit naturally through the above process ( per the doc,
using the undefined  or going out of scope is the equivalent of quit
under FTP). I have even tried disconnect along with the undefined and
this does nothing differently. I am using 'my variables', strict,
warnings, etc, but uncertain how to figure out what is happening...

	Thoughts??

         If you have any questions and/or problems, please let me know.=20
         Thanks.=20
=20
Wags ;)=20
David R. Wagner=20
Senior Programmer Analyst=20
FedEx Services=20
1.719.484.2097 Tel=20
1.719.484.2419 Fax=20
1.408.623.5963 Cell
http://Fedex.com/us


0
david
4/6/2012 6:29:53 PM
perl.beginners 29336 articles. 3 followers. Follow

2 Replies
592 Views

Similar Articles

[PageSpeed] 43

>
>
>""Wagner, David --- Sr Programmer Analyst --- CFS""  wrote in message
>
>
>I am running AS 5.10.1 on Windows XP SP3 and attempting to use
>sFTP within my processing communicating to MVS/IBM.
>
>What I am trying to do is to do so many gets, then undef the
>variable and re-login and to continue on to end of processing. I did
>this with the FTP processing and never had any problems. What I am
>seeing is when I do the above and go through the login/undef say three
>times, it has the remote processes all still open. If I run through 5
>times, then I have five processes open. But if I close the script
>completely, then all the processes quit as expected.
>
>How would I go about figuring out what is missing in making
>these processes quit naturally through the above process ( per the doc,
>using the undefined  or going out of scope is the equivalent of quit
>under FTP). I have even tried disconnect along with the undefined and
>this does nothing differently. I am using 'my variables', strict,
>warnings, etc, but uncertain how to figure out what is happening...
>
>Thoughts??
>
>         If you have any questions and/or problems, please let me know.
>         Thanks.
>
>Wags ;)
>David R. Wagner
>


This is from the 'Bugs' section of that module:

BUGS
These are the currently known bugs:

- Doesn't work on VMS:
The problem is related to IPC::Open3 not working on VMS. Patches are 
welcome!

- Dirty cleanup:
On some operating systems, closing the pipes used to comunicate with the 
slave SSH process does not terminate it and a work around has to be applied. 
If you find that your scripts hung when the $sftp object gets out of scope, 
try setting $Net::SFTP::Foreign::dirty_cleanup to a true value and also send 
me a report including the value of $^O on your machine and the OpenSSH 
version.

From version 0.90_18 upwards, a dirty cleanup is performed anyway when the 
SSH process does not terminate by itself in 8 seconds or less.

Not sure if this is your problem,
Chris 

0
charley
4/9/2012 3:01:57 PM
>-----Original Message-----
>From: Chris Charley [mailto:charley@pulsenet.com]
>Sent: Monday, April 09, 2012 9:02
>To: beginners@perl.org
>Subject: [Marketing Mail] Re: Use of SFTP::Foreign with backend
processing
>and having problems ( not apparent within the code ) in getting remote
SFTP
>to quit it's processes
>
>>
>>
>>""Wagner, David --- Sr Programmer Analyst --- CFS""  wrote in message
>>
>>
>>I am running AS 5.10.1 on Windows XP SP3 and attempting to use
>>sFTP within my processing communicating to MVS/IBM.
>>
>>What I am trying to do is to do so many gets, then undef the
>>variable and re-login and to continue on to end of processing. I did
>>this with the FTP processing and never had any problems. What I am
>>seeing is when I do the above and go through the login/undef say three
>>times, it has the remote processes all still open. If I run through 5
>>times, then I have five processes open. But if I close the script
>>completely, then all the processes quit as expected.
>>
>>How would I go about figuring out what is missing in making
>>these processes quit naturally through the above process ( per the
doc,
>>using the undefined  or going out of scope is the equivalent of quit
>>under FTP). I have even tried disconnect along with the undefined and
>>this does nothing differently. I am using 'my variables', strict,
>>warnings, etc, but uncertain how to figure out what is happening...
>>
>>Thoughts??
>>
>>         If you have any questions and/or problems, please let me
know.
>>         Thanks.
>>
>>Wags ;)
>>David R. Wagner
>>
>
>
>This is from the 'Bugs' section of that module:
>
>BUGS
>These are the currently known bugs:
>
>- Doesn't work on VMS:
>The problem is related to IPC::Open3 not working on VMS. Patches are
>welcome!
>
>- Dirty cleanup:
>On some operating systems, closing the pipes used to comunicate with
the
>slave SSH process does not terminate it and a work around has to be
>applied.
>If you find that your scripts hung when the $sftp object gets out of
scope,
>try setting $Net::SFTP::Foreign::dirty_cleanup to a true value and also
>send
>me a report including the value of $^O on your machine and the OpenSSH
>version.
>
>From version 0.90_18 upwards, a dirty cleanup is performed anyway when
the
>SSH process does not terminate by itself in 8 seconds or less.
>
	Well, I am running 1.69, so it should be doing the dirty
cleanup. The processing is not hanging, but leaves the processes on the
report machine up UNTIL I fully exit the script. At this point, I have
provided a separate run for my Sys Admin who has run some dumps to
provide to the vendor. So thanks for the thoughts. I really appreciate
it..
	I will let the list know what I find out, if and when I do...
Wags ;)

>Not sure if this is your problem,
>Chris
>
>
>--
>To unsubscribe, e-mail: beginners-unsubscribe@perl.org
>For additional commands, e-mail: beginners-help@perl.org
>http://learn.perl.org/
>

0
david
4/9/2012 7:17:18 PM
Reply:

Similar Artilces:

The process cannot access the file '.....' because it's being used by another process
In VB6.0 I was using API calls for checking that a process has finished and then continue with other steps:       var_process_number = Shell("wzunzip.exe -o " & """" & fld_ZIP_file_name & """" & " " & """" & fld_import_path & """", vbMinimizedNoFocus)       'wait until the uncompressing is over         var_process_handle = OpenProcess(&H100000, True, var_process_number)         WaitForSingleObject var_process_handle, -1         CloseHandle var_process_handle In ASP....

SqlBulkCopy & problem: The process cannot access the file '' because it is being used by another process.
I use the SQLBulkCopy class to insert data from a excel file to SQL Server table.             Dim OleDbConn As OleDbConnection = New OleDbConnection(sExcelConnectionString)            Dim OleDbCmd As OleDbCommand = New OleDbCommand(("SELECT * FROM " & sWorkbook), OleDbConn)            OleDbConn.Open()            Dim dr As OleDbDataReader = OleDbCmd.ExecuteReade...

PLease help getting error as The process cannot access the file 'D:\Inventracksys\Inventorytracking Vendorwisereport_1.emf' because it is being used by another process
Dear All, I am making web application using Asp.net C#(Visual Studio2005). And Sql server 2005 as a back End  I generated local mode report but as there was no printing option available . I assign printing feature to button click by exporting the data to EMF format and print Now when I run it through IDE VS2005 then it does not show any error. But when I run in through IIS in intranet it showing me this error   The process cannot access the file 'D:\Inventracksys\Inventorytracking Vendorwisereport_1.emf' because it is being used by another process Where I am going wrong pl...

PLease help getting error as The process cannot access the file 'D:\Inventracksys\Inventorytracking Vendorwisereport_1.emf' because it is being used by another process #2
Dear All, I am making web application using Asp.net C#(Visual Studio2005). And Sql server 2005 as a back End  I generated local mode report but as there was no printing option available . I assign printing feature to button click by exporting the data to EMF format and print Now when I run it through IDE VS2005 then it does not show any error. But when I run in through IIS in intranet it showing me this error   The process cannot access the file 'D:\Inventracksys\Inventorytracking Vendorwisereport_1.emf' because it is being used by another process Where I am going wrong pl...

The process cannot access the file '' because it is being used by another process.
 Hai guys..Write now i am designing an event calendar . I am having an error message while trying to delete an event with images.. The event detail page is view with event details and the image under the event (i.e) photogallery is shown. while i am trying to delete the event with image it show an error message like "The process cannot access the file '<filepathname>' because it is being used by another process." . I have listed my code here.. 1 protected void gvAdminEventDetail_RowDeleting(object sender, GridViewDeleteEventArgs e) 2 { 3 ...

Cannot copy assembly 'DotNetNuke' to file '<assemly>'. The process cannot access the file because it is being used by another process.
I am in the process of creating a new module and I keep running into this problem. This happens every time I try to build the project. SOMETIMES I can get it working again by deleting the previously generated assemblies and reopening the project, but that doesn't always work and I'd like for the problem not to be there in the first place. My new module project is located at \DotNetNuke\DesktopModules\NewModule The build path for the assembly is set to ..\..\bin which is \DotNetNuke\Bin I am also using a project reference rather than an assembly reference so that shouldn't be the p...

About IE WebControls treeview's problem ,use js set|get checkbox's property
hi all. How to make a rediobox in a treeview's controls , How to get and set checkbox |radiobox checked property use javascript? document.getElementById("checkboxId") is error ; Code life .. It's OK!Code life .....

I get an error in IIS but not ASP.NET Development Server...The process cannot access the file because it is being used by another process problem
Hello This problem has been bothering me for more than a week so i need someone's input. I have a web application that uses excel. In the asp.net development server, things work fine but in iis7, I get the following error. "The process cannot access the file because it is being used by another process" . The file the program is trying to access is an excel file. My environment is Vista Business edition, VS2008 professional. So I'm guessing this is vista related problem because I used to run this web application on XP professinal. I migrated to vista business recently, ...

(urgent) The process cannot access the file '[filename]' because it is being used by another process.
For some reason my users are getting the following error in production: "System.IO.IOException: The process cannot access the file 'D:\[omitted]\TestingCenter\Xml\TestPlans\dbeckett\20071204_4' because it is being used by another process." This is occurring in my production environment, but did not occur in development or staging environments. Here is my code:string path = ConfigurationManager.AppSettings["xmlPath"];_modules = new Modules(); ClearLineItems();if (Directory.Exists(path + CurrentUser.Username)) { path += CurrentUser.Username + "\\";...

IOException: The process cannot access the file 'filename' because it is being used by another process
Hi everyone,I'm having some difficulty with my File upload and File delete processes.For the Upload, I do like:sTempName = path + FileUpload1.FileName;FileUpload1.PostedFile.SaveAs(sTempName); //sTempName = C:\Inetpub\vhosts\myfile.jpgIt works fine on my local machine, but once I upload it to my remote server, I sometimes (about 1 in 8 times) hit this exception:System.IO.IOException: The process cannot access the file 'C:\Inetpub\vhosts\myfile.jpg' because it is being used by another process.   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)   at Sy...

How to get running time and used memory of an process in C# using Process class?
I am working on an online judge recently.and the very important function is  to get the running time and used memory of the user's programme.I know there's a Process class in C#. and i can start an exe using this class,along with additional parameters.The class also provides the ability to get the memory of the running process and running time.But the  problem is,there're types of defined memory in this class:paged memory,unpaged memory,working set,...etc.which is the real memory the programme take?The same problem goes with time.there's user time and cpu time in process class of w...

Could not write to output file '...\obj\Debug\abc.dll" -- 'The process cannot access the file because it is being used by another process'
I use VS2003. Recently I keep getting this error when building the solution. Any idea how to fix it?? THANKS!  Could not write to output file '...\obj\Debug\abc.dll" -- 'The process cannot access the file because it is being used by another process' Close any other projects that link to this dll (i.e., any extra Visual Studio instances).  Also, try closing the app-- If you are running/debugging the project that references this dll, then you may be using that dll.  ---------------------------------------MCP - Web Based Client Development .NET 2.0 Thanks f...

System.IO.IOException: The process cannot access the file '' because it is being used by another process.
I am getting the above mentioned error. My code is as below and the stack trace also follows. I am not trying to open the file or copy or move, i just want to attach it to an email. Dim _today As Date Dim _dayNumber As Integer Dim _wcDayNumber As Integer Dim _stepDownVal As Integer Dim _negated As Integer Dim _wcDay As Date Dim wc As String Dim _filename As String Dim _foldername As String _today = Date.Today _dayNumber = Date.Today.DayOfWeek _wcDayNumber = 1 _stepDown...

superreview requested: [Bug 433005] Running a process synchronously within a thread freezes Firefox 3 during process execution : [Attachment 322064] bsmedbergs fix with brendan's suggestion.
Johnny Stenback (:jst) <jst@mozilla.org> has asked Brendan Eich <brendan@mozilla.org> for superreview: Bug 433005: Running a process synchronously within a thread freezes Firefox 3 during process execution https://bugzilla.mozilla.org/show_bug.cgi?id=433005 Attachment 322064: bsmedbergs fix with brendan's suggestion. https://bugzilla.mozilla.org/attachment.cgi?id=322064&action=edit ------- Additional Comments from Johnny Stenback (:jst) <jst@mozilla.org> I'm unable to test this atm, so others please test before landing... ...

Web resources about - Use of SFTP::Foreign with backend processing and having problems ( not apparent within the code ) in getting remote SFTP to quit it's processes - perl.beginners

Resources last updated: 12/16/2015 11:50:54 PM