I have some troubles with deployment project configuration in PhpStorm7.0 (I have the same problem in IDE WebStrom)
When I trying to connect through ftp - everything fine.
But if choice sftp - I have this error:
Test SFTP Connection
Connection to 'echuvelev.ihc.ru'
Java.lang.ArrayIndexOutOfBoundsException
Logs:
2014-08-19 14:06:29,038 [ 73753] WARN - loyment.ui.WebServerConfigForm - Could not connect to SFTP server at "sftp://echuvelev.ihc.ru/".
org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at "sftp://echuvelev.ihc.ru/".
at org.apache.commons.vfs2.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:108)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getFileSystem(AbstractOriginatingFileProvider.java:102)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:80)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:64)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:698)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:624)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.createConnection(RemoteConnectionPool.java:139)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionManager.openConnection(RemoteConnectionManager.java:103)
at com.jetbrains.plugins.webDeployment.PublishUtils$1$1.run(PublishUtils.java:115)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:420)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:150)
Caused by: org.apache.commons.vfs2.FileSystemException: Error during processing known-hosts file "/Users/echuvelev/.ssh/known_hosts".
at org.apache.commons.vfs2.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:126)
at org.apache.commons.vfs2.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:97)
... 16 more
Caused by: com.jcraft.jsch.JSchException: java.lang.ArrayIndexOutOfBoundsException: 403
at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:235)
at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:60)
at com.jcraft.jsch.JSch.setKnownHosts(JSch.java:299)
at org.apache.commons.vfs2.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:122)
... 17 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 403
at com.jcraft.jsch.Util.fromBase64(Util.java:53)
at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:221)
... 20 more
I tried reinstall all IDE (with removing cache, setting in Library dir), but it doesn't help me.
Any ideas?
p.s ssh work fine with this server in console, i have this problem only in IDE, and only with sftp protocol.
I found solution in this ticket youtrack.jetbrains.com/issue/WI-12925#comment=27-580440
It's the same problem with known_hosts file.
Solution:
Try to backup and remove .ssh/known_hosts file, and recreate it adding hosts when needed.
Related
We PUT file on some SFTP server and then run spring batch.when spring batch run below steps were executed.
pick file from FTP location
process the file.
delete file.
we are facing below exception while spring batch performing above steps.
ERROR org.springframework.integration.handler.LoggingHandler: 140 - org.springframework.integration.MessagingException: Problem occurred while synchronizing remote to local directory
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:189)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizingMessageSource.receive(AbstractInboundFileSynchronizingMessageSource.java:162)
at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:111)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:184)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:51)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:143)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:141)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:273)
at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:268)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.springframework.integration.MessagingException: Failed to execute on session
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:306)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:163)
... 21 more
Caused by: org.springframework.core.NestedIOException: Failed to remove file: 2: Specified file path is invalid.
at org.springframework.integration.sftp.session.SftpSession.remove(SftpSession.java:83)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.copyFileToLocalDirectory(AbstractInboundFileSynchronizer.java:230)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.access$100(AbstractInboundFileSynchronizer.java:59)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer$1.doInSession(AbstractInboundFileSynchronizer.java:172)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer$1.doInSession(AbstractInboundFileSynchronizer.java:163)
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:297)
... 22 more
Perhaps a security issue - maybe you don't have delete permissions.
The exact same path is used for the fetch and when deleting (if configured to delete the remote file after retrieval). Clearly the fetch worked ok because we're now in the delete phase.
You should consult the server logs.
I'm using Egit with Eclipse on Windows to try to clone a repository from private Git. It connects, but while downloading I get the "Packfile is truncated" error. My web browser and file explorer are both closed. Does anyone know what the problem could be?
org.eclipse.jgit.api.errors.TransportException: Packfile is truncated.
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:187)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:127)
at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:156)
at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard.executeCloneOperation(AbstractGitCloneWizard.java:433)
at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard.access$2(AbstractGitCloneWizard.java:426)
at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard$5.run(AbstractGitCloneWizard.java:387)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: org.eclipse.jgit.errors.TransportException: Packfile is truncated.
at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:370)
at org.eclipse.jgit.transport.TransportHttp$SmartHttpFetchConnection.doFetch(TransportHttp.java:783)
at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:301)
at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:291)
at org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:247)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:160)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
... 7 more
Caused by: java.io.EOFException: Packfile is truncated.
at org.eclipse.jgit.transport.PackParser.fill(PackParser.java:1138)
at org.eclipse.jgit.transport.PackParser.access$000(PackParser.java:97)
at org.eclipse.jgit.transport.PackParser$InflaterStream.read(PackParser.java:1663)
at java.io.InputStream.read(Unknown Source)
at org.eclipse.jgit.transport.PackParser.whole(PackParser.java:983)
at org.eclipse.jgit.transport.PackParser.indexOneObject(PackParser.java:916)
at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:487)
at org.eclipse.jgit.internal.storage.file.ObjectDirectoryPackParser.parse(ObjectDirectoryPackParser.java:194)
at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:448)
at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:762)
at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:363)
... 15 more
If somebody is getting the same error. The problem was that my internet connection was too slow, and the server has a timeout of 30 seconds.
Tried on a faster internet, worked fine.
Periodically our Glassfish 4.1 installation seems to be unable to allow the WSDL for our Web service to be available. When I try to reach it through my browser it gives a "connection was reset" error. The typical stack trace from our java applications that consume the services get when this happens is included below. Any ideas what could be causing this? Thanks!
javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://venus:9090/USProjectServices/LingoAtTaskService?wsdl. It failed with:
Got Unexpected end of file from server while opening stream from http://venus:9090/USProjectServices/LingoAtTaskService?wsdl.
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:173)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:155)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:120)
at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:260)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:223)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:171)
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:96)
at javax.xml.ws.Service.<init>(Service.java:77)
at com.lingosys.ws.LingoAtTaskService.<init>(LingoAtTaskService.java:42)
at com.ws.test.Tester1.<init>(Tester1.java:27)
at com.ws.test.Tester1.main(Tester1.java:45)
Caused by: java.io.IOException: Got Unexpected end of file from server while opening stream from http://venus:9090/USProjectServices/LingoAtTaskService?wsdl
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:842)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:283)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:140)
... 9 more
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:718)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:579)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:715)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:579)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1322)
at java.net.URL.openStream(URL.java:1037)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:827)
... 11 more
I am getting repeatedly below error while running java application on IBM - WebSphere Application Server.
[ 00000024 TCP E org.jgroups.protocols.TP$IncomingPacket run failed handling incoming message
java.io.IOException: failed reading header
at org.jgroups.Message.readHeader(Message.java:757)
at org.jgroups.Message.readFrom(Message.java:643)
at org.jgroups.protocols.TP.readMessage(TP.java:1502)
at org.jgroups.protocols.TP.access$700(TP.java:49)
at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1804)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:906)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:929)
at java.lang.Thread.run(Thread.java:773)
Caused by: java.io.EOFException
at java.io.DataInputStream.readShort(DataInputStream.java:309)
at org.jgroups.Message.readHeader(Message.java:734)
... 7 more
java.io.IOException: failed reading header
at org.jgroups.Message.readHeader(Message.java:757)
at org.jgroups.Message.readFrom(Message.java:643)
at org.jgroups.protocols.TP.readMessage(TP.java:1502)
at org.jgroups.protocols.TP.access$700(TP.java:49)
at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1804)
at java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:1763)
at org.jgroups.util.ShutdownRejectedExecutionHandler.rejectedExecution(ShutdownRejectedExecutionHandler.java:39)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:779)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:667)
at org.jgroups.protocols.TP.dispatchToThreadPool(TP.java:1354)
at org.jgroups.protocols.TP.receive(TP.java:1321)
at org.jgroups.protocols.BasicTCP.receive(BasicTCP.java:258)
at org.jgroups.blocks.BasicConnectionTable.receive(BasicConnectionTable.java:239)
at org.jgroups.blocks.BasicConnectionTable$Connection.run(BasicConnectionTable.java:664)
at java.lang.Thread.run(Thread.java:773)
Caused by: java.io.EOFException
at java.io.DataInputStream.readShort(DataInputStream.java:309)
at org.jgroups.Message.readHeader(Message.java:734)
... 14 more
Application has file export operation. Somehow files are deleted from specified location and whenever I try to run application through above exception continuously. I tried killing java but that too do not help.
Please suggest how to resolve.
Stop IBM Webservice application already started services from services.msc :)
I'm trying to implement the RMI Compute PI tutorial found on the Sun/Oracle website here. The server is located on an Amazon windows EC2 Server. The client is located on my personal computer at home. Just to keep things simple, I have disabled the firewall on the server and open all the port on the EC2 security group. I can ping the machine, have access to files, etc... My aim is just to have a basic RMI program worked on AWS. I will oversee security issues later.
Lauching the server is not a problem. And it's correctly bound to the RMI Registry. I'm using the following command to launch it :
java -Djava.security.manager -Djava.security.policy=C:\AWSTest\security.policy -Djava.rmi.server.codebase=file:/C:/AWS/Sources/sun-rmi-tutorial-server/bin/ file:/C:/AWS/Sources/sun-rmi-tutorial-common/bin/ -classpath C:\AWS\Sources\sun-rmi-tutorial-server\bin;C:\AWS\Sources\sun-rmi-tutorial-common\bin engine.ComputeEngine ec2-XX-XX-XX-XXX.ap-southeast-1.compute.amazonaws.com
The RMI registry is started on the server side.
I have declared a new security manager on the server side System.setSecurityManager(new RMISecurityManager())
I'm using a security.policy file where I'm granted all permission.
When I'm launching the client side, on my local computer, I'm ending with an UnmarshalException:
ComputePi exception: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: engine.ComputeEngine_Stub
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: engine.ComputeEngine_Stub
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:101)
at client.ComputePi.main(ComputePi.java:14)
Caused by: java.lang.ClassNotFoundException: engine.ComputeEngine_Stub
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:453)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:184)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:264)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:216)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1593)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
... 3 more
Do you have any suggestions of what is wrong ? Why can't the client find the correct Stub ? I'm using Eclipse Juno, Genady RMI Plugin and Java 1.7.0_07.
Thanks for your help
EDIT 1 :
The Java workspace is organized around 3 projects : the Client side, the Server Side and a Common project where both the server and the client share classes.
I can read the remote registry from my local computer. The RMI plugin can connect remotely to the server and inspect the registry.
If instead of making 3 projects I put all the classes under the same project, everything is working fine... But I notice that no stubs where generated (or needed).
If, on the client side, I'm putting a reference in the classpath to the server classes (everything being build locally), i have a connection timeout error instead of the unmarshalling error.
ComputePi exception: Connection refused to host: XX.XXX.XX.XX; nested exception is:
java.net.ConnectException: Connection timed out: connect
java.rmi.ConnectException: Connection refused to host: XX.XXX.XXX; nested exception is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128)
at engine.ComputeEngine_Stub.executeTask(ComputeEngine_Stub.java:35)
at client.ComputePi.main(ComputePi.java:19)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.(Socket.java:425)
at java.net.Socket.(Socket.java:208)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 5 more
You haven't deployed the stub class to the client.