我尝试在Windows容器实例的帮助下在天蓝色devop中实施声纳波连续检查。在创建了azure sonarqube实例(Docker sonarqube最新映像)和azure sql数据库之后,我尝试使用以下azure CLI命令帮助将sonarqube Windows实例与azure sql服务器绑定:
az webapp config connection-string set --resource-group $RESOURCE_GROUP_NAME --name $WEBAPP_NAME -t SQLAzure --settings SONARQUBE_JDBC_URL=$DB_CONNECTION_STRING --connection-string-type SQLAzure
az webapp config container set --name $WEBAPP_NAME--resource-group $RESOURCE_GROUP_NAME --docker-custom-image-name $CONTAINER_REGISTRY_FQDN/$CONTAINER_IMAGE_NAME:$CONTAINER_IMAGE_TAG --docker-registry-server-url https://$CONTAINER_REGISTRY_FQDN --docker-registry-server-user $REG_ADMIN_USER --docker-registry-server-password $REG_ADMIN_PASSWORD
为此,我使用了以下文章中得出的服务器较少的声纳设置方法: https://github.com/Hupka/sonarqube-azure-setup
但是我在运行声纳容器实例时得到了以下容器日志:
2019-06-13 14:28:34.362 INFO - Logging is not enabled for this container.
Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2019-06-13 14:28:38.819 INFO - Initiating warmup request to container SonarQubewebappName for site sonarqube-docker
2019-06-13 14:28:54.260 INFO - Waiting for response to warmup request for container SonarQubewebappName. Elapsed time = 15.4410269 sec
2019-06-13 14:29:12.285 INFO - Waiting for response to warmup request for container SonarQubewebappName. Elapsed time = 33.4654201 sec
2019-06-13 14:29:28.296 INFO - Waiting for response to warmup request for container SonarQubewebappName. Elapsed time = 49.4772459 sec
2019-06-13 14:29:44.637 INFO - Waiting for response to warmup request for container SonarQubewebappName. Elapsed time = 65.8173845 sec
**2019-06-13 14:29:56.670 ERROR - Container SonarQubewebappName for site SonarQubewebappName has exited, failing site start
2019-06-13 14:29:56.693 ERROR - Container SonarQubewebappName didn't respond to HTTP pings on port: 9000, failing site start.**
获取:(访问sonarqube时出现应用程序错误。
但是相同的配置适用于在本地创建并与相同的Azure SQL数据库链接的sonarqube docker实例。
您能帮我解决这个错误吗?
az webapp config connection-string set --resource-group $RESOURCE_GROUP_NAME --name $WEBAPP_NAME -t SQLAzure --settings SONARQUBE_JDBC_URL=$DB_CONNECTION_STRING --connection-string-type SQLAzure
az webapp config container set --name $WEBAPP_NAME--resource-group $RESOURCE_GROUP_NAME --docker-custom-image-name $CONTAINER_REGISTRY_FQDN/$CONTAINER_IMAGE_NAME:$CONTAINER_IMAGE_TAG --docker-registry-server-url https://$CONTAINER_REGISTRY_FQDN --docker-registry-server-user $REG_ADMIN_USER --docker-registry-server-password $REG_ADMIN_PASSWORD