Perseo Docker Build上的安装超时

时间:2018-06-19 07:23:38

标签: fiware fiware-perseo

我尝试按照https://github.com/telefonicaid/perseo-core/blob/master/documentation/deployment.md

的指南安装perseo

我想我必须首先安装perseo-core,然后才能安装perseo-fe。当我尝试部署perseo-core时,我遇到了一些错误(可能问题就在我身边)。 当我尝试docker build -t perseo .时,在几次警告之后,它似乎在某个时刻挂起:

http://mirror.uv.es/mirror/CentOS/7.5.1804/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.uv.es/mirror/CentOS/7.5.1804/os/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
ftp://ftp.cesca.cat/centos/7.5.1804/extras/x86_64/repodata/repomd.xml: [Errno 12] Timeout on ftp://ftp.cesca.cat/centos/7.5.1804/extras/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
http://ftp.cica.es/CentOS/7.5.1804/extras/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://ftp.cica.es/CentOS/7.5.1804/extras/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
http://mirror.airenetworks.es/CentOS/7.5.1804/extras/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.airenetworks.es/CentOS/7.5.1804/extras/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
http://centos.uvigo.es/7.5.1804/extras/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://centos.uvigo.es/7.5.1804/extras/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
http://ftp.uma.es/mirror/CentOS/7.5.1804/extras/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://ftp.uma.es/mirror/CentOS/7.5.1804/extras/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')

如果我尝试从rpm安装它,我会收到下一个错误:

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.1yMNCh (%prep)
[centos@digitanimal-fiware-test-2018 rpm]$ ^C
[centos@digitanimal-fiware-test-2018 rpm]$ sudo ./create-rpm.sh 1 0.1
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.iyb82M
+ umask 022
+ cd /home/centos/perseo-core/rpm/BUILD
+ echo '[INFO] Preparing installation'
[INFO] Preparing installation
+ rm -Rf /home/centos/perseo-core/rpm/BUILDROOT/perseo-cep-core-0.1-1.x86_64
+ mkdir -p /home/centos/perseo-core/rpm/BUILDROOT/perseo-cep-core-0.1-1.x86_64
+ '[' -d /home/centos/perseo-core/rpm/BUILDROOT/perseo-cep-core-0.1-1.x86_64/usr/share/tomcat/webapps ']'
+ mkdir -p /home/centos/perseo-core/rpm/BUILDROOT/perseo-cep-core-0.1-1.x86_64/usr/share/tomcat/webapps
+ cp -ax /home/centos/perseo-core/rpm/../target/perseo-core-0.1.war /home/centos/perseo-core/rpm/BUILDROOT/perseo-cep-core-0.1-1.x86_64/usr/share/tomcat/webapps/perseo-core.war
cp: cannot stat '/home/centos/perseo-core/rpm/../target/perseo-core-0.1.war': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.iyb82M (%prep)
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.iyb82M (%prep)

有任何帮助吗?此外,如果有来自perseo的任何其他信息,您可以共享链接吗?我使用来自http://fiware-iot-stack.readthedocs.io/en/latest/cep/index.html和来自github的文档

由于

2 个答案:

答案 0 :(得分:0)

您似乎正在从一条路径中执行docker build,而该路径中您无法查看您在Dockerfile中执行COPY的文件。

例如,如果您的Dockerfile执行:COPY ./perseo-core/rpm/file.txt, you cannot execute docker build from ./perseo-core/other_folder although you do ../`

尝试从更高的目录执行docker build,或者只是发布Dockerfile和您执行docker build

的路径

答案 1 :(得分:0)

我建议您使用任何已提供的docker映像。

首先,Telefónica提供当前的“稳定”图像。有关更多详细信息,请参见此answer

我们正在努力改进Perseo并使其保持最新。该版本在FIWARE组织的Docker Hub上可用。在这方面,Perseo已更新为使用Esper,NodeJS,Java等的最新版本,并且现在支持NGSIv2。如果您要测试此版本,则可以使用以下docker-compose.yml文件:

version: '3.4'
services:

    perseo-core:
        image: fiware/perseo-core
        environment:
            - PERSEO_FE_URL=http://perseo:9090
            - MAX_AGE=6000
        depends_on:
            - mongo

    perseo:
        image: fiware/perseo
        ports:
            - 9090:9090
        depends_on:
            - perseo-core
        environment:
            - PERSEO_MONGO_ENDPOINT=mongo
            - PERSEO_CORE_URL=http://perseo-core:8080
            - PERSEO_LOG_LEVEL=info
            - PERSEO_ORION_URL=http://orion:1026/
            - PERSEO_SMTP_HOST=smtp.gmail.com
            - PERSEO_SMTP_PORT=465
            - PERSEO_SMTP_SECURE=true
            - PERSEO_SMTP_AUTH_USER=XXXXX@XXXXX.com
            - PERSEO_SMTP_AUTH_PASS=XXXXX

    mongo:
        image: mongo:3.4
        volumes:
            - ./oriondata:/data/db
        command: --nojournal

    orion:
        image: fiware/orion
        depends_on:
            - mongo
        ports:
            - 1026:1026
        command: -dbhost mongo