AWS Thinkbox Discussion Forums

Secrets - Could not retrieve valid master key

While trying to save email SMTP password, I get an error.

  • Ran deadlinecommand secrets ConfigureServerMachine with defaultKey (Master key is already granted to the Server.
  • Assigned Client to remote station, registered identities
  • Tried monitor as localhost and remote station
  • Tried making a new admin
  • I can’t debug the MonitorCommands.py because it’s a .pyc

Thanks!

Monitor Console Log

2024-04-10 16:18:03:  POST https://127.0.0.1:4433/rcs/v1/putSecret returned InternalServerError "" (Deadline.Net.Clients.Http.DeadlineHttpRequestException)
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.b(HttpRequestMessage bma)
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.SendRequestForStream(String method, String uri, String contentType, Dictionary`2 headers, HttpContent httpContent)
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.SendRequest(String method, String uri, String contentType, Dictionary`2 headers, HttpContent httpContent)
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.Post(String uri, Object body, String contentType, Dictionary`2 headers)
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.Post[TRequest,TResponse](String uri, TRequest body, String contentType, Dictionary`2 headers)
2024-04-10 16:18:03:     at Deadline.Controllers.RemoteSecretsManagementController.PutSecret(String secretId, String secretString, String description, String username, String password)
2024-04-10 16:18:03:  Deadline.Net.Clients.Http.DeadlineHttpRequestException: POST https://127.0.0.1:4433/rcs/v1/putSecret returned InternalServerError ""
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.b(HttpRequestMessage bma)
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.SendRequestForStream(String method, String uri, String contentType, Dictionary`2 headers, HttpContent httpContent)
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.SendRequest(String method, String uri, String contentType, Dictionary`2 headers, HttpContent httpContent)
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.Post(String uri, Object body, String contentType, Dictionary`2 headers)
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.Post[TRequest,TResponse](String uri, TRequest body, String contentType, Dictionary`2 headers)
2024-04-10 16:18:03:     at Deadline.Controllers.RemoteSecretsManagementController.PutSecret(String secretId, String secretString, String description, String username, String password)
2024-04-10 16:18:03:  The above exception was the direct cause of the following exception:
2024-04-10 16:18:03:  Traceback (most recent call last):
2024-04-10 16:18:03:    File "C:\thinkbox-conda\conda-bld\deadline_1702686984821\work\DeadlineProject\DeadlineUI\Commands\MonitorCommands.py", line 2393, in SaveSecretViaSecretsManagement
2024-04-10 16:18:03:  System.InvalidOperationException: Failed to store the secret (/admin/emailnotifications/PrimaryUsername) due to an unexpected error. Please see Server's application log for further information.
2024-04-10 16:18:03:   ---> Deadline.Net.Clients.Http.DeadlineHttpRequestException: POST https://127.0.0.1:4433/rcs/v1/putSecret returned InternalServerError ""
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.b(HttpRequestMessage bma)
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.SendRequestForStream(String method, String uri, String contentType, Dictionary`2 headers, HttpContent httpContent)
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.SendRequest(String method, String uri, String contentType, Dictionary`2 headers, HttpContent httpContent)
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.Post(String uri, Object body, String contentType, Dictionary`2 headers)
2024-04-10 16:18:03:     at Deadline.Net.Clients.Http.HttpClient.Post[TRequest,TResponse](String uri, TRequest body, String contentType, Dictionary`2 headers)
2024-04-10 16:18:03:     at Deadline.Controllers.RemoteSecretsManagementController.PutSecret(String secretId, String secretString, String description, String username, String password)
2024-04-10 16:18:03:     --- End of inner exception stack trace ---
2024-04-10 16:18:03:     at Deadline.Controllers.RemoteSecretsManagementController.PutSecret(String secretId, String secretString, String description, String username, String password)
2024-04-10 16:18:03:     at Deadline.Controllers.SecretAccessUtility.b(DataController cxm, String cxn, String cxo, String cxp, String cxq)
2024-04-10 16:18:03:     at Deadline.Controllers.SecretAccessUtility.SetPrimarySMTPUsername(DataController dataController, String username, String adminusername, String adminpassword)
2024-04-10 16:18:03:  During handling of the above exception, another exception occurred:
2024-04-10 16:18:03:  Traceback (most recent call last):
2024-04-10 16:18:03:    File "C:\thinkbox-conda\conda-bld\deadline_1702686984821\work\DeadlineProject\DeadlineUI\Commands\MonitorCommands.py", line 2750, in InnerExecute
2024-04-10 16:18:03:    File "C:\thinkbox-conda\conda-bld\deadline_1702686984821\work\DeadlineProject\DeadlineUI\Commands\MonitorCommands.py", line 2394, in SaveSecretViaSecretsManagement
2024-04-10 16:18:03:  NameError: name 'InvalidOperationException' is not defined

RCS log

2024-04-10 16:29:20:  ERROR: DeadlineLoggerMiddleware caught exception method=POST path=/rcs/v1/putSecret remoteip=216.249.118.253 exception=System.InvalidOperationException: Could not retrieve valid master key.
2024-04-10 16:29:20:     at Deadline.Controllers.SecretsManagementController.c(IIdentity dbs)
2024-04-10 16:29:20:     at Deadline.Controllers.SecretsManagementController.PutSecret(String secretId, String secretString, String description, String username, String password)
2024-04-10 16:29:20:     at DeadlineRCS.Controllers.SecretsManagementController.PutSecretAsync(PutSecretRequest putSecretRequest)
2024-04-10 16:29:20:     at lambda_method2326(Closure , Object )
2024-04-10 16:29:20:     at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
2024-04-10 16:29:20:     at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
2024-04-10 16:29:20:     at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2024-04-10 16:29:20:     at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
2024-04-10 16:29:20:     at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
2024-04-10 16:29:20:     at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
2024-04-10 16:29:20:  --- End of stack trace from previous location ---

The email ssl password is not listed as a secret:

Secret Id                        Secret Version MasterKey Id MasterKey Version Secret Description                                    Secret Disabled
================================ ============== ============ ================= ===================================================== ===============
/events/FTrack/FTrackAPIKey      0              defaultKey   0                 The API Key to use to connect to FTrack.              False
/events/NIM/NimAPIKey            0              defaultKey   0                 The Render API key which is located in NIM under A... False
/events/Shotgun/ShotgunScriptKey 0              defaultKey   0                 Your Shotgun script key, which will look something... False
/events/Spot/SecretKey           0              defaultKey   0                 <html><head/><body><p>Your AWS Secret Access Key. ... False

This is my usual steps for that error, I’m a little surprised ConfigureServerMachine didn’t do it.

You’ll need to set the master key on the server, as I’d bet the installer failed to do so. You’re able to complete the installation, but a popup warns you there’ve been issues.

Here’s the steps:
From a command prompt on a machine using a direct connection (not an RCS connection) do the following.

Get the key name, there’s likely only one and it’s likely defaultKey using this command: Deadline Secrets Management — Deadline 10.3.2.1 documentation

Get the server name - You want the long string that looks like 61-3A-02-1B-AF-75-81-2D-AF-52-FB-93-85-E1-19-9F-11-4B-7F-2E-34-A4-83-FC-59-42-19-D2-E3-DA-07-76 in the example.
https://docs.thinkboxsoftware.com/products/deadline/10.3/1_User%20Manual/manual/secrets-management/deadline-secrets-management.html#deadline-secrets-management-command-listallmachines

Granting access key - use the two bits of info you’ve collected above
https://docs.thinkboxsoftware.com/products/deadline/10.3/1_User%20Manual/manual/secrets-management/deadline-secrets-management.html#grantkeyaccesstoserver

Edit: just saw above post, I tried this before seeing that.

I tried adding it manually using deadlinecommand secrets PutSecret zach /admin/emailnotifications/PrimaryUsername "Primary email username"

It shows up in list secrets, but still errors the same:

Secret Id                                 Secret Version MasterKey Id MasterKey Version Secret Description                                    Secret Disabled
========================================= ============== ============ ================= ===================================================== ===============
/admin/emailnotifications/PrimaryUsername 0              defaultKey   0                 Primary email username                                False

Thanks! Your solution worked.

I also think using deadline command might have been a workaround with these id’s, but glad to have it working correctly. :+1:

/admin/emailnotifications/PrimaryPassword 
/admin/emailnotifications/PrimaryUsername
2 Likes
Privacy | Site terms | Cookie preferences