Comments (27)
Thanks Let me inspect and get back.
from azure-iot-pcs-remote-monitoring-dotnet.
Thanks for the update Parvez.
@sushilraje
I am listing a few more items, which i encountered during my debugging by starting the services separately in a command prompt by using the run.cmd inside docker directory.
- The container APIs are accessible from the browser. However they are not reached by the containers.
- Some of the expected collections and values are not present in the Cosmos DB.
http://localhost:9022/v1/collections/device-twin-properties/values/cache
http://localhost:9022/v1/collections/solution-settings/values/seedMutex
http://127.0.0.1:9004/v1/rules - If there is no seed data injection, please provide steps to call the REST APIs(headers/body)
Hope this helps.
Thanks
from azure-iot-pcs-remote-monitoring-dotnet.
@raamanihilent: I believe you need to run the pcs -s local
command after pcs login
but before docker-compose up
. Please run it and let me know if it works.
from azure-iot-pcs-remote-monitoring-dotnet.
@sushilraje
Thanks.
It did not help.
when i run the pcs -s local command, the command prompts to create Azure resources, which was already done by executing the start.cmd command from the documentation link provided earlier.
The following steps were followed and i could verify that the azure resources were created.
Run the start.cmd script. The script prompts you for the following information:
A solution name.
The Azure subscription to use.
The location of the Azure datacenter to use.
Will wait for your updates. Ty.
from azure-iot-pcs-remote-monitoring-dotnet.
@raamanihilent:
It seems that start.cmd didn't stamp the environment variables on your machine. I will try to repro this issue. But a quick fix would be to create following environment variables on your machine.
PCS_KEYVAULT_NAME
PCS_AAD_APPID
PCS_AAD_APPSECRET
Values for these variables would be
Go to your azure portal go to resource group (same as solution name)
keyvault-****
go to keyvault > secrets
aadAppId
aadAppSecret
from azure-iot-pcs-remote-monitoring-dotnet.
@sushilraje
Thanks for the information.
It was set correctly by start.cmd command. I have verified this before creating the issue.
Here is my env snapshot.
Will wait for your updates.
from azure-iot-pcs-remote-monitoring-dotnet.
@raamanihilent Which docker compose yaml file are you using?
azure-iot-pcs-remote-monitoring-dotnet\services\scripts\local OR
azure-iot-pcs-remote-monitoring-dotnet\scripts\local
You should be using the one underneath the services folder.
from azure-iot-pcs-remote-monitoring-dotnet.
yes I ran the script from
azure-iot-pcs-remote-monitoring-dotnet\services\scripts\local
from azure-iot-pcs-remote-monitoring-dotnet.
Can you check foll,?
Does your docker-compose.yml file have foll structure,
especially the highlighted environment variables.
:
image: azureiotpcs/-dotnet:testing
.........
environment:
- PCS_KEYVAULT_NAME
- PCS_AAD_APPID
- PCS_AAD_APPSECRET
Also, could you try deleting all the images from your local machine and try docker-compose up?
from azure-iot-pcs-remote-monitoring-dotnet.
Yes and i deleted all the images, ran docker-compose up.
Did not work .
Will wait for your updates.
from azure-iot-pcs-remote-monitoring-dotnet.
Can you docker inspect on any of the containers and ensure that the variables are correct values are passed through?
from azure-iot-pcs-remote-monitoring-dotnet.
I tried it out locally, it did work for me.
Please do docker inspect
and check if the required three variables
PCS_AAD_APPID,
PCS_AAD_APPSECRET,
KEYVAULT_NAME
are getting passed along correctly as environment variables to the container.
Also, what is the tag of your containers?
from azure-iot-pcs-remote-monitoring-dotnet.
@raamanihilent: Were you able to get any data around the issue?
from azure-iot-pcs-remote-monitoring-dotnet.
@sushilraje Since you mentioned it worked for you locally, I am planning to redo the steps. Let me get back to you with my updates.
from azure-iot-pcs-remote-monitoring-dotnet.
@sushilraje
As mentioned i cleaned up my environment.
Followed the steps again and tried docker-compose up. The local proxy was failing with error -
ERROR: for reverseproxy Cannot start service reverseproxy: OCI runtime create failed: container_linux.go:344: starting container process caused "process_linux.go:424: container init caused "rootfs_linux.go:58: mounting \"/host_mnt/c/MyStuff/remotemonitoring/azure-iot-pcs-remote-monitoring-dotnet/services/scripts/local/config/nginx.conf\" to rootfs \"/var/lib/docker/overlay2/f9531ebe0054b7d0436008af3945903e9f311f3052d029ab202d0ef3dba0cbd7/merged\" at \"/var/lib/docker/overlay2/f9531ebe0054b7d0436008af3945903e9f311f3052d029ab202d0ef3dba0cbd7/merged/app/config/nginx.conf\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.
I then stopped all my containers, started each container in a separate window and inspected them.
I could verify the following environment variables set via docker inspect
"PCS_KEYVAULT_NAME=",
"PCS_AAD_APPID=",
"PCS_AAD_APPSECRET=",
However these are my errors in console -
Config container
StorageAdapter returns 0 for request http://localhost:9022/v1/collections/device-twin-properties/values/cache, {"Uri":"http://localhost:9022/v1/collections/device-twin-properties/values/cache","StatusCode":0,"Content":"An error occurred while sending the request. - Couldn't connect to server"}
ASA
Received error updating device to device group mapping, {"e":{"ExceptionFullName":"Microsoft.Azure.IoTSolutions.AsaManager.Services.Exceptions.ExternalDependencyException","ExceptionMessage":"Unable to get list of device groups","StackTrace":" at Microsoft.Azure.IoTSolutions.AsaManager.DeviceGroupsAgent.DeviceGroupsClient.d__8.MoveNext() in /home/azureiotpcs/vsts-agent/_work/20/s/asa-manager/DeviceGroupsAgent/DeviceGroupsClient.cs:line 83\n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\n at Microsoft.Azure.IoTSolutions.AsaManager.DeviceGroupsAgent.Agent.d__13.MoveNext() in /home/azureiotpcs/vsts-agent/_work/20/s/asa-manager/DeviceGroupsAgent/Agent.cs:line 85","Source":"Microsoft.Azure.IoTSolutions.AsaManager.DeviceGroupsAgent","Data":{},"InnerException":{"ExceptionFullName":"Microsoft.Azure.IoTSolutions.AsaManager.Services.Exceptions.ExternalDependencyException","ExceptionMessage":"Unable to load get device groups","StackTrace":" at Microsoft.Azure.IoTSolutions.AsaManager.Services.Http.HttpClient.d__9`1.MoveNext() in /home/azureiotpcs/vsts-agent/_work/20/s/asa-manager/Services/Http/HttpClient.cs:line 104\n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\n at Microsoft.Azure.IoTSolutions.AsaManager.DeviceGroupsAgent.DeviceGroupsClient.d__8.MoveNext() in /home/azureiotpcs/vsts-agent/_work/20/s/asa-manager/DeviceGroupsAgent/DeviceGroupsClient.cs:line 78","Source":"Microsoft.Azure.IoTSolutions.AsaManager.Services","Data":{},"InnerException":null}}}
iot_hub_manager
[StorageAdapterClient:CheckStatusCode] StorageAdapter returns 0 for request http://localhost:9022/v1/collections/device-twin-properties/values/cache, {"Uri":"http://localhost:9022/v1/collections/device-twin-properties/values/cache","StatusCode":0,"Content":"An error occurred while sending the request. - Couldn't connect to server"}
Will wait for your updates.
Thanks
from azure-iot-pcs-remote-monitoring-dotnet.
deploy locally with Visual studio - cannot start the microservices as well - any leads on this ?
environment variables set correctly -
any more changes here ? please advise, thanks
from azure-iot-pcs-remote-monitoring-dotnet.
Also can you provide more details for the deploy with VS Code -
Deploy all other microservices on local machine
Open the azure-iot-pcs-remote-monitoring-dotnet module from your local copy in VS Code.
Copy the files launch.json and tasks.json from scripts\local\launch\idesettings\vscode. Create a new folder azure-iot-pcs-remote-monitoring-dotnet.vscode and paste the files there.
Open the Debug panel in VS Code and run the Run all microservices configuration. This configuration runs the device simulation microservice in Docker and runs the other microservices in the debugger.
don't see an option in debug panel for running all microservices... can you please provide detailed steps for this. Thanks
from azure-iot-pcs-remote-monitoring-dotnet.
The microservices don't start when doing a docker compose up either - screenshot below
Can you please add on more steps here to have it running. Thanks.
from azure-iot-pcs-remote-monitoring-dotnet.
@raamanihilent @ac2707 I am extremely sorry for the delayed response.
from azure-iot-pcs-remote-monitoring-dotnet.
@raamanihilent: We do need to mount a directory containing nginx.conf file on to the docker container.
If you are using Windows, you will need to give permissions to docker daemon.
Open your docker console > settings > Shared Drives > Select your drives > Apply
from azure-iot-pcs-remote-monitoring-dotnet.
@ac2707 sn
deploy locally with Visual studio - cannot start the microservices as well - any leads on this ?
environment variables set correctly -
any more changes here ? please advise, thanks
This is actually working. The logs are not Error level but warnings. Here microservices are trying to inherit env variables. As a first step, the services try to inherit files from local env, if not found then the services go to key-vault. Since you have given key-vault credentials, the services will get the variables/secrets from key-vault.
from azure-iot-pcs-remote-monitoring-dotnet.
Also can you provide more details for the deploy with VS Code -
Deploy all other microservices on local machine
Open the azure-iot-pcs-remote-monitoring-dotnet module from your local copy in VS Code.
Copy the files launch.json and tasks.json from scripts\local\launch\idesettings\vscode. Create a new folder azure-iot-pcs-remote-monitoring-dotnet.vscode and paste the files there.
Open the Debug panel in VS Code and run the Run all microservices configuration. This configuration runs the device simulation microservice in Docker and runs the other microservices in the debugger.
don't see an option in debug panel for running all microservices... can you please provide detailed steps for this. ThanksIn your file launch.json from scripts\local\launch\idesettings\vscode, do you see "compound" section with name "Run all Microservices" as here?
from azure-iot-pcs-remote-monitoring-dotnet.
The microservices don't start when doing a docker compose up either - screenshot below
Can you please add on more steps here to have it running. Thanks.
This is a different issue than just provisioning. Can you open up a new issue? In that please add foll. details
- o/p of
docker ps
- o/p of
docker ps -a
- Complete logs of
- UiConfig/Config
- Device Simulation
- Storage Adapter microservices,
preferably as files
from azure-iot-pcs-remote-monitoring-dotnet.
@raamanihilent & @ac2707 Do let me know if you face any further issues.
from azure-iot-pcs-remote-monitoring-dotnet.
The microservices don't start when doing a docker compose up either - screenshot below
Can you please add on more steps here to have it running. Thanks.
This is a different issue than just provisioning. Can you open up a new issue? In that please add foll. details
o/p of
docker ps
o/p of
docker ps -a
Complete logs of
- UiConfig/Config
- Device Simulation
- Storage Adapter microservices,
preferably as files
from azure-iot-pcs-remote-monitoring-dotnet.
@ac2707 sn
deploy locally with Visual studio - cannot start the microservices as well - any leads on this ?
environment variables set correctly -
any more changes here ? please advise, thanksThis is actually working. The logs are not Error level but warnings. Here microservices are trying to inherit env variables. As a first step, the services try to inherit files from local env, if not found then the services go to key-vault. Since you have given key-vault credentials, the services will get the variables/secrets from key-vault.
The command prompts and the web browser windows close, unable to run the microservices from Visual studio..
debug output log in Visual studio below -
from azure-iot-pcs-remote-monitoring-dotnet.
Any Solution Found for starting microservices ???
from azure-iot-pcs-remote-monitoring-dotnet.
Related Issues (20)
- Local deployment instruction is incomplete
- Alerting and graphing break because the RM infrastructure does not respect iothub-creation-time-utc HOT 3
- Remove dependency on obsolete RegistryManager.GetDevicesAsync method HOT 6
- Unable to run device simulation service HOT 3
- TypeError
- Any api documents like swagger? HOT 1
- Can't set up Azure resources.
- Device Sim won't start correctly HOT 2
- Remote Monitoring local deployment not working - Device Simulation service HOT 5
- What's the value of REACT_APP_BASE_SERVICE_URL to deploy locally? HOT 7
- Fork or Contribute? HOT 1
- Missing icon fonts! HOT 7
- Simulation No Started. Error "Failed to seed default simulations " HOT 3
- Error starting telemetry and storage adapter services HOT 2
- Failed to disable authentication HOT 5
- Run start.sh in linux machine HOT 3
- Linux machine ./start.sh does not recongnize node version HOT 2
- Error: Long running operation failed with error: "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details HOT 1
- Fail to deploy the remote monitoring solution accelerator locally with Docker HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-iot-pcs-remote-monitoring-dotnet.