GRADLE Build Error : Permission Denied: No further information - java

Caused by: java.net.SocketException: Permission denied: no further information
at `sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:111)
at org.gradle.internal.remote.internal.inet.TcpOutgoingConnector.tryConnect(TcpOutgoingConnector.java:81)
at org.gradle.internal.remote.internal.inet.TcpOutgoingConnector.connect(TcpOutgoingConnector.java:54)`
... 29 more
This error occurs when I connect to VPN, if not connect it works fine.
I need to use VPN for new libraries, Please suggest the best answer to resolve this.
Disabling firewall does not work for me
placing gradle.properties in .gradle folder did not worked.
adding _JAVA_OPTION allowing ipv4 stack also did not worked.gradle build

This issue will resolved by directing the cacerts with all installed certificates in to your gradle.properties. No JAVA Args required.

Related

How to solve the "Unable to update binding" error in SONAR LINT?

Scenario :
Recently I have installed SONAR lint v3.4 on Eclipse Oxygen.2 Release (4.7.2
I have SONAR qube server running and I was successfully able to connect SONAR lint to it.
Problem :
However after the connection when I try to take updates from the SONARQUBE server.
Eclipse throws the following error :
Failed to update binding for 1 project,
Unable to update binding for
project 'xyz-project'
Unable to move
C:\Users\vsinghal\eclipse-workspace\.sonarlint\work{SONARQUBE server
domain}\.sonartmp_7415526389500015248\8960528228988360636
to
C:\Users\vsinghal\eclipse-workspace\.sonarlint\storage{SONARQUBE
server domain}\modules\xyz-project
I checked the error log, following is the trace in eclipse :
java.lang.IllegalStateException: C:\Users\vsinghal\eclipse-workspace\.sonarlint\work\{SONARQUBE server domain name}\.sonartmp_7415526389500015248\8960528228988360636 to C:\Users\vsinghal\eclipse-workspace\.sonarlint\storage\{SONARQUBE server domain name}\modules\xyz-project
at org.sonarsource.sonarlint.core.client.api.util.FileUtils.moveDir(FileUtils.java:47)
at org.sonarsource.sonarlint.core.client.api.util.FileUtils.replaceDir(FileUtils.java:153)
at org.sonarsource.sonarlint.core.container.connected.update.perform.ModuleStorageUpdateExecutor.update(ModuleStorageUpdateExecutor.java:63)
at org.sonarsource.sonarlint.core.container.connected.ConnectedContainer.updateModule(ConnectedContainer.java:118)
at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.updateModule(ConnectedSonarLintEngineImpl.java:260)
at org.sonarlint.eclipse.core.internal.server.Server.updateProjectStorage(Server.java:338)
at org.sonarlint.eclipse.core.internal.jobs.ServerUpdateJob.run(ServerUpdateJob.java:66)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: java.nio.file.AccessDeniedException: C:\Users\vsinghal\eclipse-workspace\.sonarlint\work\{SONARQUBE server domain name}\.sonartmp_7415526389500015248\8960528228988360636 to C:\Users\vsinghal\eclipse-workspace\.sonarlint\storage\{SONARQUBE server domain name}\modules\xyz-project
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileCopy.move(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
at java.nio.file.Files.move(Unknown Source)
at org.sonarsource.sonarlint.core.client.api.util.FileUtils.moveDirPreferAtomic(FileUtils.java:53)
at org.sonarsource.sonarlint.core.client.api.util.FileUtils.moveDir(FileUtils.java:45)
... 7 more
What did I do try and solve it ?
I gave complete permissions/full control to Everyone for the
eclipse workspace folder in windows explorer .
I tried opening eclipse as admin
I have checked the SONAR server is accessible
but after all these steps the error still doesn't go.
Can anyone help me in finding a solution to this ?
I'm currently experiencing the same issue using SolarLint in both eclipse and Intellij.
There is a reasonable suggestion on google groups, https://groups.google.com/forum/#!topic/sonarlint/nQW1kJBjUYg which suggests that the cause could by a virus scanner interfering in the process. However thus far despite following that theory, I'm still experiencing the issue. Something to try though.

Error in build on device Android

I want to run my app on my real device Android but I receive this error:
Running command: D:\WebStorm\Path\platforms\android\cordova\run.bat ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk JAVA_HOME=C:\Program Files\Java\jdk1.8.0_40 WARNING : No target specified, deploying to device '02c5cabed02456d5'. Running: D:\WebStorm\Path\platforms\android\gradlew cdvBuildDebug -b D: \WebStorm\Path\platforms\android\build.gradle
-PcdvBuildArch=arm -Dorg. gradle.daemon=true Downloading http://services.gradle.org/distributions/gradle-2.2.1-all.zip
Exception in thread "main" java.lang.RuntimeException: java.net.ConnectException : Connection refused: connect
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc essManager.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.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketI mpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja va:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocket Impl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java :188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
at sun.net.www.http.HttpClient.New(HttpClient.java:308)
at sun.net.www.http.HttpClient.New(HttpClient.java:326)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC onnection.java:1168)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConn ection.java:1104)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne ction.java:998)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection .java:932)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLCo nnection.java:1512)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon nection.java:1440)
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(ExclusiveFileAcc essManager.java:65)
... 3 more
D:\WebStorm\Path\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^ Error code 1 for command: cmd with args: /s /c "D:\WebStorm\Path\platfo rms\android\gradlew cdvBuildDebug -b D:\WebStorm\Path\platforms\android \build.gradle -PcdvBuildArch=arm -Dorg.gradle.daemon=true" ERROR running one or more of the platforms: Error: D:\WebStorm\Path\pla tforms\android\cordova\run.bat: Command failed with exit code 8 You may not have the required environment or OS to run this project
I installed the Android sdk and I added to my Path in Windows7 this:
C:\Development\android-sdk\platform-tools;
C:\Development\android-sdk\tools;
C:\Development\android-sdk\android-sdk
Where is the problem???
It is seems be issue with proxy only.
You can set proxy in two ways.
Create/Edit gradle.properties # c:\Users\<username>\.gradle\
OR
Goto your project location and do the same as above
Example : platforms/android/gradle.properities
Write below content in file
systemProp.http.proxyHost=proxyhost
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=username
systemProp.http.proxyPassword=pwd
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
systemProp.https.proxyHost=proxyhost
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=username
systemProp.https.proxyPassword=pwd
systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost
This link helped me: http://forum.ionicframework.com/t/proxy-error-when-downloading-gradle-zip-during-ionic-emulate-android/31701
To find .gradle, go to your user folder (default is c:\Users\<your login>). In case gradle.properties is not existing, simply create one
Looking at your stacktrace it seems to be some kind of connectivity problem. Is your computer is using any proxy to connect to network? if yes then that have to be configured for your build tool as well. As i can see it is just trying to download gradle-2.2.1-all.zip and it is failing due to connection problem.
Solution: Steps to configure proxy in nodejs
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
Hope that information helps you.
Regards
Himanshu

Jenkins CLI connection refused

When executing
java -jar jenkins-cli.jar -s https://jenkins_url help
I'm getting connection refused for some reason. Jenkins version is 1580.3, user has the permissions on Jenkins server, cli jar is up-to-date and ssh public key is configured properly. Any idea what might be causing this? Here's the stack trace if it will help:
Exception in thread "main" java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at hudson.cli.CLI.connectViaCliPort(CLI.java:203)
at hudson.cli.CLI.<init>(CLI.java:126)
at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)
at hudson.cli.CLI._main(CLI.java:466)
at hudson.cli.CLI.main(CLI.java:382)
Suppressed: java.io.EOFException: unexpected stream termination
at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:331)
at hudson.remoting.Channel.<init>(Channel.java:421)
at hudson.remoting.Channel.<init>(Channel.java:400)
at hudson.remoting.Channel.<init>(Channel.java:396)
at hudson.remoting.Channel.<init>(Channel.java:385)
at hudson.remoting.Channel.<init>(Channel.java:377)
at hudson.remoting.Channel.<init>(Channel.java:353)
at hudson.cli.CLI.connectViaHttp(CLI.java:157)
at hudson.cli.CLI.<init>(CLI.java:130)
... 3 more
If the connection is refused, perhaps the CLI is disabled, but more likely there's a firewall or network issue.
Each successful HTTP request to Jenkins responds with the CLI port as an HTTP header, so you can quickly check whether it's enabled:
curl -sI http://jenkins/ | grep CLI
Alternatively, as documented on the wiki, you can check whether the TCP port is enabled. Look for "TCP port for JNLP slave agents" at http://jenkins/configureSecurity/
However, since your stacktrace indicates that the CLI client is trying to establish a connection to a particular port, it suggests that the CLI is enabled, and Jenkins is advertising that port number in its HTTP responses.
So you could try to connect to that port manually, to check whether it's open:
telnet jenkins <cli-port>
If you also see "Connection refused" here, then you know that your Jenkins and CLI client setup seem to be ok, but you have a network issue. In which case, check that the firewall on the Jenkins server allows incoming connections on that CLI port.
To make firewall configuration easier, you can switch from a random port to a fixed port in the "configure security" page mentioned above.
I had this issue on Ubuntu 16.04.
Note: this error happened to me well after setting up and having ran successful build jobs before. This happened to me after running a particularly heavy build job. So my fix might work assuming that the error isn't a firewall issue.
First, I tried to do a safe restart through the commandline using the jenkins-cli.jar tool:
java -jar jenkins-cli.jar -s http://localhost:8080 -auth <username>:<password> safe-restart
but also got the same Connection refused error message.
So as a last resort I tried restarting the Jenkins service on the server like so:
sudo systemctl restart jenkins
and that fixed it.

Jboss Failed to instantiate class "org.jboss.logmanager.handlers.PeriodicRotatingFileHandle

When I tried jbosseap6.3 install as service. I got below error. Anyone have any idea on the below error. Any one shed light means it is very helpful for me.
java.lang.IllegalArgumentException: Failed to instantiate class "org.jboss.logmanager.handlers.PeriodicRotatingFileHandler" for handler "FILE"
at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:119)
at org.jboss.logmanager.config.LogContextConfigurationImpl.doPrepare(LogContextConfigurationImpl.java:338)
at org.jboss.logmanager.config.LogContextConfigurationImpl.prepare(LogContextConfigurationImpl.java:291)
at org.jboss.logmanager.config.LogContextConfigurationImpl.commit(LogContextConfigurationImpl.java:300)
at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:542)
at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:97)
at org.jboss.as.logging.logmanager.ConfigurationPersistence.configure(ConfigurationPersistence.java:149)
at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:300)
at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:262)
at java.util.logging.LogManager$3.run(LogManager.java:399)
at java.util.logging.LogManager$3.run(LogManager.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:396)
at java.util.logging.LogManager.access$800(LogManager.java:145)
at java.util.logging.LogManager$2.run(LogManager.java:345)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.ensureLogManagerInitialized(LogManager.java:338)
at java.util.logging.LogManager.getLogManager(LogManager.java:378)
at org.jboss.modules.Main.main(Main.java:443)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:117)
... 18 more
Caused by: java.io.FileNotFoundException: C:\jboss-eap-6.3\standalone\log\server.log (The process cannot access the file because it is being used by another process)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at org.jboss.logmanager.handlers.FileHandler.setFile(FileHandler.java:154)
at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.setFile(PeriodicRotatingFileHandler.java:105)
at org.jboss.logmanager.handlers.FileHandler.setFileName(FileHandler.java:192)
at org.jboss.logmanager.handlers.FileHandler.<init>(FileHandler.java:122)
at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.<init>(PeriodicRotatingFileHandler.java:73)
... 23 more
Shutdown JBossEAP6.3.0 service [2015-05-29 09:58:27]
Try to start jBoss server as administrator by pressing right mouse key, it will permit jboss to create all folders and files .
Right click the installation directory of Jboss EA (mine is C:\program files\EAP6.1, then Properties, Security tab. Given everyone permissions on this folder (all users you can see just give full control). This should then be able to create logs etc files within the required folder.
This is just a workaround though only works for local installs.
I had the same issue, it worked after running it on root, maybe you are running it without the proper rights.
I had resolved this issue by creating log directory in the
C:\jboss-eap-6.3\standalone\
it's a problem due to permissions, the solution that worked for me is that i removed the home directory of jboss wildfly from C:\programmes to C:\
Starting Wildfly/Jboss from the administrator cmd worked!!
You are most likely getting this error because you either have the log file open in a text editor or you're already running that instance of JBoss.
I got the same exception
Try changing the path from c to another destination, that solved my issue and I am able to start the server

Tomcat 6 doesn't start my app on Ubuntu Karmic, which works flawlessly on Lucid

I am having some issues with Tomcat 6 on Ubuntu Karmic. It doesn't start the app failing with various errors.
The first on is:
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission spring.security.strategy read)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:342)
at java.security.AccessController.checkPermission(AccessController.java:553)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1302)
at java.lang.System.getProperty(System.java:669)
at org.springframework.security.core.context.SecurityContextHolder.<clinit>(SecurityContextHolder.java:53)
... 54 more
This is weird, because the very same app runs on Tomcat 6 on Lucid very well. The policy configuration file is the same, I checked. When I add the permission to the conf/policy.d/04webapps.policy file:
permission java.util.PropertyPermission "spring.security.strategy", "read";
it then fails with NoClassDefFoundError:
Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer
Though cglib is in the lib directory of the war
Please help, I can't find any clue on the reason of this.
Ok, I got it now. By default, in Lucid tomcat runs without a security manager. By default in Karmic security manager is enabled. If it is enabled, you need to fine-tune it for your application needs.

Categories