Error transferring file server returned http response code 501 for url

Description [Robolectric] : sdk=28; resources=BINARY Downloading from maven Downloading: org/robolectric/android-all/10-robolectric-5803371/android-all-10-robolectric-5803371.pom from repository so...
$ git clone https://gitlab.com/fdroid/fdroidclient.git
$ cd fdroidclient
$ ./gradlew testFullDebugUnitTest
Dependency verification is an incubating feature.

> Configure project :app
buildTypes.debug defaultConfig.versionCode 1010000

> Task :app:testFullDebugUnitTest
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.robolectric.util.ReflectionHelpers$6 (file:/home/hans/.gradle/caches/transforms-2/files-2.1/c153ec5f82c0ed977618c266a10281ac/jetified-shadowapi-4.3.jar) to method java.lang.ClassLoader.getPackage(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.robolectric.util.ReflectionHelpers$6
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_OUT
    [Robolectric] org.fdroid.fdroid.updater.Issue763MultiRepo.testAntoxRepo: sdk=25; resources=BINARY
    Downloading from maven 

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_ERROR
    Downloading: org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.pom from repository sonatype at https://oss.sonatype.org/content/groups/public/
    Error transferring file: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_OUT
    [WARNING] Unable to get resource 'org.robolectric:android-all:pom:Q-robolectric-5415296' from repository sonatype (https://oss.sonatype.org/content/groups/public/): Error transferring file: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_ERROR
    Downloading: org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.pom from repository central at http://repo1.maven.org/maven2
    Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.pom

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_OUT
    [WARNING] Unable to get resource 'org.robolectric:android-all:pom:Q-robolectric-5415296' from repository central (http://repo1.maven.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.pom

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_ERROR
    Downloading: org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.jar from repository sonatype at https://oss.sonatype.org/content/groups/public/
    Error transferring file: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_OUT
    [WARNING] Unable to get resource 'org.robolectric:android-all:jar:Q-robolectric-5415296' from repository sonatype (https://oss.sonatype.org/content/groups/public/): Error transferring file: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)

org.fdroid.fdroid.updat$ ./gradlew testFullDebugUnitTest
Dependency verification is an incubating feature.

> Configure project :app
buildTypes.debug defaultConfig.versionCode 1010000

> Task :app:testFullDebugUnitTest
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.robolectric.util.ReflectionHelpers$6 (file:/home/hans/.gradle/caches/transforms-2/files-2.1/c153ec5f82c0ed977618c266a10281ac/jetified-shadowapi-4.3.jar) to method java.lang.ClassLoader.getPackage(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.robolectric.util.ReflectionHelpers$6
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_OUT
    [Robolectric] org.fdroid.fdroid.updater.Issue763MultiRepo.testAntoxRepo: sdk=25; resources=BINARY
    Downloading from maven 

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_ERROR
    Downloading: org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.pom from repository sonatype at https://oss.sonatype.org/content/groups/public/
    Error transferring file: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_OUT
    [WARNING] Unable to get resource 'org.robolectric:android-all:pom:Q-robolectric-5415296' from repository sonatype (https://oss.sonatype.org/content/groups/public/): Error transferring file: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_ERROR
    Downloading: org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.pom from repository central at http://repo1.maven.org/maven2
    Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.pom

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_OUT
    [WARNING] Unable to get resource 'org.robolectric:android-all:pom:Q-robolectric-5415296' from repository central (http://repo1.maven.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.pom

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_ERROR
    Downloading: org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.jar from repository sonatype at https://oss.sonatype.org/content/groups/public/
    Error transferring file: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_OUT
    [WARNING] Unable to get resource 'org.robolectric:android-all:jar:Q-robolectric-5415296' from repository sonatype (https://oss.sonatype.org/content/groups/public/): Error transferring file: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_ERROR
    Downloading: org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.jar from repository central at http://repo1.maven.org/maven2
    Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.jar

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_OUT
    [WARNING] Unable to get resource 'org.robolectric:android-all:jar:Q-robolectric-5415296' from repository central (http://repo1.maven.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.jar
er.Issue763MultiRepo > testAntoxRepo STANDARD_ERROR
    Downloading: org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.jar from repository central at http://repo1.maven.org/maven2
    Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.jar

org.fdroid.fdroid.updater.Issue763MultiRepo > testAntoxRepo STANDARD_OUT
    [WARNING] Unable to get resource 'org.robolectric:android-all:jar:Q-robolectric-5415296' from repository central (http://repo1.maven.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/robolectric/android-all/Q-robolectric-5415296/android-all-Q-robolectric-5415296.jar
[snip


Description


Jon Rodriguez



2020-04-09 02:43:14 UTC

Running ant -f fetch.xml -Ddest=system during the install process as suggested in the guide (https://ant.apache.org/manual/install.html) results in the following error:

[artifact:dependencies] Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.jar
[artifact:dependencies] [WARNING] Unable to get resource 'org.apache.ant:ant-antunit:jar:1.4' from repository central (http://repo1.maven.org/maven2/): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.jar

Visiting the repo page directly results in the following message:

501 HTTPS Required. 
Use https://repo1.maven.org/maven2/
More information at https://links.sonatype.com/central/501-https-required

Fetch.xml sets antunit as a target for the URL:

  <target name="antunit"
          description="load AntUnit library"
          depends="init">
    <f2 project="org.apache.ant" archive="ant-antunit"/>
  </target>

The repo value is set in libraries.properties under ..apache-ant-1.9.14lib:

# Repository to use by default for fetching dependencies.
m2.repo=https://repo1.maven.org/maven2/

After changing m2.repo value to “https” instead of “http”, the library dependency command completes without error.

This should be https by default.


Comment 1


Jon Rodriguez



2020-04-09 02:46:22 UTC

Correction: the original libraries.properties file has the following entry:

# Repository to use by default for fetching dependencies.
m2.repo=http://repo1.maven.org/maven2/

It *should* be m2.repo=https://repo1.maven.org/maven2/


Comment 2


Stefan Bodewig



2020-04-09 03:57:35 UTC

Thanks. This has already been fixed in the master and 1.8.x branches and will be fixed in the next releases.

I’m trying to build BLFS 8.4
An error occurs when trying to download the runtime dependencies using the fetch.xml ant build script:
bootstrap/bin/ant -f fetch.xml -Ddest=optional

Error:

BUILD FAILED
/sources/BLFS/apache-ant-1.10.5/fetch.xml:212: The following error occurred while executing this line:
sources/BLFS/apache-ant-1.10.5/fetch.xml:122: Unable to resolve artifact: Missing:
--------
1) org.apache.ant:ant-antunit:jar:1.4

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.ant -DartifactId=ant-antunit -Dversion=1.4 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:

mvn deploy:deploy-file -DgroupId=org.apache.net -DartifactId=ant-antunit -Dversion=1.4 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:pom:2.0
2) org.apache.ant:ant-antunit:jar:1.4

----------
1 required artifact is missing.

for artifact:
org.apache.maven:super-pom:pom:2.0

from the specified remote repositories:
central (http://repo1.maven.org/maven2/)

Due to hardware limitations I am building BLFS 8.4 on the host machine. I’m using bash 5.0

asked Oct 28, 2020 at 19:31

Palash Tekam's user avatar

2

I tried to build the version manually using the instructions from Building Ant (Ant manual)
combined with Installation of Apache Ant (BLFS 8.4) and got your error:

$ export JAVA_HOME=/path/to/my/java-11-openjdk-amd64
$ ./bootstrap.sh
$ bootstrap/bin/ant -f fetch.xml -Ddest=optional
...
[artifact:dependencies] Downloading: org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.pom from repository central at http://repo1.maven.org/maven2/
[artifact:dependencies] Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.pom
[artifact:dependencies] [WARNING] Unable to get resource 'org.apache.ant:ant-antunit:pom:1.4' from repository central (http://repo1.maven.org/maven2/): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.pom
[artifact:dependencies] Downloading: org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.jar from repository central at http://repo1.maven.org/maven2/
[artifact:dependencies] Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.jar
[artifact:dependencies] [WARNING] Unable to get resource 'org.apache.ant:ant-antunit:jar:1.4' from repository central (http://repo1.maven.org/maven2/): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.jar
[artifact:dependencies] An error has occurred while processing the Maven artifact tasks.
...

If you open http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.4/ant-antunit-1.4.pom you’ll see that https is required.

Solution

Edit ./lib/libraries.properties and change the m2.repo URL from http to https (line 29)

# Repository to use by default for fetching dependencies.
m2.repo=https://repo1.maven.org/maven2/

and run

bootstrap/bin/ant -f fetch.xml -Ddest=optional

again.

answered Oct 28, 2020 at 20:51

Freddy's user avatar

FreddyFreddy

23.5k1 gold badge18 silver badges56 bronze badges

0

Привет, читатель блога ZametkiNaPolyah.ru! Продолжим знакомиться с протоколом HTTP в рубрике Cерверы и протоколы и ее разделе HTTP протокол. В этой записи мы с тобой рассмотрим последний класс кодов состояния HTTP — коды ошибок HTTP сервера. Все коды ошибок HTTP сервера начинаются с пятерки и говорят о том, что сервер не может выполнить запрос по каким-то своим внутренним причинам. Стандарт HTTP 1.1 насчитывает всего 6 кодов ошибок сервера HTTP: 500, 501, 502, 503, 504, 505. Любая реализация HTTP сервера может расширить этот набор кодов ошибок сервера.

HTTP коды ошибок сервера: 500, 501, 502, 503, 504, 505

HTTP коды ошибок сервера: 500, 501, 502, 503, 504, 505

HTTP коды ошибок сервера: 500, 501, 502, 503, 504, 505

HTTP коды ошибок сервера говорят пользователю о том, что HTTP сервер знает, что совершил ошибку или просто сервер неспособен выполнить HTTP запрос клиента. Все когда ошибок HTTP сервера начинаются с пятерки. Составляя HTTP ответ сервер всегда отправляет тело HTTP сообщения клиенту за исключением того случая, когда использовался метод HEAD (здесь подробно написано про методы HTTP запроса). Браузеры (клиентские приложения или агенты пользователя), в свою очередь, всегда показывают пользователю то, что отправил сервер.

Давайте для удобства рассмотрения сведем в одну таблицу все коды ошибок HTTP сервера в одну таблицу и дадим подробное описание HTTP кодам ошибок сервера.

Код ошибки HTTP сервера Описание кода ошибки HTTP сервера
500 InternalServerError Код состояния ошибки HTTP сервера 500: внутренняя ошибка сервера
Если вы видите ошибку HTTP сервера с кодом 500, то знайте, что это может любая внутренняя ошибка HTTP сервера, которая не входит в рамки других ошибок, в том числе и ошибок, описанных в других классах.
501 NotImplemented Код состояния ошибки HTTP сервера  501: не реализовано
Если вы видите ошибку HTTP сервера с кодом 501, то это означает, что сервер не может выполнить HTTP сообщение, полученное от клиента, из-за ограниченного функционала. Ошибка сервера 501 может возникнуть из-за настроек сервера. Часто ошибка 501 возникает из-за того, что сервер не может распознать метод, указанный в запросе.
502 BadGateway Код состояния ошибки HTTP сервера  502: ошибка шлюза
Если вы видите ошибку HTTP сервера с кодом 502, то это означает, что серверное приложение действует в качестве шлюза или прокси-сервера и при этом он получил недопустимый ответ от следующего в цепочке запросов сервера, к которому обращался при попытке выполнить запрос.
503 ServiceUnavailable Код состояния ошибки HTTP сервера  503: сервис недоступен
Если вы видите ошибку HTTP сервера с кодом 503, то это означает, что в настоящее время сервер недоступен из-за его перегрузки или он находится на техническом обслуживание. Если сервер знает о продолжительности задержки, то вместе с кодом ошибки 503, он может указать время в поле заголовка Retry-After.
504 GatewayTimeout Код состояния ошибки HTTP сервера  504: истекло время ожидания
Если вы видите ошибку HTTP сервера с кодом 504 возникает в том случае, когда HTTP сервер действует в роли прокси-сервера или шлюза и не получил своевременного ответа от следующего сервера, к которому он обращался, чтобы выполнить запрос.
505 HTTP VersionNotSupported Код состояния ошибки HTTP сервера  505: сервис недоступен
Если вы видите ошибку HTTP сервера с кодом 505, то это означает, что сервер не поддерживает или отказывается поддерживать версию HTTP протокола (кстати, версия — это очень важный параметр HTTP протокола, который определяет, как будет установлено HTTP соединение), указанную в запросе.

Мы рассмотрели коды состояний ошибок HTTP сервера и вообще все коды состояний HTTP сервера. Напомню, что помимо кодов ошибок сервера в HTTP есть: информационные коды состояния, успешные коды состояния, коды ошибок клиента и коды перенаправления. Заключением данных публикаций будет справочник кодов HTTP сервера, в котором будут собраны все коды состояний и их описание.

Не забывайте делиться своим мнением в комментариях и оставлять отзывы, это поможет сделать нашу работу лучше, с уважением ZametkiNaPolyah.ru!

Возможно, эти записи вам покажутся интересными

Понравилась статья? Поделить с друзьями:
  • Error trace tarkov
  • Error toolset gcc initialization
  • Error toolpath manager library
  • Error too many memory references for mov
  • Error too many materials used max 32