project-mirai / mirai-api-http

Mirai HTTP API (console) plugin
GNU Affero General Public License v3.0
1.66k stars 343 forks source link

kotlin 协程的异常 #667

Closed huangyin1 closed 1 year ago

huangyin1 commented 1 year ago

2023-01-08 22:17:48 E/mirai-api-http: kotlinx.coroutines.JobCancellationException: LazyStandaloneCoroutine is cancelling; job=LazyStandaloneCoroutine{Cancelling}@39c87b42 kotlinx.coroutines.JobCancellationException: LazyStandaloneCoroutine is cancelling; job=LazyStandaloneCoroutine{Cancelling}@39c87b42 Caused by: java.net.BindException: Address already in use: bind at java.base/sun.nio.ch.Net.bind0(Native Method) at java.base/sun.nio.ch.Net.bind(Unknown Source) at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(Unknown Source) at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) at mirai-api-http-v2.7.1.mirai2.jar[private]//io.ktor.network.sockets.ConnectUtilsJvmKt.bind(ConnectUtilsJvm.kt:35) at mirai-api-http-v2.7.1.mirai2.jar[private]//io.ktor.network.sockets.TcpSocketBuilder.bind(TcpSocketBuilder.kt:45) at mirai-api-http-v2.7.1.mirai2.jar[private]//io.ktor.network.sockets.TcpSocketBuilder.bind(TcpSocketBuilder.kt:29) at mirai-api-http-v2.7.1.mirai2.jar[private]//io.ktor.network.sockets.TcpSocketBuilder.bind$default(TcpSocketBuilder.kt:25) at mirai-api-http-v2.7.1.mirai2.jar[private]//io.ktor.server.cio.backend.HttpServerKt$httpServer$acceptJob$1.invokeSuspend(HttpServer.kt:48) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

更换多个版本都存在该问题

ryoii commented 1 year ago

端口被占用了?换个端口

huangyin1 commented 1 year ago

是的,换了端口就可以了,多谢了