Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

FTPeek causes PSoS scripts to hang

Featured Replies

Weird issue here.

Running FMS 13.0v5 and FTPeek 1.66 enterprise on OS X 10.10.

I am working on a script A calling FTPeek upload to FTP. Script B calls script A as part of an overall process.

When i call script B from script A with usual Perform Script, everything works fine.

However when i call it with Perform Script on Server (PSoS) - which is supposed to be supported by enterprise license - the script basically hangs. Then the FMS Admin-Console Activity/Clients shows a client connection as "FileMaker Script" which will basically won't leave the queue - even if I send a disconnect message. Only way to solve the issue is restart the entire host...!  When running in debug mode from FMP, the moment script B calls script a with PSoS, FMP just freezes and I need to force quit it.

I understand that 1.66 brought support for PSoS but that only applies to enterprise license which is what i have as my order confirmation message tells me so...

Any idea anyone ?

Logs attached.

Thanks

360Plugins_ServerScripting64.log

Triple-check your script for any non-server compatible script steps.

As an aside, you don't need to restart the entire host, when a scedule or a PSoS call hangs just restart the FMS script engine:

fmsadmin restart fmse

 

 

  • Author

I have written 2 super simple scripts:

scriptA:
- Perform Script on Server [scriptB]
- Exit Script[]

scriptB:
- Set Variable [$ftpRegister; Value:FTPeek_Register("msomeLicenseKey"" ; "someRegisteredName")]
- Set Variable [$ftpPublicKey; Value:FTPeek_GetPublicKey("someIPAddress")]
- Set Variable [$ftpConnect; Value:FTPeek_ConnectSFTP("someIPAddress" ; $ftpPublicKey ; "someUser" ; "somePassword" )]
- Set Variable [$ftpDisconnect; Value:FTPeek_Disconnect]
- Exit Script[]

I run scriptA in Debug Mode from FMP and progressively  enable the scriptB steps. All is good until i bring the last step in : the one calling function FTPeek_Disconnect which causes the script to hang.

Interestingly, another scenario causes the script to hang: no matter how many script step i enable in scriptB, when i run script A without debug step-by-step but all-in-one-go, the script hangs as well.

Very confusing...

What you may be forgetting is that the PSoS call also runs whatever OnOpen script runs on the file and that one (or any of its subscripts) may be the cause for the hangups...

Hi laurentades,

I took a look at your logs and there is not any ftpeek function calls in the log. The only thing in the log looks to be a schedule that runs with a scriptmaster custom plugin. Our logs overwrite when the script engine is restarted so I suspect that is why there isn't anything in the log. 

Go ahead and restart the server(or as mentioned use the terminal command "fmsadmin restart fmse -y") run the PSOS and then repost your logs or send them directly to me at [email protected] . Additionally, run the script locally without the PSOS call and send the local logs as well. I will take a look and see if there is anything that indicates why you are getting the hang.

Regards,

 

  • 1 month later...
  • Author

Nailed it.

To be more specific: the script was looping through records for uploads and was performing a Connect /Disconnect for each record. It appears that the ftp service was having a hard time coping with the intense connect/disconnect pace and thus causing a lag on an erratic basis.
 
Solved by  opening the ftp connection once, proceed with the loop of so many records and then disconnect.
 
Important note: same was not happening with local OS X FTP service, therefore the suspect would be the target ftp service. Unfortunately I don’t know which one is used over there.
 
Hope that helps someone out there.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.