June 9, 20169 yr I've got a scheduled script that runs every 15 minutes that checks a queue for unsent emails, and sends them out as needed. Since this is on FMServer, I have to register the plugin with each ititeration. When the server was on a MAC, it would on occasion, not register (which exits out of the scrip). When this happens, I get an email every 15 minutes until I restart the FMSE service. Now that this is running on a Windows server, it still happens, but not as consistently as before, and It doesn't continually happen, so I don't have to restart the FMSE service. Using the latest version of both the plugin and Java. Is there a way to permanently register this plugin on a server so that it doesn't have to keep registering with each ititeration? The FM error that is returned is simply ERROR with no further explanation. Looking at the LogFile that it creates, it looks like it's trying to run in demo mode?? Here is a snippet of the file from a time that recently error out on me - Jun 09, 2016 8:20:01 AM com.prosc.fmkit.RegisterablePlugin <init> INFO: 360Works Email version: 360Works Email 2.17, build 3606 (3/23/16) Jun 09, 2016 8:20:01 AM com.prosc.fmkit.Plugin init CONFIG: Created new plugin instance: com.prosc.emailplugin.EmailerPlugin named 360Works Email on thread: Thread-2278; version: 2.17 Jun 09, 2016 8:20:01 AM com.prosc.license.client.Registration checkLicense INFO: Registered successfully with demo license; will run for two hours after launch. Jun 09, 2016 8:20:01 AM com.prosc.license.client.Registration checkLicense INFO: Expiration date Mon Jun 06 08:22:08 EDT 2016 Jun 09, 2016 8:20:01 AM com.prosc.license.client.Registration getLicense WARNING: License is invalid: com.prosc.license.client.ExpiredLicenseException: DEMO mode expired! (16) You can continue to run in demo mode by restarting FileMaker, or you can register with a valid license key from http://www.360works.com. at com.prosc.license.client.Registration.checkLicense(Registration.java:225) at com.prosc.license.client.Registration.getLicense(Registration.java:306) at com.prosc.fmkit.RegisterablePlugin.registrationDidChange(RegisterablePlugin.java:456) at com.prosc.fmkit.RegisterablePlugin.getRegistration(RegisterablePlugin.java:446) at com.prosc.fmkit.RegisterablePlugin.init(RegisterablePlugin.java:127) at com.prosc.emailplugin.EmailerPlugin.init(EmailerPlugin.java:276) at com.prosc.fmkit.Plugin.init(Plugin.java:190) at com.prosc.fmkit.PluginBridge$2.initialValue(PluginBridge.java:315) at com.prosc.fmkit.PluginBridge$2.initialValue(PluginBridge.java:311) at java.lang.ThreadLocal.setInitialValue(Unknown Source) at java.lang.ThreadLocal.get(Unknown Source) at com.prosc.fmkit.PluginBridge.getPluginInfoForThread(PluginBridge.java:2115) at com.prosc.fmkit.PluginBridge.getThePlugin(PluginBridge.java:2108) at com.prosc.fmkit.PluginBridge.doFunction(PluginBridge.java:1173) Jun 09, 2016 8:20:01 AM com.prosc.license.client.network.LicensePluginModel$KeepAliveThread run INFO: heartbeat thread was interrupted; exiting Jun 09, 2016 8:20:01 AM com.prosc.license.client.network.OnlineModel sendServerDisconnect CONFIG: Closing connection to license server at https://secure2.360works.com/WSMRegister/LicenseCheck/disconnect Jun 09, 2016 8:20:01 AM com.prosc.license.client.network.LicensePluginModel$KeepAliveThread run INFO: LicensePluginModel: Finished heartbeat thread for product 16 / session 46c8993d-1cff-432e-998a-b995dd4913ae Jun 09, 2016 8:20:01 AM com.prosc.fmkit.PluginBridge$4 run CONFIG: === Executing plugin function EmailRegister on thread Thread-2278 === Jun 09, 2016 8:20:01 AM com.prosc.fmkit.Plugin setLastError SEVERE: PluginFunction PluginFunction{name='EmailRegister', functionID=19905, minArgs=null, maxArgs=2} got an error with converted args [XXXXXX, XXXXXX] com.prosc.license.client.ExpiredLicenseException: DEMO mode expired! (16) You can continue to run in demo mode by restarting FileMaker, or you can register with a valid license key from http://www.360works.com. at com.prosc.license.client.Registration.checkLicense(Registration.java:225) at com.prosc.license.client.network.LicensePluginModel.checkLicense(LicensePluginModel.java:141) at com.prosc.fmkit.RegisterablePlugin$2.run(RegisterablePlugin.java:511)
June 10, 20169 yr On 6/9/2016 at 9:27 AM, BrentHedden said: Is there a way to permanently register this plugin on a server so that it doesn't have to keep registering with each ititeration? No, there is not a way to permanently register the plugin on FileMaker Server. The reason is because whenever a script is run on FM Server it is essentially like you opened FileMaker Pro, ran the script, and closed FileMaker Pro. This being the case, every script gets its own instance of the plugin. Every plugin instance is in demo mode by default unless it sees that the FMSE has been running for >2hours. If it has you get demo mode timeout errors. With that being said, you should not get a demo mode error when calling the registration function. I will see if I can reproduce that error. For the time being, I have had success in the past by having the registration function call twice in a row. It is not the most elegant workaround but I believe it should fix the issue while we track down and fix the bug. Try that and let me know if you continue to have issues.
July 5, 20169 yr Author On June 10, 2016 at 2:27 PM, ryan360Works said: No, there is not a way to permanently register the plugin on FileMaker Server. The reason is because whenever a script is run on FM Server it is essentially like you opened FileMaker Pro, ran the script, and closed FileMaker Pro. Couldn't a file be created upon first registration that later instances can look at and verify? I've seen this method being used by some other plugin vendors. Calling the registration twice in a row seems to have done the trick. Since implementing this, I haven't gotten a single error message. Thanks for the heads-up!
Create an account or sign in to comment