FME Version
Files
Known Issue ID | FMESERVER-18350 |
---|---|
Discovered | 2021.2 |
Affects | 2021.0 + |
Resolved | 2022.1 b22622 + |
Symptom
When you publish a workspace that contains an FME Server transformer e.g. FMEServerJobSubmitter, FMEServerLogFileRetriever, FMEServerNotifier, FMEServerJobWaiter, or FMEServerResourceConnector configured with an FME Server Web Connection the workspace will run successfully for one week. HTTPCallers may also be affected. After this time the workspace will fail with the error:
Reason - credentials for user '<username>' are invalid
If you try and use this connection in FME Workbench you'll receive a similar error:
Login failed (Not Authenticated) - Authentication failed: Failed to login
until you reauthorize the connection.
Cause
When you first upload an FME Server Web Connection to FME Server it will generate a token that expires after one week. After the token has expired FME Server is unable to reauthorize the connection and generate a new token for use within the workspace.
Workaround
Option 1 is the recommended workaround because it does not require any changes to existing workspaces, so is the simplest method to implement.
Option 1: Refresh Web Connection Token on a Schedule
The issue is occurring because the token is expiring and FME is unable to automatically refresh the token. It's possible to make a REST API call to update the token to extend the expiry date. This can be achieved in Automation:
- Open the FME Server Web UI and select Automations > Build Automation
- Add a Schedule Trigger and set the following parameters:
- Schedule Type: Repeat on Interval
- Repeat every: 6 Days
- Date Range - Start: Start Immediately
- Date Range - End: Does not Expire
- Add an HTTP Request External Action and set the following parameters:
- Request Type: PUT
- Request URL: <FME_Server_Web_URL>/fmerest/v3/tokens/<Username>/<TokenName>
- HTTP Authentication User Name: <Username>
- HTTP Authentication Password: <Password>
- Verify SSL Certificates: No
- HTTP Body:
{ "description": "FME Server Web Connection", "expirationTimeout": 604800, "enabled": true }
where:- <FME_Server_Web_URL> is URL to access your FME Server e.g. http(s)://<hostname>.<domain>:<port>
- <Username> is your FME Server username
- <Password> is your FME Server password
- <TokenName> is the name of the token tied to your FME Server Web Connection and is used in the Request URL. This can be found on the Manage Tokens Page and will look like 'Token Service Login - <UUID>
- Save and start the Automation.
- The schedule should trigger immediately, check the Automation log as well as your token to make sure the request was successful.
Note, in this example, the token is set to expire after 7 days, but the schedule is run every 6 days to refresh the token, hence it will never expire.
Alternatively, you can download the attached workspace to run on a schedule instead of the HTTP Request, but this occupies an engine, so may not be preferable on a busy server.
Option 2: Embed Credentials
Update the configuration of the transformer to 'Embed Connection Credentials'.
Option 3: Use Automations
If you encountered this issue using the FMEServerJobSumitter then you could use Automations as an alternative to the parent workflow to chain your workspaces together.
Comments
0 comments
Please sign in to leave a comment.