I’m trying to track down the cause of this issue and need some help.
Environment
Windows Server 2016
Grafana 6.2.5 commit: 6082d19
Note: this works in Grafana v5.4.4 (commit: e86baa5). I created a vanilla instance of that version of Grafana and the provisioned datasource works just fine.
If I create the datasource via UI and click save and test, it works. If I try to use a provisioned datasource when I click test I receive this exception back:
InitialBytes InitializeSecurityContext failed 8009030c
After a few attempts the windows service account is locked out in Active Directory. I unlock it and wait a few minutes to confirm propagation. Checked AD Audit I can confirm no other machine or external process is locking the account out.
I tried creating a new datasource .yml. I’ve tried putting the password between double quotes, single quotes and without quotes. Does not seem to make a difference. Here is the current format im using in the .yml:
apiVersion: 1
datasources:
- name: 'Created via provisioner'
type: mssql
url: mysqlserver.infra.corp.local
database: mydatabase
user: infra\svc_mywindowsaccount
jsonData:
maxOpenConns: 0 # Grafana v5.4+
maxIdleConns: 2 # Grafana v5.4+
connMaxLifetime: 14400 # Grafana v5.4+
secureJsonData:
password: "myPassword"
Curious to see what could be different about the UI created vs provisioned, I checked out what /api/datasources
returned and compared the two datasources. Here is what I’m getting:
{
"id": 31,
"orgId": 1,
"name": "Created via UI",
"type": "mssql",
"typeLogoUrl": "public/app/plugins/datasource/mssql/img/sql_server_logo.svg",
"access": "proxy",
"url": "mysqlserver.infra.corp.local",
"password": "",
"user": "infra\\svc_mywindowsaccount",
"database": "mydatabase",
"basicAuth": false,
"isDefault": false,
"jsonData": {
"encrypt": "false"
},
"readOnly": false
}
vs
{
"id": 30,
"orgId": 1,
"name": "Created via provisioner",
"type": "mssql",
"typeLogoUrl": "public/app/plugins/datasource/mssql/img/sql_server_logo.svg",
"access": "proxy",
"url": "mysqlserver.infra.corp.local",
"password": "",
"user": "infra\\svc_mywindowsaccount",
"database": "mydatabase",
"basicAuth": false,
"isDefault": false,
"jsonData": {
"connMaxLifetime": 14400,
"maxIdleConns": 2,
"maxOpenConns": 0
},
"readOnly": true
}
Any ideas on what to try next? I set up a brand-new vanilla instance and provisioned this datasource. I get the same error as above unless I create it via UI.