New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[craftercms] MySQL fails to stop consistently in windows #1630

Closed
russdanner opened this Issue Nov 20, 2017 · 3 comments

Comments

@russdanner
Member

russdanner commented Nov 20, 2017

Expected behavior

Gradlew stop and batch files used to stop studio should always stop MySQL

Actual behavior

Mysql should always stop when stopping studio.
When Mysql does not stop, subsequent start-up activities fail because MySQL is already running.
Restart should work consistently.

Steps to reproduce the problem

  • start studio on windows
  • stop it
  • note mysql does not always die

(applies to both Gradle and Batch Files)

Log/stack trace (use https://gist.github.com)

NA

Specs: version, OS, browser, etc.

Windows

@sumerjabri sumerjabri added this to Backlog in Crafter CMS v3.0.x via automation Nov 21, 2017

@sumerjabri sumerjabri added this to the Crafter CMS v3.0.2 milestone Nov 21, 2017

@cortiz

This comment has been minimized.

Show comment
Hide comment
@cortiz

cortiz Nov 22, 2017

Member

Quick update,
Scripts do shutdown MariaDB every time, issue does happen when the tomcat window is close,
this applies to Linux if the tomcat process is kill -9

Closing tomcat window is basically a kill -9

Member

cortiz commented Nov 22, 2017

Quick update,
Scripts do shutdown MariaDB every time, issue does happen when the tomcat window is close,
this applies to Linux if the tomcat process is kill -9

Closing tomcat window is basically a kill -9

@sumerjabri

This comment has been minimized.

Show comment
Hide comment
@sumerjabri

sumerjabri Nov 22, 2017

Member

@cortiz I think I know what's happening:

  • Tomcat doesn't shut down correctly on Windows or takes too long
  • crafter.bat shuts down Tomcat before it had a chance to shut down MariaDB

@cortiz let's do two things:

  1. Validate that Tomcat doesn't shut down and fix that if possible
  2. Check for MariaDB port during startup and refuse to start if the port is in use and show the message:
Crafter CMS Database Port: {port} is in use by process {process_id}. This might be because of a prior unsuccessful or incomplete shut down. Please terminate that process before attempting to start Crafter CMS.

If we can't fix point 1, we can discuss alternatives.

Member

sumerjabri commented Nov 22, 2017

@cortiz I think I know what's happening:

  • Tomcat doesn't shut down correctly on Windows or takes too long
  • crafter.bat shuts down Tomcat before it had a chance to shut down MariaDB

@cortiz let's do two things:

  1. Validate that Tomcat doesn't shut down and fix that if possible
  2. Check for MariaDB port during startup and refuse to start if the port is in use and show the message:
Crafter CMS Database Port: {port} is in use by process {process_id}. This might be because of a prior unsuccessful or incomplete shut down. Please terminate that process before attempting to start Crafter CMS.

If we can't fix point 1, we can discuss alternatives.

@cortiz

This comment has been minimized.

Show comment
Hide comment
@cortiz

cortiz Nov 23, 2017

Member

@sumerjabri on #1640 ,

Now we wait about 5 sec after tomcat shutdown is down and check that MariaDB isn't down will gracefully shut it down (or killed if been nice does not work)

Added the startup message

Member

cortiz commented Nov 23, 2017

@sumerjabri on #1640 ,

Now we wait about 5 sec after tomcat shutdown is down and check that MariaDB isn't down will gracefully shut it down (or killed if been nice does not work)

Added the startup message

@cortiz cortiz assigned russdanner and unassigned cortiz Nov 23, 2017

@cortiz cortiz moved this from Backlog to Test & Validate in Crafter CMS v3.0.x Nov 23, 2017

@sumerjabri sumerjabri closed this Jan 17, 2018

Crafter CMS v3.0.x automation moved this from Test & Validate to Completed Jan 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment