1
0
-1

install with proxy..

so again I have some problem with the installation behind company proxy..

right now I have the following error in policy vm:


Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3/maven-install-plugin-2.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.3: Plugin org.apache.maven.plugins:maven-install-plugin:2.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.3
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-site-plugin/3.0/maven-site-plugin-3.0.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.0: Plugin org.apache.maven.plugins:maven-site-plugin:3.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.0
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.1: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.1
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.0/maven-release-plugin-2.0.pom

pushPolicy : PUT : com.BRMSParamvFWDemoPolicy

* Hostname was NOT found in DNS cache

*   Trying <compynyproxy>...

* Connected to <compynyproxy> (<compynyproxy>) port 8080 (#0)


docker ps result:


dd3f64298b67        onap/policy/policy-pe       "bash ./do-start.s..."   18 minutes ago      Up 18 minutes                                                        brmsgw

ef5b74c9a297        onap/policy/policy-pe       "bash ./do-start.s..."   18 minutes ago      Up 18 minutes       0.0.0.0:8081->8081/tcp                           pdp

37b751993a0f        onap/policy/policy-drools   "/bin/sh -c ./do-s..."   18 minutes ago      Up 29 seconds       0.0.0.0:6969->6969/tcp, 0.0.0.0:9696->9696/tcp   drools

3d8f9a2b5873        onap/policy/policy-pe       "bash ./do-start.s..."   18 minutes ago      Up 18 minutes       0.0.0.0:8443->8443/tcp, 0.0.0.0:9091->9091/tcp   pap

a5b3528551d7        onap/policy/policy-db       "/bin/sh -c 'exec ..."   18 minutes ago      Up 18 minutes       0.0.0.0:3306->3306/tcp                           mariadb

8f4ecaa2814b        onap/policy/policy-nexus    "/bin/sh -c 'bash ..."   18 minutes ago      Up 18 minutes 


I entered the docker : onap/policy/policy-drools

and tried to download the mentioned pom file " http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom" and with wget I could download it without any changes..


Maybe the no_proxy variable is neeeded? with all the internal (all onap ips.. and with the docker ip-s)


    CommentAdd your comment...

    3 answers

    1.  
      1
      0
      -1

      Hi Attila Jány

      You need to login to drools docker container or find the corresponding following filesfor the drools container in host using locate or find commands

      docker exec -ti drools bash

      open wait-for-port.sh and and change like following

      #!/bin/bash

      if [[ $# -ne 2 ]]; then
      echo "Usage: wait-for-port hostname port" >&2
      exit 1
      fi

      host=$1
      port=$2

      export http_proxy=<proxy>
      export https_proxy=<proxy>

      echo "Waiting for $host port $port open"
      until telnet $host $port </dev/null 2>/dev/null | grep -q '^Connected'; do
      sleep 1
      done

      echo "$host port $port is open"

      exit 0


      Also 

      /etc/maven/settings.xml and set proxy settings

      <proxies> <proxy> <id>http-proxy</id> <active>true</active> <protocol>http</protocol> <host>HOST</host> <port>PORT</port> <nonProxyHosts>localhost|127.0.0.1</nonProxyHosts> </proxy> <proxy> <id>https-proxy</id> <active>true</active> <protocol>https</protocol> <host>HOST</host> <port>PORT</port> <nonProxyHosts>localhost|127.0.0.1</nonProxyHosts> </proxy> </proxies>


      Hint: you may not be able to edit the settings.xml file through container login because it only allow user to login as policy user and I do not know the root password for it. So, do like following

      updatedb

      locate settings.xml

      You should find something similar to following. Technically we need to find the settings.xml of drools image

      /var/lib/docker/aufs/diff/aa225064a7b6595bfe6dc95d6ca614a62d5a7ce47b7314a6e00d94c835793514/home/policy/.m2/settings.xml
      /var/lib/docker/aufs/diff/c5b73a6dbe33ed65da99ef58d4f5a466cd514d1bed5d4e4e8b44c70a939173dc/home/policy/.m2/settings.xml
      /var/lib/docker/aufs/mnt/28565ef9a154e56f0a40eeb9046912c7cf084e3bc73e77e5dec53da8a960762e/etc/maven/settings.xml

      Then 

      docker rm -f drools

      from /opt/policy directory

       /opt/docker/docker-compose up -d or simply run the policy_vm_init.sh 

      Note: If you run policy_vm_init.sh then it's going to fetch the new docker images (if applicable) then you need to follow the procedure again to change.

      1. kranthi guttikonda

        logs


        root@onap-policy:~# docker logs -f drools
        Waiting for nexus port 8081 open
        nexus port 8081 is open
        Starting installation at Thu Sep 7 13:42:26 UTC 2017

        POLICY_HOME is /opt/app/policy
        JAVA_HOME is /usr/lib/jvm/java-8-openjdk-amd64
        WARNING: PDPD_CONFIGURATION_API_KEY= missing name or value
        WARNING: PDPD_CONFIGURATION_API_SECRET= missing name or value
        WARNING: PDPD_CONFIGURATION_CONSUMER_GROUP= missing name or value
        WARNING: PDPD_CONFIGURATION_CONSUMER_INSTANCE= missing name or value
        WARNING: PDPD_CONFIGURATION_PARTITION_KEY= missing name or value
        OK: java 1.8.0_141 installed
        Starting install of base under policy:policy ownership with umask 0022.
        Moving m2 directory to /home/policy/.m2
        FQDN not set in config...using the default FQDN drools
        WARNING: PDPD_CONFIGURATION_API_KEY= missing name or value
        WARNING: PDPD_CONFIGURATION_API_SECRET= missing name or value
        WARNING: PDPD_CONFIGURATION_CONSUMER_GROUP= missing name or value
        WARNING: PDPD_CONFIGURATION_CONSUMER_INSTANCE= missing name or value
        WARNING: PDPD_CONFIGURATION_PARTITION_KEY= missing name or value
        OK: java 1.8.0_141 installed
        Starting install of policy-management under policy:policy ownership with umask 0022.
        WARNING: Rules jar file not-used-*.jar not found in installer package, must be installed manually
        Unpacking controller zip file
        WARNING: PDPD_CONFIGURATION_API_KEY= missing name or value
        WARNING: PDPD_CONFIGURATION_API_SECRET= missing name or value
        WARNING: PDPD_CONFIGURATION_CONSUMER_GROUP= missing name or value
        WARNING: PDPD_CONFIGURATION_CONSUMER_INSTANCE= missing name or value
        WARNING: PDPD_CONFIGURATION_PARTITION_KEY= missing name or value
        Performing variable replacement in config files
        OK: adding an entry for policy-management-controller in /opt/app/policy/etc/monitor/monitor.cfg
        FEATURES_HOME is /opt/app/policy/features
        feature eelf has been installed (no configuration present)
        feature healthcheck has been installed (configuration present)
        feature session-persistence has been installed (no configuration present)
        applying base configuration to features
        WARNING: PDPD_CONFIGURATION_API_KEY= missing name or value
        WARNING: PDPD_CONFIGURATION_API_SECRET= missing name or value
        WARNING: PDPD_CONFIGURATION_CONSUMER_GROUP= missing name or value
        WARNING: PDPD_CONFIGURATION_CONSUMER_INSTANCE= missing name or value
        WARNING: PDPD_CONFIGURATION_PARTITION_KEY= missing name or value
        artifacts/aai-1.1.0.jar: Deploying JAR artifact to remote repository
        [INFO] Scanning for projects...
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom (4 KB at 2.3 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/22/maven-plugins-22.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/22/maven-plugins-22.pom (13 KB at 36.0 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/21/maven-parent-21.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/21/maven-parent-21.pom (26 KB at 87.6 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/apache/10/apache-10.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/apache/10/apache-10.pom (15 KB at 43.8 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar (25 KB at 61.7 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3/maven-install-plugin-2.3.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3/maven-install-plugin-2.3.pom (5 KB at 17.3 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/13/maven-plugins-13.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/13/maven-plugins-13.pom (12 KB at 41.0 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/11/maven-parent-11.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/11/maven-parent-11.pom (32 KB at 97.1 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/apache/5/apache-5.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/apache/5/apache-5.pom (5 KB at 14.7 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3/maven-install-plugin-2.3.jar
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3/maven-install-plugin-2.3.jar (23 KB at 78.4 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom (6 KB at 26.5 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.jar
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.jar (27 KB at 104.0 KB/sec)
        [INFO]
        [INFO] ------------------------------------------------------------------------
        [INFO] Building Maven Stub Project (No POM) 1
        [INFO] ------------------------------------------------------------------------
        [INFO]
        [INFO] --- maven-deploy-plugin:2.7:deploy-file (default-cli) @ standalone-pom ---
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.pom (2 KB at 5.0 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven/2.0.6/maven-2.0.6.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven/2.0.6/maven-2.0.6.pom (9 KB at 36.4 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/5/maven-parent-5.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/5/maven-parent-5.pom (15 KB at 51.0 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/apache/3/apache-3.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/apache/3/apache-3.pom (4 KB at 12.3 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-project/2.0.6/maven-project-2.0.6.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-project/2.0.6/maven-project-2.0.6.pom (3 KB at 12.1 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-settings/2.0.6/maven-settings-2.0.6.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-settings/2.0.6/maven-settings-2.0.6.pom (2 KB at 7.4 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6.pom (3 KB at 11.3 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.4.1/plexus-utils-1.4.1.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.4.1/plexus-utils-1.4.1.pom (2 KB at 3.0 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.11/plexus-1.0.11.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.11/plexus-1.0.11.pom (9 KB at 38.1 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.pom (4 KB at 11.7 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-containers/1.0.3/plexus-containers-1.0.3.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-containers/1.0.3/plexus-containers-1.0.3.pom (492 B at 1.9 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.4/plexus-1.0.4.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.4/plexus-1.0.4.pom (6 KB at 24.5 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/junit/junit/3.8.1/junit-3.8.1.pom
        Downloaded: http://repo.maven.apache.org/maven2/junit/junit/3.8.1/junit-3.8.1.pom (998 B at 4.4 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.pom (7 KB at 30.2 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.pom
        Downloaded: http://repo.maven.apache.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.pom (4 KB at 10.6 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-profile/2.0.6/maven-profile-2.0.6.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-profile/2.0.6/maven-profile-2.0.6.pom (2 KB at 4.1 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6.pom (3 KB at 7.8 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-repository-metadata/2.0.6/maven-repository-metadata-2.0.6.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-repository-metadata/2.0.6/maven-repository-metadata-2.0.6.pom (2 KB at 3.3 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6.pom (2 KB at 4.6 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-registry/2.0.6/maven-plugin-registry-2.0.6.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-registry/2.0.6/maven-plugin-registry-2.0.6.pom (2 KB at 6.5 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.pom (6 KB at 20.3 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.12/plexus-1.0.12.pom
        Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.12/plexus-1.0.12.pom (10 KB at 28.7 KB/sec)
        Downloading: http://repo.maven.apache.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar
        Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar
        Downloaded: http://repo.maven.apache.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar (119 KB at 241.8 KB/sec)
        Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar (245 KB at 380.5 KB/sec)
        Uploading: http://nexus:8081/nexus/content/repositories/releases/org/onap/policy/drools-applications/aai/1.1.0/aai-1.1.0.jar
        Uploading: http://nexus:8081/nexus/content/repositories/releases/org/onap/policy/drools-applications/aai/1.1.0/aai-1.1.0.pom
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 27.413s
        [INFO] Finished at: Thu Sep 07 13:44:01 UTC 2017
        [INFO] Final Memory: 8M/241M
        [INFO] ------------------------------------------------------------------------
        [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file (default-cli) on project standalone-pom: Failed to deploy artifacts: Could not transfer artifact org.onap.policy.drools-applications:aai:jar:1.1.0 from/to policy-nexus-releases (http://nexus:8081/nexus/content/repositories/releases/): Failed to transfer file: http://<ip>. Return code is: 503, ReasonPhrase: Service Unavailable. -> [Help 1]
        [ERROR]
        [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
        [ERROR] Re-run Maven using the -X switch to enable full debug logging.
        [ERROR]
        [ERROR] For more information about the errors and possible solutions, please read the following articles:
        [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
        artifacts/appc-1.1.0.jar: Deploying JAR artifact to remote repository
        [INFO] Scanning for projects...
        [INFO]
        [INFO] ------------------------------------------------------------------------
        [INFO] Building Maven Stub Project (No POM) 1
        [INFO] ------------------------------------------------------------------------
        [INFO]
        [INFO] --- maven-deploy-plugin:2.7:deploy-file (default-cli) @ standalone-pom ---
        ^C
        root@onap-policy:~#

      CommentAdd your comment...
    2.  
      1
      0
      -1

      Hi Attila Jány

      Policy Requires following updates to work behind proxy:

       

      mvn doesn't support hostnames for noproxy; Hence we need to proxy the nexus 8081 docker port to host (say 8999 and pass using docker-compose.yml file in /opt/policy directory) and configure http_proxy by accessing UI at <ip:8999>/nexus -> administration -> server. Restart nexus container. drools containers starts communicating nexus using hostname. Hence we avoid this by updating /opt/policy/config/drools/base.conf with releaseRepositoryUrl, snapshotRepositoryUrl values with host ip address and 8999 port. Also, update the docker image file docker-install.sh(if you don't want to update file directly they either you need to mount this or build a new image with changes) with mvn proxy settings after calling function configure_settings. With these changes drools will use proxy to go over internet and contact local nexus repo with ip address and uses noproxy to upload deployment files.

       

      PAP container actually put the controlloop definitions into PDP API. PAP downloads the file initially from internet. So, we need to pass the proxy values but passing them directly to container as an environment variables will cause issues for curl. Hence, we just edit file /opt/policy/config/pe/push-policies.sh and add proxy env values before wget and unset them after wget. Restart the PAP container and it will create all required initial policies in PDP

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi,


        Ok now the installation is better on that docker

        [INFO] Scanning /home/policy/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar

        [INFO] ------------------------------------------------------------------------

        [INFO] BUILD SUCCESS

        [INFO] ------------------------------------------------------------------------

        [INFO] Total time: 1:01.318s

        [INFO] Finished at: Thu Sep 07 13:42:52 UTC 2017

        [INFO] Final Memory: 12M/235M

        [INFO] ------------------------------------------------------------------------

        Executing tweaks


        name                 version         status

        ----                 -------         ------

        session-persistence  1.1.0           disabled

        eelf                 1.1.0           disabled

        healthcheck          1.1.0           enabled


        Waiting for mariadb port 3306 open

        mariadb port 3306 is open

        Starting processes

        [drools-pdp-controllers]


        But the health check is not OK, it waits and waits forever..

        I looked into the docker logs, but cant see what is the problem..

        Waiting for pap port 9091 open

        pap port 9091 is open

                pdp: STARTING ..

                pdplp: STARTING .


        Successful configure of brmsgw under policy:policy ownership with umask 0022.
        error: version information does not exist: /opt/app/policy/etc/build.info
        Waiting for pap port 9091 open
        pap port 9091 is open
                brmsgw: STARTING ..


        OK the PAP DNS lookap fails... I made the same changes for that container als, edited the wait-for-port and I expanded all setting.xml which did not had the proxy part (only 2 did not had it, all other was ok)

        * Hostname was NOT found in DNS cache
        *   Trying <proxy_ip>...
        * Connected to <proxy_ip> (<proxy_ip>) port 8080 (#0)
        > PUT http://pdp:8081/pdp/api/pushPolicy HTTP/1.1

        I do not think that it should query the proxy it should request the DNS server.

         504 DNS look up failed

                  </h1>

                  <p>

                    <p>

                      The proxy server reported that an error occurred while trying to access the website.  Please click




        root@ecomp-vm1-policy:/opt/policy# docker logs nexus
        Starting Nexus OSS...
        Started Nexus OSS.


        root@ecomp-vm1-policy:/opt/policy# docker logs mariadb
         * Starting MariaDB database server mysqld
           ...done.
         * Checking for corrupt, not cleanly closed and upgrade needing tables.


        do you have any idea?

        thanks for your help!

        Attila



          CommentAdd your comment...