Cannot run Gradlew: get Exception in thread "main" java.net.SocketException: Connection reset - gradle

I'm trying to run gradlew to build some code that had been supplied to me. The source is the ZIP download from here and all I've done is open a command prompt, cd to that folder and run gradlew.bat.
I've had this work on my crash'n'burn machine but I can't get it working on my main dev machine. The dev machine sits behind a proxy which requires authentication, the other machine doesn't - they're at different locations.
Originally, I got:
Exception in thread "main" java.net.UnknownHostException: services.gradle.org
From this, to gradle.properties, I added:
systemProp.http.proxyHost=192.168.x.y
systemProp.http.proxyPort=80
systemProp.http.proxyUser=myuserid
systemProp.http.proxyPassword=mypassword
and ran it again and got:
C:\Users\tso259sa\workspace\spring-security-saml-master>gradlew.bat
Downloading http://services.gradle.org/distributions/gradle-1.4-bin.zip
Exception in thread "main" java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:189)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.net.www.MeteredStream.read(MeteredStream.java:134)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3052)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3046)
at org.gradle.wrapper.Download.downloadInternal(Download.java:67)
at org.gradle.wrapper.Download.download(Download.java:49)
at org.gradle.wrapper.Install.createDist(Install.java:51)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
For info, if I try an incorrect password or ID, I get:
Exception in thread "main" java.net.ProtocolException: Server redirected too many times (20)
so I think that rules out incorrect ID. Anyone have any ideas what I can try?

I don't know exactly what caused the connection reset but I tried again several times, in case it was transient and, after some time, the response changed to:
Exception in thread "main" java.io.IOException: Server returned
HTTP response code: 403
Suspecting our security systems, I tried to download the file using a browser and received a message from one of the security boxes saying it had been blocked because it contained a .bat file: a regular occurrence.

Look in your build.gradle and gradle.properties and edit 'https://' to 'http://' in all links

I still got this issue today. Different company has different proxy settings.
after investigate, it worked for me:
org.gradle.daemon=true
systemProp.https.proxyHost=[server name]
systemProp.https.proxyPort=[port]
systemProp.https.proxyUser=[user name]
systemProp.https.proxyPassword=XXXXX
systemProp.https.nonProxyHosts= localhost
systemProp.http.proxyHost=[server name]
systemProp.http.proxyPort=[port]
systemProp.http.proxyUser=[user name]
systemProp.http.proxyPassword=XXXXX
systemProp.http.nonProxyHosts= localhost

Related

puppeteer-sharp Failed to launch Base

I have implemented it in my local and works well. But when I moved the changes to the window server it's giving the below error
Failed to launch Base! [0402/075840.212:ERROR:os_crypt_win.cc(70)] Failed to encrypt: The system cannot find the file specified. (0x2)\r\n[0402/075840.212:FATAL:headless_browser_main_parts.cc(103)] Check failed: OSCrypt::Init(local_state_.get()). \r\nBacktrace:\r\n\tIsSandboxedProcess [0x00007FFC31341842+705042]\r\n\tIsSandboxedProcess [0x00007FFC312C39A2+189298]\r\n\tIsSandboxedProcess [0x00007FFC312D2AF8+251080]\r\n\tIsSandboxedProcess [0x00007FFC312D39E0+254896]\r\n\tRelaunchChromeBrowserWithNewCommandLineIfNeeded [0x00007FFC32B12123+12980755]\r\n\tRelaunchChromeBrowserWithNewCommandLineIfNeeded [0x00007FFC32B11E8D+12980093]\r\n\tovly_debug_event [0x00007FFC2F905929+16331561]\r\n\tovly_debug_event [0x00007FFC2FCC5B17+20264215]\r\n\tovly_debug_event [0x00007FFC2F904675+16326773]\r\n\tovly_debug_event [0x00007FFC2F9073BE+16338366]\r\n\tIsSandboxedProcess [0x00007FFC31DB7DB7+11675527]\r\n\tCrashForExceptionInNonABICompliantCodeRange [0x00007FFC3125A837+8179991]\r\n\tCrashForExceptionInNonABICompliantCodeRange [0x00007FFC3125B5AD+8183437]\r\n\tCrashForExceptionInNonABICompliantCodeRange [0x00007FFC3125B20C+8182508]\r\n\tCrashForExceptionInNonABICompliantCodeRange [0x00007FFC3125A1BD+8178333]\r\n\tCrashForExceptionInNonABICompliantCodeRange [0x00007FFC3125A53A+8179226]\r\n\tCrashForExceptionInNonABICompliantCodeRange [0x00007FFC31294D1A+8418810]\r\n\tCrashForExceptionInNonABICompliantCodeRange [0x00007FFC31294BDC+8418492]\r\n\tCrashForExceptionInNonABICompliantCodeRange [0x00007FFC312949E7+8417991]\r\n\tChromeMain [0x00007FFC2E971238+408]\r\n\tOrdinal0 [0x00007FF6E8CF26B8+9912]\r\n\tOrdinal0 [0x00007FF6E8CF1A41+6721]\r\n\tGetHandleVerifier [0x00007FF6E8E3AF42+904642]\r\n\tBaseThreadInitThunk [0x00007FFC68F113F2+34]\r\n\tRtlUserThreadStart [0x00007FFC6AB054F4+52]\r\n\r\n
Can anyone please advise what should be the fix for the above error message?
We had the same error with default browser:
Failed to launch browser! [0428/113352.960:ERROR:os_crypt_win.cc(70)] Failed to encrypt
As #hardkoded suggested, using the revision 851527 we could launch the browser. Thank you!

Cannot delete a Kafka topic in Windows

I have set the Zookeeper properties of "delete.topic.enable" to true. But I still cannot delete the topic. When I do mvn install or mvn test, I got following problems:
WARN Error processing kafka.log:type=LogManager,name=LogDirectoryOffline,logDirectory=C:\Users\extznq\AppData\Local\Temp\EH4Test7267133751803693562 (com.yammer.metrics.reporting.JmxReporter:397)
javax.management.MalformedObjectNameException: Invalid character ':' in value part of property
ERROR Error while deleting healthchecktopic1516638375589-0 in dir C:\Users\extznq\AppData\Local\Temp\EH4Test9083449671042580730. (kafka.server.LogDirFailureChannel:107)
java.io.IOException: Failed to rename log directory from C:\Users\{My-topic-path} to C:\Users\{My-topic-path}-0.0a40ae7410c2401aba0816891789c334-delete
at kafka.log.LogManager.asyncDelete(LogManager.scala:671)
at kafka.cluster.Partition$$anonfun$delete$1.apply(Partition.scala:178)
at kafka.cluster.Partition$$anonfun$delete$1.apply(Partition.scala:173)
at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:217)
at kafka.utils.CoreUtils$.inWriteLock(CoreUtils.scala:225)
at kafka.cluster.Partition.delete(Partition.scala:173)
at kafka.server.ReplicaManager.stopReplica(ReplicaManager.scala:341)
at kafka.server.ReplicaManager$$anonfun$stopReplicas$2.apply(ReplicaManager.scala:373)
at kafka.server.ReplicaManager$$anonfun$stopReplicas$2.apply(ReplicaManager.scala:371)
at scala.collection.Iterator$class.foreach(Iterator.scala:891)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at kafka.server.ReplicaManager.stopReplicas(ReplicaManager.scala:371)
at kafka.server.KafkaApis.handleStopReplicaRequest(KafkaApis.scala:190)
at kafka.server.KafkaApis.handle(KafkaApis.scala:104)
at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:65)
at java.lang.Thread.run(Thread.java:745)
ERROR [Broker id=0] Ignoring stop replica (delete=true) for partition healthchecktopic1516728986980-0 due to storage exception (state.change.logger:107)
org.apache.kafka.common.errors.KafkaStorageException: Error while deleting healthchecktopic1516728986980-0 in dir C:\Users\AppData\Local\Temp\EH4Test7267133751803693562.
Caused by: java.io.IOException: Failed to rename log directory from C:\Users\AppData\Local\Temp\EH4Test7267133751803693562\healthchecktopic1516728986980-0 to C:\Users\AppData\Local\Temp\EH4Test7267133751803693562\healthchecktopic1516728986980-0.65fc6c32c44940e58c1a45bd2972523a-delete
at kafka.log.LogManager.asyncDelete(LogManager.scala:671)
I think the Warning is all right. But I do not know why I would get errors, although I run the Eclipse as administrator. Especially, the KafkaStorageException, I still have 50GB in my computer.
Environment:
Windows 10
Zookeeper 3.5.3-beta
Kafka 1.0.0
looks like you have an invalid character in the properties: Invalid character ':' in value part of property; also in the line below it seems that the placeholder you are using it is not replaced properly: C:\Users\{My-topic-path}
Furthermore there is an open issues related to file operation such as moving/delete in windows environment, I got the same problem upgrading from 0.10.2.1 to 1.1.0
This is the link to the issue: KAFKA-1194

wso2 esb deploy failed on windows

I'm using WSO2 ESB 4.8.1 with JDK 1.7.0_67 x64 on windows 7 x64.
I'm deploying carbon application(.car) using any method:
maven car deploy plugin
web admin console
CarbonAppUploader web service
First deployment succeeds but log file contains:
CarbonAppUploader temp file: C:\Java\WSO2ES~1.1\bin\..\tmp\carbonappsuploads\first-esb_1.0.0.car deletion failed, scheduled deletion on server exit.
Second deployment of same car (name and version) fails with exception in logs (see below)
I Apologize for localized error message but generally it says cant overwrite this file.
If you check, it's actually locked for deletion. Looks like CarbonAppUploader class didn't properly close InputStream.
Strangely enough this bug is not reproducible in unix (centos)
Question to WSO2: do you plan to fix that?
Question to all: Did you meet such bug and how did you solve it?
exception stack trace (partially)
TID: [0] [ESB] [2014-08-18 22:04:58,254] ERROR {org.wso2.carbon.application.upload.CarbonAppUploader} - Error occurred while uploading Carbon App artifacts {org.wso2.carbon.application.upload.CarbonAppUploader}
java.io.FileNotFoundException: C:\Java\WSO2ES~1.1\bin\..\tmp\carbonappsuploads\first-esb_1.0.0.car (Запрошенную операцию нельзя выполнить для файла с открытой пользователем сопоставленной секцией)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
at org.wso2.carbon.application.upload.CarbonAppUploader.writeResource(CarbonAppUploader.java:78)
at org.wso2.carbon.application.upload.CarbonAppUploader.uploadApp(CarbonAppUploader.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
I checked out source code from svn, fixed bug myself. If anybody experiencing same issue, you may download sources and compiled jar from https://wso2.org/jira/browse/ESBJAVA-3272
Hopefully this bug fix will be included in next releases

Oracle Data Integrator (ODI - v11.1.1.3) "unable to load language: beanshell" Error

Following an install of Eclipse 3.7.2 on my Ubuntu 12.04 development machine, I have been unable to execute any ODI packages/interfaces/procedures. On execution (for both simulated and actual runs), an error is thrown (java trace below). I am not sure if it's anything to do with the Eclipse install, but it seems likely. Does anyone have an idea how to fix this?
Also, when launching ODI from the terminal using 'bash odi', the following error is displayed in the terminal:
2013-08-15 14:43:46.162 ERROR Error during RuntimeClassLoader initialization. ODI will start without RuntimeClassLoader
Error output:
oracle.odi.core.exception.OdiRuntimeException: Error during Code Interpretor creation
at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.getInstance(SnpCodeInterpretor.java:209)
at com.sunopsis.dwg.codeinterpretor.SnpGeneratorSQLCIT.<init>(SnpGeneratorSQLCIT.java:300)
at com.sunopsis.graphical.dialog.SnpsDialogExecution.doPackageExecuter(SnpsDialogExecution.java:907)
at oracle.odi.ui.action.SnpsPopupActionExecuteHandler.actionPerformed(SnpsPopupActionExecuteHandler.java:68)
at oracle.odi.ui.SnpsActionControler.handleEvent(SnpsActionControler.java:75)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:884)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2489)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:674)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:633)
at java.awt.EventQueue$2.run(EventQueue.java:631)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:647)
at java.awt.EventQueue$3.run(EventQueue.java:645)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:644)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: org.apache.bsf.BSFException: unable to load language: beanshell
at org.apache.bsf.BSFManager.loadScriptingEngine(BSFManager.java:718)
at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.loadEngine(SnpCodeInterpretor.java:85)
at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.<init>(SnpCodeInterpretor.java:75)
at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.getInstance(SnpCodeInterpretor.java:184)
... 45 more
After digging around for about a day on this issue, I brazenly tried running ODI as the root user on the off chance that this was a permissions issue. I started ODI from the command line (using 'bash odi') for greater verbosity, and it loaded without the error mentioned above. Something gave me the impression that this wasn't a permissions issue, but one related to the user settings.
To rectify the issue, I removed my user's odi settings folder (renaming it, for safety):
mv ~/.odi ~/.backup_odi
Then I started ODI from the terminal under my own user (i.e. not root) - there were no errors! None of my connections were available in the new settings folder though. This I fixed by closing ODI and entering the following:
cp ~/.backup_odi/oracledi/snps_login_work.xml ~/.odi/oracledi/
If anybody else encounters this issue, I hope you find this post quicker than it took me to fix it!
org.apache.bsf.BSFException: unable to load language: beanshell
The exception was thrown because bsh-2.Ob4.jar was not in the classpath and it is a dependent jar of bsf.jar

Maven release plugin throwing Hostname Not found exception?

I am trying to release a project in jenkins and getting a host not found exception.
Caused by: java.lang.RuntimeException: java.net.UnknownHostException: XXXXXXXXXXXXXXX: nodename nor servname provided, or not known
at org.apache.maven.scm.provider.perforce.PerforceScmProvider.generateDefaultClientspecName(PerforceScmProvider.java:420)
at org.apache.maven.scm.provider.perforce.PerforceScmProvider.getClientspecName(PerforceScmProvider.java:395)
at org.apache.maven.scm.provider.perforce.command.checkout.PerforceCheckOutCommand.executeCheckOutCommand(PerforceCheckOutCommand.java:75)
at org.apache.maven.scm.command.checkout.AbstractCheckOutCommand.executeCommand(AbstractCheckOutCommand.java:82)
at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59)
Reading through the source it looks like the exception is thrown on this line:
InetAddress.getLocalHost().getHostName();
Since I don't control the source for the release plugin other than changeing the code is there some way to work around this issue?
I found out the work around. on command line run the command
hostname <your-ip or actual-hostname>

Resources