Skip to content

Commit e33fc9d

Browse files
author
Cephas Lin
committed
link to troubleshooting
1 parent 401f5f5 commit e33fc9d

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

articles/app-service/tutorial-java-tomcat-mysql-app.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,7 @@ In this step, you use the SSH connection to the app container to verify the JNDI
188188
:::row-end:::
189189
:::row:::
190190
:::column span="2":::
191-
**Step 2:** In the SSH terminal:
192-
1. Run `cat /usr/local/tomcat/conf/context.xml`. You should see that a JNDI resource called `jdbc/AZURE_MYSQL_CONNECTIONSTRING_DS` was added. You'll use this data source later.
191+
**Step 2:** In the SSH terminal, run `cat /usr/local/tomcat/conf/context.xml`. You should see that a JNDI resource called `jdbc/AZURE_MYSQL_CONNECTIONSTRING_DS` was added. You'll use this data source later.
193192
:::column-end:::
194193
:::column:::
195194
:::image type="content" source="./media/tutorial-java-tomcat-mysql-app/azure-portal-check-config-in-ssh-2.png" alt-text="A screenshot showing the commands to run in the SSH shell and their output." lightbox="./media/tutorial-java-tomcat-mysql-app/azure-portal-check-config-in-ssh-2.png":::
@@ -200,6 +199,8 @@ In this step, you use the SSH connection to the app container to verify the JNDI
200199
> Only changes to files in `/home` can persist beyond app restarts. For example, if you edit `/usr/local/tomcat/conf/server.xml`, the changes won't persist beyond an app restart.
201200
>
202201
202+
Having issues? Check the [Troubleshooting section](#troubleshooting).
203+
203204
## 5. Deploy sample code
204205

205206
In this step, you configure GitHub deployment using GitHub Actions. It's just one of many ways to deploy to App Service, but also a great way to have continuous integration in your deployment process. By default, every `git push` to your GitHub repository kicks off the build and deploy action.
@@ -305,6 +306,8 @@ Having issues? Check the [Troubleshooting section](#troubleshooting).
305306
:::column-end:::
306307
:::row-end:::
307308

309+
Having issues? Check the [Troubleshooting section](#troubleshooting).
310+
308311
## 7. Stream diagnostic logs
309312

310313
Azure App Service captures all messages output to the console to help you diagnose issues with your application. The sample application includes standard Log4j logging statements to demonstrate this capability, as shown in the following snippet:
@@ -333,6 +336,8 @@ Azure App Service captures all messages output to the console to help you diagno
333336

334337
Learn more about logging in Java apps in the series on [Enable Azure Monitor OpenTelemetry for .NET, Node.js, Python and Java applications](../azure-monitor/app/opentelemetry-enable.md?tabs=java).
335338

339+
Having issues? Check the [Troubleshooting section](#troubleshooting).
340+
336341
## 8. Clean up resources
337342

338343
When you're finished, you can delete all of the resources from your Azure subscription by deleting the resource group.
@@ -417,6 +422,8 @@ The dev container already has the [Azure Developer CLI](/azure/developer/azure-d
417422
- **Log Analytics workspace**: Acts as the target container for your app to ship its logs, where you can also query the logs.
418423
- **Key vault**: Used to keep your database password the same when you redeploy with AZD.
419424

425+
Having issues? Check the [Troubleshooting section](#troubleshooting).
426+
420427
## 3. Verify connection strings
421428

422429
The AZD template you use generated the connectivity variables for you already as [app settings](configure-common.md#configure-app-settings) and outputs the them to the terminal for your convenience. App settings are one way to keep connection secrets out of your code repository.
@@ -436,6 +443,8 @@ The AZD template you use generated the connectivity variables for you already as
436443
437444
If you add an app setting that contains a valid Oracle, SQL Server, PostgreSQL, or MySQL connection string, App Service adds it as a Java Naming and Directory Interface (JNDI) data source in the Tomcat server's *context.xml* file.
438445

446+
Having issues? Check the [Troubleshooting section](#troubleshooting).
447+
439448
## 4. Confirm JNDI data source
440449

441450
In this step, you use the SSH connection to the app container to verify the JNDI data source in the Tomcat server. In the process, you learn how to access the SSH shell for the Tomcat container.
@@ -454,6 +463,8 @@ In this step, you use the SSH connection to the app container to verify the JNDI
454463
> Only changes to files in `/home` can persist beyond app restarts. For example, if you edit `/usr/local/tomcat/conf/server.xml`, the changes won't persist beyond an app restart.
455464
>
456465

466+
Having issues? Check the [Troubleshooting section](#troubleshooting).
467+
457468
## 5. Modify sample code and redeploy
458469

459470
1. Back in the GitHub codespace of your sample fork, from the explorer, open *src/main/java/com/microsoft/azure/appservice/examples/tomcatmysql/ContextListener.java*. When the application starts, this class loads the database settings in *src/main/resources/META-INF/persistence.xml*.
@@ -479,6 +490,8 @@ In this step, you use the SSH connection to the app container to verify the JNDI
479490
> [!TIP]
480491
> You can also just use `azd up` always, which does both `azd provision` and `azd deploy`.
481492
493+
Having issues? Check the [Troubleshooting section](#troubleshooting).
494+
482495
## 6. Browse to the app
483496
484497
1. In the AZD output, find the URL of your app and navigate to it in the browser. The URL looks like this in the AZD output:
@@ -496,6 +509,8 @@ In this step, you use the SSH connection to the app container to verify the JNDI
496509
497510
Congratulations, you're running a web app in Azure App Service, with secure connectivity to Azure Database for MySQL.
498511
512+
Having issues? Check the [Troubleshooting section](#troubleshooting).
513+
499514
## 7. Stream diagnostic logs
500515
501516
Azure App Service can capture console logs to help you diagnose issues with your application. For convenience, the AZD template already [enabled logging to the local file system](troubleshoot-diagnostic-logs.md#enable-application-logging-linuxcontainer) and is [shipping the logs to a Log Analytics workspace](troubleshoot-diagnostic-logs.md#send-logs-to-azure-monitor).
@@ -512,6 +527,8 @@ Stream App Service logs at: https://portal.azure.com/#@/resource/subscriptions/&
512527
513528
Learn more about logging in Java apps in the series on [Enable Azure Monitor OpenTelemetry for .NET, Node.js, Python and Java applications](../azure-monitor/app/opentelemetry-enable.md?tabs=java).
514529
530+
Having issues? Check the [Troubleshooting section](#troubleshooting).
531+
515532
## 8. Clean up resources
516533
517534
To delete all Azure resources in the current deployment environment, run `azd down` and follow the prompts.

0 commit comments

Comments
 (0)