7 Replies Latest reply on Jan 27, 2015 2:29 PM by hehazelhorst

    Serverside script and accountname

    psijmons

      I am assuming that scripts using the scriptstep "Perform script on server" are using the same login credentials as the user who fired the script.

      But I continuously get the message in FMSAT acitivity viewer that my authentication failed when i try to run a script server side.

       

      There is no logic here as obviously this is a valid account, I am logged in with that same account as client.

      My opening scripts have forks to bypass all sorts of housekeeping that a user has to go through:

       

      IF PatternCount ( Get ( ApplicationVersion ) ; "Server" )

      exit script

      END IF

       

      Am I missing something obvious here? or should I include a relogin for a specific server account.

      Any pointers will be appreciated.

       

      Peter

        • 1. Re: Serverside script and accountname
          wimdecorte

          Are you calling a script in one file but then trying to access data in another file?

          There is a known bug on that.

           

          What's not clear to me is how you establish the link between what yous see in the FMS admin console (activity viewer? - is that the events log?) and what the script does.

          There are times where the event log will log an authentication error and it is a total red herring.  Are there any script errors reported in the event log?

          • 2. Re: Serverside script and accountname
            psijmons

            hello Wim,

             

            The message was in the actvities pane of FMSAT but the message in the log is the same, no indication that the script made any more steps and shows no further errors.

             

            I indeed use data separation but I did run tests directly from the data file with a very simple script but I got the same result.

            I did update to FMS13.01 and FMPA13.03 (this is on OSX10.7 client OSX10.9 server), could this have caused it?

            (it has worked before).

            • 3. Re: Serverside script and accountname
              wimdecorte

               

              but the message in the log is the same

               

              I don't think you 've given us the exact message yet.  That would help.  Or a screenshot.  There is nothing in the FMS13 Activty Pane that would show any errors.  It just shows what files are open and who is connected.  That makes me think that we are not looking at the same thing...

               

               

               

              I indeed use data separation but I did run tests directly from the data file with a very simple script but I got the same result

               

              You haven't said yet what result you were getting.. what error specifically?

              Explain a little more what your different tests are.

              • 4. Re: Serverside script and accountname
                psijmons

                Apologies, it is the Status Pane, screenshot is included.

                Screen Shot 2014-04-22 at 20.13.21.jpg

                 

                The test in the data file is in 2nd screenshot, this script is called from a parent which has the step "Perform script on server"

                 

                Screen Shot 2014-04-22 at 20.17.25.jpg

                 

                I am logged in as developer with  FullAccess when the script is fired.

                This is within the same LAN.

                • 5. Re: Serverside script and accountname
                  wimdecorte

                  If you are in one file and try to set something (or read something) from a related file through a PSoS script then it will fail.  That's the bug I mentioned earlier.  PSoS is not able to pass credentials to a related file.

                   

                  It's a known issue.

                  • 6. Re: Serverside script and accountname
                    psijmons

                    Yes, but this was directly from a script in the data file, so it could not be simpler and I did some more digging.

                     

                    Extended the test script to test also part from my account when I noticed something embarrassing, a primary key was duplicated blocking the whole process.

                    (developer copies are often full of junk I'm afraid)

                    Still, you pointed me to a real problem, that PSoS will not work from related files (and this coincided with the key duplication in my tests). I will have to work around that bug.

                     

                    Thanks for the help.

                    • 7. Re: Serverside script and accountname
                      hehazelhorst

                      Well, it's 9 months and 2 maintenance releases since this post and it appears the 'known issue' still has to be solved.

                      I encountered the same problem and after an upgrade to FMS13v5 it appeared to be solved only partially.

                      Tried running a script with PSoS that references a table outside the same file (but hosted by the same server and using the same credentials). This works as long as I'm on the local network, but not through a WAN connection! The script will execute, but somehow FMS fails to 'pick up' the reference to the related file or somehow loses the connection it needs to pass on the login information, so the relation doesn't 'exist' for the PSoS session. A timing problem perhaps?