Skip to content

Commit

Permalink
Add Debugging document (#94)
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Thaler <[email protected]>
  • Loading branch information
dthaler authored Aug 12, 2024
1 parent 5b69ac4 commit c351f3e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions OrcanodeMonitor/Core/Fetcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,9 @@ public async static Task UpdateOrcasoundDataAsync(OrcanodeMonitorContext context
continue;
}

// First see if we can find a node by dataplicity ID, so that if a node
// shows up in dataplicity first and Orcasite later, we don't create a
// duplicate entry.
Orcanode? node = null;
if (attributes.TryGetProperty("dataplicity_id", out var dataplicity_id))
{
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ history, and allows real-time notifications via many mechanisms (using [IFTTT](h

For more details, see the [Design note](docs/Design.md).

For troubleshooting info, see the [Debugging note](docs/Debugging.md).

## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for
Expand Down
29 changes: 29 additions & 0 deletions docs/Debugging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Orcanode Monitor Debugging

## Debugging Startup Issues

### Method 1

1. Set the environment variable ASPNETCORE_ENVIRONMENT to "Development"
2. Save the environment variables which will restart the server
3. Navigate to the site

### Method 2

1. Go to the app service in [Azure portal](https://portal.azure.com/)
2. Click on "Console" on the left
3. Type in the exe name: OrcanodeMonitor.exe

### Method 3

1. Go to https://orcanodemonitor.scm.azurewebsites.net
2. Under the "Debug console" drop down menu, select "CMD"
3. Cd to C:\home\site\wwwroot
4. Type in: dotnet OrcanodeMonitor.dll

## Links

* [Production site](https://orcanodemonitor.azurewebsites.net/)
* [Staging site](https://orcanodemonitorstaging.azurewebsites.net/)
* [Azure portal](https://portal.azure.com/)
* [Blog on how to troubleshoot error 500.30](https://zimmergren.net/solving-asp-net-core-3-on-azure-app-service-causing-500-30-in-process-startup-failure/)
2 changes: 2 additions & 0 deletions docs/Design.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ The following state will be stored per orcanode:

### Configured parameters

**AZURE_SQL_CONNECTIONSTRING**: The connection string for the SQL database to use. Default: Server=(localdb)\mssqllocaldb;Database=OrcanodeMonitorContext-361a3d40-f3a0-4228-92d0-34532be19b05;Trusted_Connection=True;MultipleActiveResultSets=true

**ORCASOUND_POLL_FREQUENCY_IN_MINUTES**: Service will poll each orcanode at the configured frequency. Default: 5

**ORCASOUND_MAX_UPLOAD_DELAY_MINUTES**: If the manifest file is older than this, the node will be considered offline. Default: 2
Expand Down

0 comments on commit c351f3e

Please sign in to comment.