Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Cannot build embeddedmysql on Jenkins while local could work #129

Open
Terryyangty opened this issue Feb 7, 2018 · 4 comments
Open

Cannot build embeddedmysql on Jenkins while local could work #129

Terryyangty opened this issue Feb 7, 2018 · 4 comments

Comments

@Terryyangty
Copy link

Terryyangty commented Feb 7, 2018

I could build the EmbeddedMySql on my local machine.
My version is v5_6_latest.
But when I submit to Jenkins the build failed with following errors:

'
writeToMySQLDB(com.hulu.cia.spark.vortexrecovery.Utils.UpdateRecoveryStateTest) Time elapsed: 20.244 sec <<< ERROR!

java.lang.RuntimeException: Command exited with error code: '141' and output: 'Use of uninitialized value in chown at scripts/mysql_install_db line 705.

Use of uninitialized value in chown at scripts/mysql_install_db line 705.

Installing MySQL system tables...Use of uninitialized value in chown at scripts/mysql_install_db line 705.

Use of uninitialized value in chown at scripts/mysql_install_db line 705.

Use of uninitialized value in chown at scripts/mysql_install_db line 705.

Use of uninitialized value in chown at scripts/mysql_install_db line 705.

2018-02-06 18:45:06 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2018-02-06 18:45:06 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.

2018-02-06 18:45:06 0 [Note] /var/jenkins/workspace/CIA_vortex-recovery_CI-QVWGF2RJD5NLT3X3JECKKEPWDSEFKIR33IVXWENJMOZOM7ZNF4JA/target/mysql-5.6-aed009f2-9fa2-4a59-8c85-f6ac6fe164a3/bin/mysqld (mysqld 5.6.36) starting as process 9919 ...

2018-02-06 18:45:06 9919 [ERROR] Fatal error: Can't change to run as user 'mysql' ; Please check that the user exists!

2018-02-06 18:45:06 9919 [ERROR] Aborting

2018-02-06 18:45:06 9919 [Note] Binlog end

2018-02-06 18:45:07 9919 [Note] /var/jenkins/workspace/CIA_vortex-recovery_CI-QVWGF2RJD5NLT3X3JECKKEPWDSEFKIR33IVXWENJMOZOM7ZNF4JA/target/mysql-5.6-aed009f2-9fa2-4a59-8c85-f6ac6fe164a3/bin/mysqld: Shutdown complete

at com.wix.mysql.distribution.setup.ProcessRunner.resolveException(ProcessRunner.java:53)

at com.wix.mysql.distribution.setup.ProcessRunner.run(ProcessRunner.java:38)

at com.wix.mysql.distribution.setup.NixBefore57Initializer.apply(NixBefore57Initializer.java:33)

at com.wix.mysql.distribution.Setup.apply(Setup.java:26)

at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:42)

at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:21)

at de.flapdoodle.embed.process.runtime.Executable.start(Executable.java:101)

at com.wix.mysql.EmbeddedMysql.<init>(EmbeddedMysql.java:46)

at com.wix.mysql.EmbeddedMysql$Builder.start(EmbeddedMysql.java:160)

at com.hulu.cia.spark.vortexrecovery.Utils.UpdateRecoveryStateTest.writeToMySQLDB(UpdateRecoveryStateTest.java:44)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)

at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)

at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)

at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)

at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)

at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)

at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)

at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)

at org.junit.runners.ParentRunner.run(ParentRunner.java:363)

at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)

at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)

at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)

at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)

at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)

at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)

at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

'

I'm not sure what could be the issue but I'm guessing it should be part Can't change to run as user 'mysql'. Any one have an idea?

@viliusl
Copy link
Collaborator

viliusl commented Feb 7, 2018

@Terryyangty - do you have mysql user on jenkins machine or prior/running mysql installation?

@Terryyangty
Copy link
Author

Terryyangty commented Feb 7, 2018 via email

@viliusl
Copy link
Collaborator

viliusl commented Feb 7, 2018

No, mysql being installed on target machine ususally just causes issues - users present, some config files lying around. and mysql is trying to help you so detects stuff from outside of its cwd and then we have issues like this.

I'm not really sure about your immediate issue, but could you check if mysql user is present on jenkins machine? I saw on the internets that it can cause issues and maybe mysql install script just autodetects it and tries to run under mysql user, but current user is not mysql.

If you could check it I will see if I can disable this behavior.

@colmulhall
Copy link

colmulhall commented Jul 17, 2018

Hi guys, sorry to jump in late. I'm seeing the same issue when attempting to run tests on Jenkins with the embedded database. There is no issue running the unit tests locally, and no MySQL installation on Jenkins as far as I am aware.

Log below:

java.lang.RuntimeException: Command exited with error code: '127' and output: '/var/jenkins_home/workspace/APPLICATION_application_development-OFXD2XPATVWEH5F4ETVO7E54N67YKPR2N2ODLQNRZ7Q4G3TJWUBA/Core/target/mysql-5.7-13e4c46b-d668-4d5a-b99a-8206750949ed/bin/mysqld: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory

	at com.wix.mysql.distribution.setup.ProcessRunner.resolveException(ProcessRunner.java:53)
	at com.wix.mysql.distribution.setup.ProcessRunner.run(ProcessRunner.java:38)
	at com.wix.mysql.distribution.setup.Mysql57Initializer.apply(Mysql57Initializer.java:35)
	at com.wix.mysql.distribution.Setup.apply(Setup.java:26)
	at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:42)
	at com.wix.mysql.MysqldExecutable.start(MysqldExecutable.java:21)
	at de.flapdoodle.embed.process.runtime.Executable.start(Executable.java:101)
	at com.wix.mysql.EmbeddedMysql.<init>(EmbeddedMysql.java:47)
	at com.wix.mysql.EmbeddedMysql$Builder.start(EmbeddedMysql.java:169)
	at com.analog.beehive.database.EmbeddedDatabase.<init>(EmbeddedDatabase.java:28)
	at com.analog.beehive.database.EmbeddedDatabase.getInstance(EmbeddedDatabase.java:45)
	at com.analog.beehive.database.hibernate.HibernateEntityTest.setUp(HibernateEntityTest.java:26)
	at com.proj.application.database.manager.ApplicationTest.setUp(ApplicationTest.java:37)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants