android - Gradle system error "java.net.BindException: Address already in use" after first build -


this typical scenario of "one day woke , realised things used work stopped working unknown reason."

i have jenkins job run gradle command. now, after successful build, following throw exceptions below.

to honour jvm settings build new jvm forked. please consider using daemon: http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html.  failure: build failed exception.  * went wrong: unable start daemon process. problem might caused incorrect configuration of daemon. example, unrecognized jvm option used. please refer user guide chapter on daemon @ http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html please read following process output find out more: ----------------------- 03:38:49.137 [main] debug o.g.l.daemon.bootstrap.daemonmain - assuming daemon started following jvm opts: [-xx:maxpermsize=512m, -xx:+heapdumponoutofmemoryerror, -xmx2048m, -dfile.encoding=utf-8, -duser.country=us, -duser.language=en, -duser.variant] 03:38:49.501 [main] debug o.g.l.daemon.server.daemonservices - creating daemon context opts: [-xx:maxpermsize=512m, -xx:+heapdumponoutofmemoryerror, -xmx2048m, -dfile.encoding=utf-8, -duser.country=us, -duser.language=en, -duser.variant] 03:38:49.563 [info] [org.gradle.launcher.daemon.server.daemon] start() called on daemon - defaultdaemoncontext[uid=57b530d9-9776-4ea2-8432-fa1663ef1e7e,javahome=/usr/lib/jvm/java-7-openjdk-amd64,daemonregistrydir=/vol/jenkins/.gradle/daemon,pid=15417,idletimeout=120000,daemonopts=-xx:maxpermsize=512m,-xx:+heapdumponoutofmemoryerror,-xmx2048m,-dfile.encoding=utf-8,-duser.country=us,-duser.language=en,-duser.variant] 03:38:49.575 [debug] [org.gradle.launcher.daemon.server.daemonstatecoordinator] updating lastactivityat 1431574729575 03:38:49.585 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] adding ip addresses network interface eth0 03:38:49.585 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] loopback interface? false 03:38:49.586 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] multicast interface? true 03:38:49.586 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] adding remote address /fe80:0:0:0:2000:bff:fe2b:82c6%2 03:38:49.587 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] adding remote address /10.147.28.2 03:38:49.588 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] adding remote multicast interface eth0 03:38:49.589 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] adding ip addresses network interface lo 03:38:49.589 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] loopback interface? true 03:38:49.590 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] multicast interface? false 03:38:49.590 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] adding loopback address /0:0:0:0:0:0:0:1%1 03:38:49.591 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] adding loopback address /127.0.0.1 03:38:49.602 [error] [system.err]  03:38:49.603 [error] [system.err] failure: build failed exception. 03:38:49.604 [error] [system.err]  03:38:49.604 [error] [system.err] * went wrong: 03:38:49.605 [error] [system.err] java.net.bindexception: address in use 03:38:49.605 [error] [system.err]  03:38:49.606 [error] [system.err] * try: 03:38:49.606 [error] [system.err] run --stacktrace option stack trace. run --info or --debug option more log output. 03:38:49.610 [debug] [org.gradle.launcher.daemon.registry.persistentdaemonregistry] removing daemon address: null 03:38:49.622 [debug] [org.gradle.cache.internal.defaultfilelockmanager] waiting acquire exclusive lock on daemon addresses registry. 03:38:49.626 [debug] [org.gradle.cache.internal.defaultfilelockmanager] lock acquired. 03:38:49.644 [debug] [org.gradle.cache.internal.defaultfilelockmanager] releasing lock on daemon addresses registry.   * try: run --info or --debug option more log output.  * exception is: org.gradle.api.gradleexception: unable start daemon process. problem might caused incorrect configuration of daemon. example, unrecognized jvm option used. please refer user guide chapter on daemon @ http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html please read following process output find out more: ----------------------- 03:38:49.137 [main] debug o.g.l.daemon.bootstrap.daemonmain - assuming daemon started following jvm opts: [-xx:maxpermsize=512m, -xx:+heapdumponoutofmemoryerror, -xmx2048m, -dfile.encoding=utf-8, -duser.country=us, -duser.language=en, -duser.variant] 03:38:49.501 [main] debug o.g.l.daemon.server.daemonservices - creating daemon context opts: [-xx:maxpermsize=512m, -xx:+heapdumponoutofmemoryerror, -xmx2048m, -dfile.encoding=utf-8, -duser.country=us, -duser.language=en, -duser.variant] 03:38:49.563 [info] [org.gradle.launcher.daemon.server.daemon] start() called on daemon - defaultdaemoncontext[uid=57b530d9-9776-4ea2-8432-fa1663ef1e7e,javahome=/usr/lib/jvm/java-7-openjdk-amd64,daemonregistrydir=/vol/jenkins/.gradle/daemon,pid=15417,idletimeout=120000,daemonopts=-xx:maxpermsize=512m,-xx:+heapdumponoutofmemoryerror,-xmx2048m,-dfile.encoding=utf-8,-duser.country=us,-duser.language=en,-duser.variant] 03:38:49.575 [debug] [org.gradle.launcher.daemon.server.daemonstatecoordinator] updating lastactivityat 1431574729575 03:38:49.585 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] adding ip addresses network interface eth0 03:38:49.585 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] loopback interface? false 03:38:49.586 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] multicast interface? true 03:38:49.586 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] adding remote address /fe80:0:0:0:2000:bff:fe2b:82c6%2 03:38:49.587 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] adding remote address /10.147.28.2 03:38:49.588 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] adding remote multicast interface eth0 03:38:49.589 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] adding ip addresses network interface lo 03:38:49.589 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] loopback interface? true 03:38:49.590 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] multicast interface? false 03:38:49.590 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] adding loopback address /0:0:0:0:0:0:0:1%1 03:38:49.591 [debug] [org.gradle.messaging.remote.internal.inet.inetaddressfactory] adding loopback address /127.0.0.1 03:38:49.602 [error] [system.err]  03:38:49.603 [error] [system.err] failure: build failed exception. 03:38:49.604 [error] [system.err]  03:38:49.604 [error] [system.err] * went wrong: 03:38:49.605 [error] [system.err] java.net.bindexception: address in use 03:38:49.605 [error] [system.err]  03:38:49.606 [error] [system.err] * try: 03:38:49.606 [error] [system.err] run --stacktrace option stack trace. run --info or --debug option more log output. 03:38:49.610 [debug] [org.gradle.launcher.daemon.registry.persistentdaemonregistry] removing daemon address: null 03:38:49.622 [debug] [org.gradle.cache.internal.defaultfilelockmanager] waiting acquire exclusive lock on daemon addresses registry. 03:38:49.626 [debug] [org.gradle.cache.internal.defaultfilelockmanager] lock acquired. 03:38:49.644 [debug] [org.gradle.cache.internal.defaultfilelockmanager] releasing lock on daemon addresses registry.      @ org.gradle.launcher.daemon.bootstrap.daemongreeter.parsedaemonoutput(daemongreeter.java:35)     @ org.gradle.launcher.daemon.client.defaultdaemonstarter.startprocess(defaultdaemonstarter.java:112)     @ org.gradle.launcher.daemon.client.defaultdaemonstarter.startdaemon(defaultdaemonstarter.java:93)     @ org.gradle.launcher.daemon.client.defaultdaemonconnector.startdaemon(defaultdaemonconnector.java:105)     @ org.gradle.launcher.daemon.client.singleusedaemonclient.execute(singleusedaemonclient.java:52)     @ org.gradle.launcher.daemon.client.singleusedaemonclient.execute(singleusedaemonclient.java:36)     @ org.gradle.launcher.cli.runbuildaction.run(runbuildaction.java:51)     @ org.gradle.internal.actions$runnableactionadapter.execute(actions.java:171)     @ org.gradle.launcher.cli.commandlineactionfactory$parseandbuildaction.execute(commandlineactionfactory.java:237)     @ org.gradle.launcher.cli.commandlineactionfactory$parseandbuildaction.execute(commandlineactionfactory.java:210)     @ org.gradle.launcher.cli.javaruntimevalidationaction.execute(javaruntimevalidationaction.java:35)     @ org.gradle.launcher.cli.javaruntimevalidationaction.execute(javaruntimevalidationaction.java:24)     @ org.gradle.launcher.cli.commandlineactionfactory$withlogging.execute(commandlineactionfactory.java:206)     @ org.gradle.launcher.cli.commandlineactionfactory$withlogging.execute(commandlineactionfactory.java:169)     @ org.gradle.launcher.cli.exceptionreportingaction.execute(exceptionreportingaction.java:33)     @ org.gradle.launcher.cli.exceptionreportingaction.execute(exceptionreportingaction.java:22)     @ org.gradle.launcher.main.doaction(main.java:33)     @ org.gradle.launcher.bootstrap.entrypoint.run(entrypoint.java:45)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)     @ java.lang.reflect.method.invoke(method.java:606)     @ org.gradle.launcher.bootstrap.processbootstrap.runnoexit(processbootstrap.java:54)     @ org.gradle.launcher.bootstrap.processbootstrap.run(processbootstrap.java:35)     @ org.gradle.launcher.gradlemain.main(gradlemain.java:23)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)     @ java.lang.reflect.method.invoke(method.java:606)     @ org.gradle.wrapper.bootstrapmainstarter.start(bootstrapmainstarter.java:33)     @ org.gradle.wrapper.wrapperexecutor.execute(wrapperexecutor.java:130)     @ org.gradle.wrapper.gradlewrappermain.main(gradlewrappermain.java:48) 

from decription , stack trace have given, gradle trying start daemon within job configuration , not shutting down @ end. means next time try , run job, can't start daemon because daemon running (and failing build)

consider taking daemon out of job configuration , running separate process (see https://gradle.org/docs/current/userguide/gradle_daemon.html)

alternatively, either add conditional check start daemon if isn't running or shut down daemon @ end of build (not recommended)


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -