[ODLPARENT-250] SFT is failing without internet access Created: 04/Feb/21  Updated: 05/Feb/21

Status: Open
Project: odlparent
Component/s: SFT
Affects Version/s: 8.1.0
Fix Version/s: None

Type: Bug Priority: Low
Reporter: Richard Kosegi Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Apache Maven 3.6.3

OpenJDK 11.0.9.1 (Ubuntu)

No internet access, local Nexus proxy configured as <mirrorOf>*</mirrorOf>


Attachments: File sft.log    

 Description   

When running SFT in environment without direct access to internet, it fails with error (from surefire-reports output, full log is attached):

 

Connect to repo1.maven.org:443 [repo1.maven.org/151.101.204.209] failed: connect timed out

 

We have settings.xml with <mirrors> section that is pointing to local Nexus server and this is working fine for maven itself (all plugins/dependencies are correctly downloaded during build). However pax is not respecting that setting and try to connect directly to maven central to fetch some of its dependencies.

If that matters, maven is invoked using these arguments:

 

mvn clean install \
-Dmaven.repo.local="${WORKSPACE}/.repository" \
-Dorg.ops4j.pax.url.mvn.localRepository="${WORKSPACE}/.repository"
 

 



 Comments   
Comment by Richard Kosegi [ 05/Feb/21 ]

By applying this patch I'm able to workaround problem:

diff --git a/features-test/pom.xml b/features-test/pom.xml
index 74a1b6af..9c938353 100644
--- a/features-test/pom.xml
+++ b/features-test/pom.xml
@@ -39,6 +39,18 @@
             <artifactId>pax-exam</artifactId>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.tipi</groupId>
+            <artifactId>org.ops4j.pax.tipi.hamcrest.core</artifactId>
+            <version>1.3.0.1</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.tipi</groupId>
+            <artifactId>org.ops4j.pax.tipi.junit</artifactId>
+            <version>4.12.0.1</version>
+            <scope>compile</scope>
+        </dependency>
         <dependency>
             <groupId>org.ops4j.pax.url</groupId>

 

However I would like to know if SFT is able to operate in isolated environment like is mentioned in ticket description as this is considered as security problem in corporate deployments.

Comment by Richard Kosegi [ 05/Feb/21 ]

Apparently this is not a first time where these 2 jars are causing problem see here https://git.opendaylight.org/gerrit/c/controller/+/73118

Comment by Richard Kosegi [ 05/Feb/21 ]

Lowering priority as workaround exists

Generated at Wed Feb 07 20:28:01 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.