Question: Issues setting up dfm backend mssql
SandroDeJesus opened this issue · comments
I have been using the dfm visual studio extension for a while but I would now like to have it hosted in azure. I am attempting to setup the mssql custom backend locally just for testing but I get the following errors when attempting to browse to
And I get the following error when browsing to http://localhost:7072/sqldb-lama-dev
What could be causing this and what can I check to determine the issue?
Hi @SandroDeJesus , are you trying to run this custom MSSQL backend locally or are you trying to run something else?
If you're trying to run that custom backend, can you post your local.settings.json
file (omitting all secrets) ?
As for hosting DfMon for MSSQL in Azure, the easiest way is to use this blue button to deploy an instance of it. Does it or does it not work for you?
Hi @scale-tone, yes that is the one I am trying to run locally. I also forgot to mention that I have created my orchestrations using the durable task framework and have not used azure functions. This is what my local.settings looks like. The connection string below is what I use to connect via the vs code extension which works fine.
{ "IsEncrypted": false, "Values": { "AzureWebJobsSecretStorageType": "files", "DFM_SQL_CONNECTION_STRING": "Server=tcp:{dbAddress},1433;Initial Catalog=sqldb-lama-dev; Persist Security Info=False;User ID={userName};Password={password}; MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;", "DFM_HUB_NAME": "sqldb-lama-dev", "DFM_NONCE": "i_sure_know_what_i_am_doing", "FUNCTIONS_WORKER_RUNTIME": "dotnet" }, "Host": { "LocalHttpPort": 7072 } }
@SandroDeJesus , please, try to omit DFM_HUB_NAME
setting.
Task Hub(s) should be resolved automatically and shown to you as a modal list. For MSSQL there's usually just one Task Hub, in which case you should be redirected to it automatically.
And definitely DFM_HUB_NAME
(if specified) should contain Task Hub name, not DB name.
@scale-tone, thanks for the quick and useful response, that makes sense to me. I have removed the setting which has now given me another error.
@scale-tone, I've also got v6.2.1.0 when I hover over the tab
I've just checked the packages in my application and these are the versions I am currently running, I have not updated these packages in some time which might explain why the schemas don't match?
Microsoft.Azure.DurableTask.Core 2.9.0
Microsoft.DurableTask.SqlServer 1.0.0-rc
Yes, durablefunctionsmonitor.dotnetbackend v6.2.1
expects Microsoft.DurableTask.SqlServer.AzureFunctions v1.1
.
I suggest you either upgrade your solution to Microsoft.DurableTask.SqlServer.AzureFunctions v1.1
(which, I hope, will fix your DB schema automatically, but not sure about it).
Or you can try using an older DfMon version.
If you're saying that your DfMon's VsCode ext works with that DB, then you should use the same version of durablefunctionsmonitor.dotnetbackend
.
was the local.settings file slightly different in the older version?
No, but there were many other differences.
I suggest you checkout the whole older version of this custom backend (from this tag) and try to run it as it is there.
Try navigating to http://localhost:7071/mssql
instead. That older version doesn't know how to gather the list of hubs.
And anyway, I highly recommend to migrate to the production version of Microsoft.DurableTask.SqlServer.AzureFunctions
.
I just got it working a few minutes ago by adding the below line to my local.settings
"DFM_HUB_NAME": "default",
Thank you for the suggestion, I will look to migrate
Hope we can close this one.
If anything else is missing, please, open another issue.