java.net.SocketException: Bad address: Cannot bind


(Shayne) #1

I install the gradle;execute gradle -v successful!But when I just use “gradle --dubug” to test ,it throws SocketExcetion,detail info below:
11:02:38.225 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Adding loopback multicast interface Microsoft Virtual WiFi Miniport Adapter #9-WFP LightWeight Filter-0000
11:02:38.228 [DEBUG] [org.gradle.internal.remote.internal.inet.TcpIncomingConnector] Listening on [5b86f4c2-6156-4424-91d9-b394ba8c35f8 port:54902, addresses:[/127.0.0.1]].
11:02:38.233 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] Daemon starting at: Sun Dec 17 11:02:38 CST 2017, with address: [5b86f4c2-6156-4424-91d9-b394ba8c35f8 port:54902, addresses:[/127.0.0.1]]
11:02:38.233 [INFO] [org.gradle.launcher.daemon.server.DaemonRegistryUpdater] Advertising the daemon address to the clients: [5b86f4c2-6156-4424-91d9-b394ba8c35f8 port:54902, addresses:[/127.0.0.1]]
11:02:38.234 [DEBUG] [org.gradle.launcher.daemon.server.DaemonRegistryUpdater] Advertised daemon context: DefaultDaemonContext[uid=e490f0f2-f3d7-4f34-8496-ff48b96f895a,javaHome=D:\MyEclipse Professional 2014\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45,daemonRegistryDir=C:\Users\Administrator.gradle\daemon,pid=8444,idleTimeout=60000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=GBK,-Duser.country=CN,-Duser.language=zh,-Duser.variant]
11:02:38.236 [DEBUG] [org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Storing daemon address: [5b86f4c2-6156-4424-91d9-b394ba8c35f8 port:54902, addresses:[/127.0.0.1]], context: DefaultDaemonContext[uid=e490f0f2-f3d7-4f34-8496-ff48b96f895a,javaHome=D:\MyEclipse Professional 2014\binary\com.sun.java.jdk7.win32.x86_64_1.7.0.u45,daemonRegistryDir=C:\Users\Administrator.gradle\daemon,pid=8444,idleTimeout=60000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=GBK,-Duser.country=CN,-Duser.language=zh,-Duser.variant]
11:02:38.262 [ERROR] [system.err]
11:02:38.263 [ERROR] [system.err] FAILURE: Build failed with an exception.
11:02:38.264 [ERROR] [system.err]
11:02:38.264 [ERROR] [system.err] * What went wrong:
11:02:38.265 [ERROR] [system.err] java.net.SocketException: Bad address: Cannot bind
11:02:38.265 [ERROR] [system.err]
11:02:38.266 [ERROR] [system.err] * Try:
11:02:38.266 [ERROR] [system.err] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Daemon vm is shutting down… The daemon has exited normally or was terminated in response to a user interrupt.
11:02:38.271 [DEBUG] [org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Removing daemon address: [5b86f4c2-6156-4424-91d9-b394ba8c35f8 port:54902, addresses:[/127.0.0.1]]
11:02:38.272 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] VM shutdown hook was unable to remove the daemon address from the registry. It will be cleaned up later.
org.gradle.api.UncheckedIOException: java.net.SocketException: Bad address: Cannot bind
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:43)
at org.gradle.cache.internal.FileLockCommunicator.(FileLockCommunicator.java:40)
at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler.getCommunicator(DefaultFileLockContentionHandler.java:153)
at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler.reservePort(DefaultFileLockContentionHandler.java:145)
at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:85)
at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:73)
at org.gradle.cache.internal.OnDemandFileAccess.updateFile(OnDemandFileAccess.java:45)
at org.gradle.cache.internal.SimpleStateCache.update(SimpleStateCache.java:63)
at org.gradle.cache.internal.FileIntegrityViolationSuppressingPersistentStateCacheDecorator.update(FileIntegrityViolationSuppressingPersistentStateCacheDecorator.java:43)
at org.gradle.launcher.daemon.registry.PersistentDaemonRegistry.remove(PersistentDaemonRegistry.java:127)
at org.gradle.launcher.daemon.server.Daemon$1.run(Daemon.java:128)
at org.gradle.process.internal.shutdown.ShutdownHookActionRegister$GradleShutdownHook.run(ShutdownHookActionRegister.java:41)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.net.SocketException: Bad address: Cannot bind
at java.net.DualStackPlainDatagramSocketImpl.socketBind(Native Method)
at java.net.DualStackPlainDatagramSocketImpl.bind0(DualStackPlainDatagramSocketImpl.java:81)
at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:95)
at java.net.DatagramSocket.bind(DatagramSocket.java:376)
at java.net.DatagramSocket.(DatagramSocket.java:231)
at java.net.DatagramSocket.(DatagramSocket.java:284)
at org.gradle.cache.internal.FileLockCommunicator.(FileLockCommunicator.java:38)
… 11 more


(史亚洲) #2

yes,me too,help&thanks