Can't install cygnus-ngsi via Docker

2019-07-27 09:08发布

问题:

I am trying to install cygnus-ngsi, following this guide. While installing via Docker, I get the following error:

INFO: Apache domain <http://apache.rediris.es/>
INFO: URL MAVEN <http://apache.rediris.es/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz>
INFO: URL FLUME <http://apache.rediris.es/flume/1.4.0/apache-flume-1.4.0-bin.tar.gz>
INFO: Download and install Maven and Flume...
curl: (7) couldn't connect to host

It seems to be that the mirror http://apache.rediris.es is down. Is there any way to work around this?

回答1:

The mirror seems to be up and running now. For the future, we'll try to work on a solution that tries several mirrors, or the main one (despite the downloading speed could be slower).



回答2:

I worked around the problem by modifying fiware-cygnus/docker/cygnus-ngsi/Dockerfile, replacing the assignment below:

APACHE_DOMAIN="$(curl -s 'https://www.apache.org/dyn/closer.cgi?as_json=1' | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["preferred"]')" \
      || APACHE_DOMAIN="http://archive.apache.org/dist/" && \

with this:

APACHE_DOMAIN="http://archive.apache.org/dist/" && \

This modification ensures that Apache Archive is used for downloading both FLUME and MAVEN binaries and results in a successful build.