Skip to content

Commit 1abce3d

Browse files
authored
Merge pull request #96543 from zr-msft/ds-connect-diagnostics
[Dev Spaces] added troubleshooting and diagnostics
2 parents 0f232c2 + 0c1d942 commit 1abce3d

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

articles/dev-spaces/how-to/connect.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ $ npm install
115115
...
116116
```
117117

118-
119118
Click *Debug* then *Open Configurations*. If prompted to select an environment, choose *Node.js*.This creates a `.vscode/launch.json` file. Replace the contents of that file with the following:
120119

121120
```json
@@ -226,13 +225,26 @@ MYAPP1_SERVICE_HOST=${services.myapp1}
226225
# in addition to the IP in the MYAPP1_SERVICE_HOST environment variable.
227226
```
228227

228+
## Using logging and diagnostics
229+
230+
Logging output is written to the *Dev Spaces Connect* window after connect your development machine to your AKS cluster.
231+
232+
![Output](../media/how-to-connect/connect-output.png)
233+
234+
Click on the Azure Dev Spaces status bar and choose *Show diagnostics info*. This command prints the current environment variables and DNS entires in the logging output.
235+
236+
![Output with diagnostics](../media/how-to-connect/connect-output-diagnostics.png)
237+
238+
Additionally, you can find the diagnostic logs in `Azure Dev Spaces` directory in your [development machine's *TEMP* directory][azds-tmp-dir].
239+
229240
## Next steps
230241

231242
Learn how to use Azure Dev Spaces and GitHub Actions to test changes from a pull request directly in AKS before the pull request is merged into your repository’s main branch.
232243

233244
> [!div class="nextstepaction"]
234245
> [GitHub Actions & Azure Kubernetes Service][gh-actions]
235246
247+
[azds-tmp-dir]: ../troubleshooting.md#before-you-begin
236248
[azds-vs-code]: https://marketplace.visualstudio.com/items?itemName=azuredevspaces.azds
237249
[azure-cli]: /cli/azure/install-azure-cli?view=azure-cli-latest
238250
[bike-sharing-github]: https://github.com/Azure/dev-spaces/tree/master/samples/BikeSharingApp
42.6 KB
Loading

articles/dev-spaces/troubleshooting.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,21 @@ Service cannot be started.
248248

249249
This error occurs because AKS nodes run an older version of Docker that doesn't support multi-stage builds. To avoid multi-stage builds, rewrite your Dockerfile.
250250

251+
### Network traffic is not forwarded to your AKS cluster when connecting your development machine
252+
253+
When using [Azure Dev Spaces to connect your AKS cluster to your development machine](how-to/connect.md), you may encounter an issue where network traffic is not forwarded between your development machine and your AKS cluster.
254+
255+
When connecting your development machine to your AKS cluster, Azure Dev Spaces forwards network traffic between your AKS cluster and your development machine by modifying your development machine's `hosts` file. Azure Dev Spaces creates an entry in the `hosts` with the address of the Kubernetes service you are replacing as a host name. This entry is used with port forwarding to direct network traffic between your development machine and the AKS cluster. If a service on your development machine conflicts with the port of the Kubernetes service you are replacing, Azure Dev Spaces cannot forward network traffic for the Kubernetes service. For example, the *Windows BranchCache* service is usually bound to *0.0.0.0:80*, which conflicts will cause a conflict for port 80 on all local IPs.
256+
257+
To fix this issue, you need to stop any services or processes that conflict with port of the Kubernetes service you are trying to replace. You can use tools, such as *netstat*, to inspect what services or processes on your development machine are in conflict.
258+
259+
For example, to stop and disable the *Windows BranchCache* service:
260+
* Run `services.msc` from the command prompt.
261+
* Right click on *BranchCache* and select *Properties*.
262+
* Click *Stop*.
263+
* Optionally, you can disable it by setting *Startup type* to *Disabled*.
264+
* Click *OK*.
265+
251266
## Common issues using Visual Studio and Visual Studio Code with Azure Dev Spaces
252267

253268
### Error "Required tools and configurations are missing"

0 commit comments

Comments
 (0)