org.apache.flink.runtime.rpc.exceptions.RpcLoaderException:无法加载RpcSystem

64jmpszr  于 2023-08-01  发布在  Apache
关注(0)|答案(1)|浏览(793)

我试图用apach flink v运行这个例子Sentence Encoder。1.17.0
但是当我启动应用程序时,我得到了错误

Exception in thread "main" org.apache.flink.runtime.rpc.exceptions.RpcLoaderException: Could not load RpcSystem.
    at org.apache.flink.runtime.rpc.RpcSystem.load(RpcSystem.java:106)
    at org.apache.flink.runtime.minicluster.MiniCluster.lambda$new$0(MiniCluster.java:253)
    at org.apache.flink.runtime.minicluster.MiniCluster.start(MiniCluster.java:339)
    at org.apache.flink.client.program.PerJobMiniClusterFactory.submitJob(PerJobMiniClusterFactory.java:77)

字符串
不明白为什么它会导致,即使简单的文本服务器由ncat启动(在WIN上)。
pom.xml是

<dependencies>
        <dependency>
            <groupId>ai.djl</groupId>
            <artifactId>api</artifactId>
            <version>0.23.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-streaming-java</artifactId>
            <version>1.17.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-core</artifactId>
            <version>1.17.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-java</artifactId>
            <version>1.17.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-runtime</artifactId>
            <version>1.17.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-shaded-asm-9</artifactId>
            <version>9.5-17.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-metrics-core</artifactId>
            <version>1.17.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-shaded-guava</artifactId>
            <version>30.1.1-jre-16.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-clients</artifactId>
            <version>1.17.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-rpc-core</artifactId>
            <version>1.17.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-optimizer</artifactId>
            <version>1.17.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-shaded-netty</artifactId>
            <version>4.1.91.Final-17.0</version>
        </dependency>
        <dependency>
            <groupId>com.esotericsoftware</groupId>
            <artifactId>kryo</artifactId>
            <version>5.5.0</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>2.0.7</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.12.0</version>
        </dependency>
    </dependencies>


它看起来像一些新的例外,因为我没有找到任何主题像这一个。
在调试模式下,当尝试继续执行**Iterator iterator = ServiceLoader.load(RpcSystemLoader.class).iterator();**在RpcSystem类

vc9ivgsu

vc9ivgsu1#

你在这里有依赖关系,这没有太大意义(像flink-shaded-asm-9flink-shaded-guavaflink-rpc-core等)。在https://nightlies.apache.org/flink/flink-docs-release-1.17/docs/dev/configuration/overview/上解释了你需要在那里有什么。
为了运行DataStream API应用程序,我只期望:

<!-- These dependencies are provided, because they should not be packaged into the JAR file. -->
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-streaming-java</artifactId>
            <version>${flink.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-clients</artifactId>
            <version>${flink.version}</version>
            <scope>provided</scope>
        </dependency>

字符串
如果使用快速入门示例,这些也是依赖项。

相关问题