Code Monkey home page Code Monkey logo

teamcity-azure-template's Issues

Database upgrade fails with Could not connect to MySQL server: SQL error when doing 'Connection.setAutoCommit(false)'

During database converters execution upgrade may fails with the following exception:

Feb 12 11:26:05 teamcity docker[2043]: [2019-02-12 11:26:05,092]  ERROR -  jetbrains.buildServer.STARTUP - Exception UnknownUpgradeError in stage UPGRADE: Upgrading error: Could not connect to MySQL server: SQL error when doing 'Connection.setAutoCommit(false)': com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 936,932 milliseconds ago.  The last packet sent successfully to the server was 936,935 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem. Caused by: java.net.SocketException: Connection reset
Feb 12 11:26:05 teamcity docker[2043]: jetbrains.buildServer.maintenance.exceptions.UnknownUpgradeError: Upgrading error: Could not connect to MySQL server: SQL error when doing 'Connection.setAutoCommit(false)': com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 936,932 milliseconds ago.  The last packet sent successfully to the server was 936,935 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem. Caused by: java.net.SocketException: Connection reset
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.maintenance.StartupProcessor.doUpgrade(StartupProcessor.java:1000)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.maintenance.StartupProcessor.access$1400(StartupProcessor.java:1039)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.maintenance.StartupProcessor$3.call(StartupProcessor.java:13)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:91)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.maintenance.StartupProcessor.processConcreteStage(StartupProcessor.java:568)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.maintenance.StartupProcessor.processConcreteStageSafe(StartupProcessor.java:569)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.maintenance.StartupProcessor.processTeamCityLifecycle(StartupProcessor.java:769)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.maintenance.StartupProcessor.access$000(StartupProcessor.java:869)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.maintenance.StartupProcessor$1.run(StartupProcessor.java:3)
Feb 12 11:26:05 teamcity docker[2043]:         at java.lang.Thread.run(Thread.java:748)
Feb 12 11:26:05 teamcity docker[2043]: Caused by: jetbrains.buildServer.serverSide.db.DatabaseIsNotReachableException: Could not connect to MySQL server: SQL error when doing 'Connection.setAutoCommit(false)': com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 936,932 milliseconds ago.  The last packet sent successfully to the server was 936,935 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem. Caused by: java.net.SocketException: Connection reset
Feb 12 11:26:05 teamcity docker[2043]:         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Feb 12 11:26:05 teamcity docker[2043]:         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
Feb 12 11:26:05 teamcity docker[2043]:         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
Feb 12 11:26:05 teamcity docker[2043]:         at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
Feb 12 11:26:05 teamcity docker[2043]:         at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
Feb 12 11:26:05 teamcity docker[2043]:         at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990)
Feb 12 11:26:05 teamcity docker[2043]:         at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3746)
Feb 12 11:26:05 teamcity docker[2043]:         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2509)
Feb 12 11:26:05 teamcity docker[2043]:         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
Feb 12 11:26:05 teamcity docker[2043]:         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2480)
Feb 12 11:26:05 teamcity docker[2043]:         at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4811)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.serverSide.db.DBFunctions.setAutoCommit(DBFunctions.java:1088)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverter(ConvertPerformer.java:108)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverters(ConvertPerformer.java:87)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.serverSide.versioning.VersionManager.upgradeIt(VersionManager.java:381)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.maintenance.StartupProcessor$UpgradePerformer.doUpgrade(StartupProcessor.java:3)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.maintenance.StartupProcessor.lambda$doUpgrade$7(StartupProcessor.java:882)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager$3.run(TeamCityDatabaseManager.java:942)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager$3.run(TeamCityDatabaseManager.java:937)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.withMaintenanceDBF(TeamCityDatabaseManager.java:921)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.withMaintenanceDBF(TeamCityDatabaseManager.java:937)
Feb 12 11:26:05 teamcity docker[2043]:         at jetbrains.buildServer.maintenance.StartupProcessor.doUpgrade(StartupProcessor.java:554)
Feb 12 11:26:05 teamcity docker[2043]:         ... 9 more
Feb 12 11:26:05 teamcity docker[2043]: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 936,932 milliseconds ago.  The last packet sent successfully to the server was 936,935 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
Feb 12 11:26:05 teamcity docker[2043]:         ... 31 more
Feb 12 11:26:05 teamcity docker[2043]: Caused by: java.net.SocketException: Connection reset
Feb 12 11:26:05 teamcity docker[2043]:         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:115)
Feb 12 11:26:05 teamcity docker[2043]:         at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
Feb 12 11:26:05 teamcity docker[2043]:         at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
Feb 12 11:26:05 teamcity docker[2043]:         at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
Feb 12 11:26:05 teamcity docker[2043]:         at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3728)
Feb 12 11:26:05 teamcity docker[2043]:         ... 24 more

Deploy template button deployment fails

I have tried deploying the template a couple of times. It fails with this error:

{ "code": "DeploymentFailed", "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.", "details": [ { "code": "BadRequest", "message": "{\r\n \"error\": {\r\n \"code\": \"RoleAssignmentUpdateNotPermitted\",\r\n \"message\": \"Tenant ID, application ID, principal ID, and scope are not allowed to be updated.\"\r\n }\r\n}" } ] }

Azure template has bad syntax

In commit 9c8b769, it appears the curl command was partially deleted in azuredeploy.json and the cat command was partially deleted in cloud-config.yaml.

This is causing the TeamCity server to fail to start. The resources can deploy successfully but the TeamCity server is not configured correctly and will fail to start.

SSL guidance

Is there any guidance for enabling SSL using this setup? There seems to be much more involved than just opening the firewall rule for HTTPS for the VM.

Override default sql parameters

According to the docs:

Use it like this in your template.. Replace wait_timeout with max_allowed_packet. It should work. Change 123 to your value you want wait_timeout to be. Update the dependsOn to match your servers/servername value.

{
                "name": "wait_timeout",

                  "type": "configurations",

                  "apiVersion": "2017-04-30-preview",

                  "dependsOn": [

                        "[concat('Microsoft.DBforMySQL/servers/', parameters('serverName'))]"

                    ],

                  "properties": {

                    "value": "123",

                    "source": "user-override"

                  }

                }

To get data could be used following method:
https://docs.microsoft.com/en-us/rest/api/mysql/configurations/listbyserver

Unable to install Microsoft Monitoring Agent(MMA) on Team city VM

The security center recommendations mandate installing an MMA on each VM.
image

After enabling the agent is inactive with "Agent not responsive or missing ID"
image
Trying to manully install agent via steps at https://docs.microsoft.com/en-us/azure/azure-monitor/learn/quick-collect-azurevm or https://docs.microsoft.com/en-us/azure/azure-monitor/learn/quick-collect-linux-computer doesn't work since there is no rpm manager in CoreOS

image

How to we add monitoring and security on the teamcity VM?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.