liferay / liferay-docker

Other
60 stars 147 forks source link

Liferay 7.2 GA1 Theme build failed due to liferay mirror 403 HTTP response code #57

Closed Amstel90 closed 4 years ago

Amstel90 commented 4 years ago

Hello.

Since 07.01.2020 docker image build fails due to themes fail with following log:

> Task :themes:some-theme:createLiferayThemeJson
Task ':themes:some-theme:createLiferayThemeJson' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
:themes:some-theme:createLiferayThemeJson (Thread[Task worker for ':',5,main]) completed. Took 0.005 secs.
:downloadNode (Thread[Task worker for ':',5,main]) started.
[ant:get] Error opening connection java.io.IOException: Server returned HTTP response code: 403 for URL: http://mirrors.lax.liferay.com/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz
[ant:get] Error opening connection java.io.IOException: Server returned HTTP response code: 403 for URL: http://mirrors.lax.liferay.com/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz
[ant:get] Error opening connection java.io.IOException: Server returned HTTP response code: 403 for URL: http://mirrors.lax.liferay.com/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz
[ant:get] Can't get http://mirrors.lax.liferay.com/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz to /home/vsts/.liferay/mirrors/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz.tmp
[ant:get] http://nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz permanently moved to https://nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz

> Task :downloadNode FAILED
Task ':downloadNode' is not up-to-date because:
  No history is available.
Trying to download http://mirrors.lax.liferay.com/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz to /home/vsts/.liferay/mirrors/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz.tmp
[ant:get] Getting: http://mirrors.lax.liferay.com/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz
[ant:get] To: /home/vsts/.liferay/mirrors/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz.tmp
Trying to download http://nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz to /home/vsts/.liferay/mirrors/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz.tmp
[ant:get] Getting: http://nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz
[ant:get] To: /home/vsts/.liferay/mirrors/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz.tmp
:downloadNode (Thread[Task worker for ':',5,main]) completed. Took 0.551 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':downloadNode'.
> Redirection detected from http to https. Protocol switch unsafe, not allowed.

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Navigating to http://mirrors.lax.liferay.com/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz does return 403. Also fails to redirect from http://nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz to https://nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz

gamerson commented 4 years ago

hey @Amstel90 this is a known issue with our com.liferay.node gradle plugin when your build is using gradle 4+.

Short term fix is to apply this script to your root build.gradle: https://gist.github.com/gamerson/6327e932a37b6d13e706913b1ef1c8bd

Long term fix is to upgrade your build to gradle 5.6.4 (using gradle wrapper --gradle-version=5.6.4 command). Then edit your settings.gradle to update your workspace plugin version to 2.5.7 (after you have updated to gradle5).

If you have any more issues, feel free to open a ticket here: https://issues.liferay.com/projects/LPS/issues and create a new issue with the component set to Dev Tools > Gradle Plugins

zsoltbalogh commented 4 years ago

Closing this issue per @gamerson 's comment.