xuxueli / xxl-job

A distributed task scheduling framework.(分布式任务调度平台XXL-JOB)
http://www.xuxueli.com/xxl-job/
GNU General Public License v3.0
27.46k stars 10.86k forks source link

XXL 是否有跨域问题 #2748

Open kmswilliam opened 2 years ago

kmswilliam commented 2 years ago

我的 xxl-job admin 和 xxl 执行器部署在了不同网段上的服务器中, 在任务触发时 xxl 执行器会报以下错误, 但是如果将 xxl 执行器和 xxl-job admin 部署在同一网段则不会报这个错误, 这是什么问题 ` 17:49:43.185 logback [nioEventLoopGroup-5-5] ERROR c.x.j.c.s.EmbedServer$EmbedHttpServerHandler:238 - >>>>>>>>>>> xxl-job provider netty_http server caught exception java.io.IOException: 远程主机强迫关闭了一个现有的连接。 at sun.nio.ch.SocketDispatcher.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) at sun.nio.ch.IOUtil.read(IOUtil.java:192) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253) at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748)

`

zhaoxinhu commented 2 years ago

你的执行器配置的端口是否给xxl-admin开放访问了呢?如果没有开放的话,网络是不通的,不通的话是访问不到的;如果你部署到同一网段,可能是不需要授权的哦

anycrane commented 2 years ago

这不是跨域问题,是网络连通性问题。