Closed wasker closed 4 years ago
The root cause of the problem: mismatch between parameter names used in [parameters('Blah_cpu')]
and the ones declared in parameters.yaml.
The error message didn't help me at all.
I'm getting this same error but can't find the cause. When you say mismatch, there was not a 'Blah_cpu' parameter declared in YAML? I am going through the SF Mesh tutorial and have double checked all the params, but I am new to YAML. Made sure no tabs, and environment variables lined up. Not sure what else I should look for.
If I search solution for "parameters(" these are only results:
port: "[parameters('TodoManagerWebApi_ingressport')]"
port: "[parameters('TodoManagerWeb_ingressport')]"
cpu: "[parameters('TodoManagerWeb_cpu')]"
cpu: "[parameters('TodoManagerWebApi_cpu')]"
In the fabric mesh project, under Environments/Local/parameters.yaml these are defined:
## Parameters file ##
TodoManagerWeb_cpu: 0.5
TodoManagerWeb_ingressport: 8080
TodoManagerWebApi_cpu: 0.5
TodoManagerWebApi_ingressport: 8081
My Web MVC project service.yaml:
## Service definition ##
application:
schemaVersion: 1.0.0-preview2
name: TodoManagerFabricMesh
properties:
services:
- name: TodoManagerWeb
properties:
description: TodoManagerWeb description.
osType: Windows
codePackages:
- name: TodoManagerWeb
image: todomanagerweb:dev
endpoints:
- name: TodoManagerWebListener
port: 8080
environmentVariables:
- name: ApiHostPort
value: 8081
- name: ToDoServiceName
value: TodoManagerWebApi
# - name: ApplicationInsights:InstrumentationKey
# value: "<Place AppInsights key here, or reference it via a secret>"
resources:
requests:
cpu: "[parameters('TodoManagerWeb_cpu')]"
memoryInGB: 1
replicaCount: 1
networkRefs:
- name: TodoManagerFabricMeshNetwork
endpointRefs:
- name: TodoManagerWebListener
My Web API service.yaml:
## Service definition ##
application:
schemaVersion: 1.0.0-preview2
name: TodoManagerFabricMesh
properties:
services:
- name: TodoManagerWebApi
properties:
description: TodoManagerWebApi description.
osType: Windows
codePackages:
- name: TodoManagerWebApi
image: todomanagerwebapi:dev
endpoints:
- name: TodoManagerWebApiListener
port: 8081
# environmentVariables:
# - name: ApplicationInsights:InstrumentationKey
# value: "<Place AppInsights key here, or reference it via a secret>"
resources:
requests:
cpu: "[parameters('TodoManagerWebApi_cpu')]"
memoryInGB: 1
replicaCount: 1
networkRefs:
- name: TodoManagerFabricMeshNetwork
endpointRefs:
- name: TodoManagerWebApiListener
Does it matter that the ports don't match up with the ones in the Web MVC project's /Properties/launchSettings.json, it's not really clear to me what service.yaml is doing versus launchSettings.json since both define port numbers for the project. I do understand the env. variables are so the Web project knows where to reach the WebAPI project.
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:52898",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"TodoManager.Web": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:5000"
},
"Service Fabric Local Cluster": {
"commandName": "SFApp",
"launchBrowser": true,
"launchUrl": "http://{ServiceIpAddress}:{ServicePort}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Closing SF Mesh related issue
Describe the bug
I'm trying to troubleshoot ASF Mesh project in VS. When powershell command is executed and something is wrong, the error message is:
To Reproduce
Expected behavior
If something is wrong with my settings, I expect a helpful error message that explains what is going on.
Additional context Add any other context about the problem here.