Jump to content

Error 212 on server side script


This topic is 4701 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I keep getting error 212 (invalid user account/password) when trying to run an import script, server side, on a hosted file.

A bit of background:

I have 2 hosted files, a Main Data file and a Data Import file.

I have a server side script sequence to automatically import the data from Data Import to the Main Data file.

A system script pauses the Data Import file, copies it to the Server Documents folder, and the resumes the file prior to executing the FM Script.

The FM script in the Main Data file then imports data from various tables in the Data Import file into other tables in the Main Data file.

The script runs perfectly if I manually execute it but it will not work when triggered by the server schedule. I've checked and rechecked the supplied credentials in the server schedule and they are correct. I've even tried different accounts and the admin account, nothing works server-side.

Thoughts?

Link to comment
Share on other sites

You can't import directly from FM file to FM file with a server-side script. You need to export from the source file to a supported format (not fp7) and then run an import script in the other file.

Link to comment
Share on other sites

That's what I had always thought as well. But Matt O'Dell told me at PoE NYC 2011 that you can do FM -> FM, the source just has to be a local file in the Server Documents or temp path.

With that in mind a wrote a system script to pause the hosted file, copy it to the Server Documents folder, and resume the hosted file. I'm attaching a set of demo files. The two data files need to be hosted and the importDB.sh file needs to be in the Server Scripts folder. Once you've got the files in the right places make a schedule to perform a script sequence. The FM script is "Import from test_source" in the test_destination file and the importDB.sh file needs to be run prior to the FM script.

This demo will work! But only because test_source has auto-login on. If you turn auto-login off it will fail, even though the credentials being used to open test_destination are the same as test_source.

The credentials don't get passed from one file to the other and there is no way, in FM scripting, to open the second file server side.

Note: the demo file were written for OS X. You'll have to write your own importDB.bat for Windows.

SASE FM Import.zip

Link to comment
Share on other sites

I completely agree with the security risk. That's why I'm hoping to find a way to get it to work around that. But, alas, it seems that there is no way to do that.

Link to comment
Share on other sites

This topic is 4701 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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