【问题标题】:fabric8:docker-maven-plugin cannot load the ffi provider when running on Centos7 in Jenkinsfabric8:docker-maven-plugin 在 Jenkins 的 Centos7 上运行时无法加载 ffi 提供程序
【发布时间】:2020-04-02 22:09:37
【问题描述】:

将fabric8添加到hello world pom后,在CentOS7上的Jenkins中运行maven“全新安装”时,

            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.31.0</version>
                <configuration>
                    <filter>${*}</filter>
                    <images>
                        <image>
                            <name>docker.io/myname/${project.artifactId}:${project.version}</name>
                        </image>
                    </images>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin> 

我收到以下错误

[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.31.0:build (default) on project reference-service: Execution default of goal io.fabric8:docker-maven-plugin:0.31.0:build failed: An API incompatibility was encountered while executing io.fabric8:docker-maven-plugin:0.31.0:build: java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>io.fabric8:docker-maven-plugin:0.31.0

...

[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------: could not get native definition for type: POINTER: java.lang.UnsatisfiedLinkError: /tmp/jffi5159674609596634370.so: /tmp/jffi5159674609596634370.so: failed to map segment from shared object: Operation not permitted

我找不到任何 CentOS7 的 .so 文件的安装说明或其他说明。

GitHub site 没有提供太多指导;

Docker 正在监听 2375 和 docker.sock。我正在构建的用户在 dockerroot 中。

保险丝同样的问题

[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.23.0.fuse-730010-redhat-00001:build (default) on project reference-service: Execution default of goal io.fabric8:docker-maven-plugin:0.23.0.fuse-730010-redhat-00001:build failed: An API incompatibility was encountered while executing io.fabric8:docker-maven-plugin:0.23.0.fuse-730010-redhat-00001:build: java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider
[ERROR] realm =    plugin>io.fabric8:docker-maven-plugin:0.23.0.fuse-730010-redhat-00001

【问题讨论】:

    标签: maven-3 centos7 fabric8 docker-maven-plugin


    【解决方案1】:

    在这种情况下,FFI 错误意味着插件无法与 docker 守护进程通信。在全局 jenkins 配置中将 DOCKER_HOST 设置为 tcp://127.0.0.1:2375 解决了我的问题。

    【讨论】:

      猜你喜欢
      • 2019-08-28
      • 1970-01-01
      • 2017-11-17
      • 1970-01-01
      • 1970-01-01
      • 2020-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多