You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2020/04/09 13:10:37 UTC

[Bug 64325] New: Import as remote by url fails.

https://bz.apache.org/bugzilla/show_bug.cgi?id=64325

            Bug ID: 64325
           Summary: Import as remote by url fails.
           Product: Ant
           Version: 1.10.7
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: Build Process
          Assignee: notifications@ant.apache.org
          Reporter: tom.opichal@gmail.com
  Target Milestone: ---

Created attachment 37159
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37159&action=edit
Build file to reproduce the issue

Trying to import remote ant file fails when importing from
https://gitlab.com/.. .

Build file to reproduce the issue is attached.

JDK version: 1.8.0_212
Ant version: 1.10.7

Error message generated:
Cannot find
https://gitlab.com/MedisoArt/public/java-commons/raw/master/build.xml imported
from [local build.xml].

Important notes:
1. Importing from other servers works as expected.
2. Importing from gitlab worked as expected on 23 March 2020. Now it fails.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64325] Import as remote by url fails.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64325

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|NEW                         |RESOLVED

--- Comment #3 from Stefan Bodewig <bo...@apache.org> ---
It works with Java 14 but not with Java 8. It seems some server side
configuration is prohibiting Java8 - the TLS handshake looks fine, though.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64325] Import as remote by url fails.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64325

Jaikiran Pai <ja...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Jaikiran Pai <ja...@apache.org> ---
This looks like some server side change/policy that that URL might have placed.
I can access that URL from browser, curl and wget but when Ant tries it from
Java code, it's receiving a 403 error. In fact, even the following trivial Java
program (which is almost what Ant does internally) results in a 403:

import java.net.URL;
import java.io.InputStream;

public class Fetch {
     public static void main(final String[] args) throws Exception {
        final URL targetURL = new
URL("https://gitlab.com/MedisoArt/public/java-commons/raw/master/build.xml");
         try (final InputStream is =
targetURL.openConnection().getInputStream()) {
             is.read();
         }
         System.out.println("Done");
     }
}

You might have to talk to whoever manages that URL to understand what
restrictions are in place to access that URL (and what changed on 23 March
2020). Maybe they are using some request headers to decide whether or not to
allow access to the resource.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64325] Import as remote by url fails.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64325

--- Comment #2 from Jaikiran Pai <ja...@apache.org> ---
This is the error that I get when I run that trivial Java program:

Exception in thread "main" java.io.IOException: Server returned HTTP response
code: 403 for URL:
https://gitlab.com/MedisoArt/public/java-commons/raw/master/build.xml
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900)
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
        at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)

-- 
You are receiving this mail because:
You are the assignee for the bug.