Can not get gradle wrapper download the gradle distribution from local server - gradle

I have created a simple local file server with Tomcat 8 and stored the distributions of the gradle. I planned to use the gradle wrapper to download the gradle from the local file server, because it is slow to download from the official site here. I can download the file from the file server in browser, but I have met some problems. I use Tomcat and HTTP protocol. When I specify the URL and start to download, Android Studio gives me an error:
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 500 for URL: http://yy.phiwifi.com/share/distributions/gradle-2.11-all.zip
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://yy.phiwifi.com/share/distributions/gradle-2.11-all.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at org.gradle.wrapper.Download.downloadInternal(Download.java:59)
at org.gradle.wrapper.Download.download(Download.java:45)
at org.gradle.wrapper.Install$1.call(Install.java:60)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
... 3 more
I don't know the reason, I thought maybe it is the protocol, I should use https, so I change the protocol and tried it again, but it still not working. Can anyone help me?

Related

401 error - Not able to update Jenkins plugins

we're getting the following error when trying to update the Jenkins plugins. we've proxy configured
"
Failure -
java.io.IOException: Server returned HTTP response code: 401 for URL: https://updates.jenkins.io/download/plugins/active-directory/2.26/active-directory.hpi"
enter image description here
401 status code means failed authorisation.
https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2
Try verifying your username password once.
https://updates.jenkins.io/download/plugins/active-directory/2.26/active-directory.hpi is globally accessible.
A simple wget from the jenkins machine will download the new plugin if the proxy is configured correctly.

Failed to build apache kudu because unable to connect to service.gradle.org

When trying to build kudu in my ec2, I got an error "HTTP/1.1 403 Forbidden". My connection was opened through a proxy. The domain that we are trying to connect to here is "service .gradle.org". This can be accessed through HTTPS. Here the build is run using the gradle wrapper jar (v6.8.3). Here, a 403 Forbidden error of the above type kept appearing. It lookes like the connection is trying to use HTTP instead of HTTPS.
This problem is not occurring when the build is run in an environment without a proxy
Build fail image

websocket._exceptions.WebSocketProxyException: failed CONNECT via proxy status: 403 when running in python anywhere

When trying to run my .py script it's showing the error
websocket._exceptions.WebSocketProxyException: failed CONNECT via proxy status: 403
I am using a module tvdatafeed which uses websocket. Please help to solve the issue. So that I can test my script on cloud
Free accounts cannot connect out to websocket endpoints.

Jenkins unable to download xamarin dependency from dl.google.com / maven.google.com

Jenkins unable to download xamarin dependency from dl.google.com / maven.google.com
Download failure reason: Unable to connect to the remote server
Project stack
Dotnet Xamarin android application
Error
Downloading https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-core/16.0.1/firebase-core-16.0.1.aar to C:\Windows\system32\config\systemprofile\AppData\Local\XamarinBuildDownloadCache\googlefb-16.0.1/firebasecore.aar
C:\Windows\system32\config\systemprofile\.nuget\packages\xamarin.build.download\0.8.0\build\Xamarin.Build.Download.targets(52,3): error XBD001: Download failed. Please download https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-core/16.0.1/firebase-core-16.0.1.aar to a file called C:\Windows\system32\config\systemprofile\AppData\Local\XamarinBuildDownloadCache\googlefb-16.0.1/firebasecore.aar. [D:\myfolder\Jenkins\workspace\projectname\project\project.Android\project.Android.csproj]
Download failure reason: Unable to connect to the remote server
Downloading https://maven.google.com/com/crashlytics/sdk/android/crashlytics-core/2.6.3/crashlytics-core-2.6.3.aar to C:\Windows\system32\config\systemprofile\AppData\Local\XamarinBuildDownloadCache\crashlyticscore-2.6.3.aar
C:\Windows\system32\config\systemprofile\.nuget\packages\xamarin.build.download\0.8.0\build\Xamarin.Build.Download.targets(52,3): error XBD001: Download failed. Please download https://maven.google.com/com/crashlytics/sdk/android/crashlytics-core/2.6.3/crashlytics-core-2.6.3.aar to a file called C:\Windows\system32\config\systemprofile\AppData\Local\XamarinBuildDownloadCache\crashlyticscore-2.6.3.aar. [D:\myfolder\Jenkins\workspace\projectname\project\project.Android\project.Android.csproj]
Download failure reason: Unable to connect to the remote server
I have tried configured corporate proxy in Jenkins. it works on the proxy configuration page but throws an error while building code. See in the below screenshot.

Setup WSO2 Enterprise Integrator VFS connection towards Windows SFTP server

Running WSO2 Enterprise Integrator 6.5.0. on RHEL 7. We are in the proces of building flows to read files from an sftp server. But setting up the sftp connection towards a Windows SFTP server fails. We can access this Windows SFTP server correctly with Windows clients like FileZilla/WinSCP.
With netstat we see a connection is build towards the Windows SFTP server but the flow isn't moving - no files are being read. On the point of stopping the server the error as shown below is printed in the wso2carbon.log.
When setting up the connection towards a Linux sftp server ( Plain RHEL 7 box with SSHD ) we don't face any issues. We have the matching private key place under .ssh/id_rsa in the home dir of the user running WSO2 EI.
Searching for the error message ( see snippet below ) we should get it resolved by adding the transport.vfs.AvoidPermissionCheck=true parameter to the VFS URL but unfortunately this doesn't solve our issue.
This is the VFS URL we are using.
sftp://SFTPUSER#SERVER.ACMECORP.ORG/inputdir?transport.vfs.AvoidPermissionCheck=true;vfs.passive=true
Is this a configuration that should work and are we missing a configuration option? Or is this a bug in the WSO2 software?
These URL's mention the issue we are facing.
VFS2 Error cannot delete file and could not get the groups id of the current user (error code: -1)
https://issues.apache.org/jira/browse/VFS-617
https://github.com/wso2/product-ei/issues/3725
[2019-12-06 13:48:59,724] [-1] [] [vfs-Worker-2] ERROR {org.apache.synapse.transport.vfs.VFSTransportListener} - Error checking for existence and readability : sftp://SFTPUSER#SERVER.ACMECORP.ORG/inputdir?transport.vfs.AvoidPermissionCheck=true;vfs.passive=true
org.apache.commons.vfs2.FileSystemException: Could not determine if file "sftp://SFTPUSER#SERVER.ACMECORP.ORG/inputdir?transport.vfs.AvoidPermissionCheck=true;vfs.passive=true" is readable.
at org.apache.commons.vfs2.provider.AbstractFileObject.isReadable(AbstractFileObject.java:1494)
at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:295)
at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:188)
at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:134)
at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.jcraft.jsch.JSchException: Could not get the groups id of the current user (error code: -1)
at org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getGroupsIds(SftpFileSystem.java:219)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.getPermissions(SftpFileObject.java:250)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doIsReadable(SftpFileObject.java:264)
at org.apache.commons.vfs2.provider.AbstractFileObject.isReadable(AbstractFileObject.java:1492)
... 8 more
UPDATE
Using the same URL but then setting up the WSO2 flow to write a file towards the SFTP server works.
Got this resolved with support from WSO2.
The correct VFS url to use is.
sftp://SFTPUSER#SERVER.ACMECORP.ORG/inputdir?transport.vfs.AvoidPermissionCheck=true&vfs.passive=true So a '&' seperator instead of a ';'.
The documentation of WSO2 just is very fuzzy about the correct syntax to use.
They give different examples across their documentation.
https://docs.wso2.com/display/EI650/VFS+Transport
https://docs.wso2.com/display/EI650/File+Inbound+Protocol
https://docs.wso2.com/display/EI650/Configuring+File+Inbound+Protocol+for+FTP%2C+SFTP+and+FILE+Connections

Resources