Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332368 - [efs] cannot close project on a remote EFS host if host becomes unavailable
Summary: [efs] cannot close project on a remote EFS host if host becomes unavailable
Status: NEW
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: dsdp.tm.rse-inbox CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-11 15:07 EST by Rafael Chaves CLA
Modified: 2011-07-22 07:46 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Chaves CLA 2010-12-11 15:07:05 EST
No clue if this the right component to report against.

I import a remote directory as a remote project. When the host goes offline (for instance, VPN session closed), the remote project becomes useless, and the fact that it is still around makes several operations in the workspace fail due to attempts to access unavailable resources (global search), not to mention that the resource and class indexes are littered with things I can't load any longer. The standard way to avoid that in Eclipse is to close the project. But the project cannot be closed because closing fails due to the fact he host is not available.

Workaround is to restart Eclipse (but that also causes similar failures to occur).

eclipse.buildId=2.3.2.201003230009-RELEASE
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_CA
Framework arguments:  -product com.springsource.sts.ide
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product com.springsource.sts.ide

This is a continuation of log file C:\dev\trunk-sts\.metadata\.bak_0.log
Created Time: 2010-12-11 11:09:59.447


Error
Sat Dec 11 11:33:01 PST 2010
An internal error occurred during: "Close Project".

java.lang.RuntimeException: org.eclipse.core.runtime.CoreException: Could not connect to host: 192.168.10.142 subsystem ssh.files
at org.eclipse.rse.internal.efs.RSEFileStore.fetchInfo(RSEFileStore.java:266)
at org.eclipse.core.internal.localstore.FileSystemResourceManager.hasSavedDescription(FileSystemResourceManager.java:467)
at org.eclipse.core.internal.resources.SaveManager.saveMetaInfo(SaveManager.java:1155)
at org.eclipse.core.internal.resources.SaveManager.save(SaveManager.java:1068)
at org.eclipse.core.internal.resources.SaveManager.save(SaveManager.java:991)
at org.eclipse.core.internal.resources.Project.close(Project.java:169)
at org.eclipse.ui.actions.CloseResourceAction.invokeOperation(CloseResourceAction.java:129)
at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:162)
at org.eclipse.ui.actions.WorkspaceAction$2.runInWorkspace(WorkspaceAction.java:483)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.core.runtime.CoreException: Could not connect to host: 192.168.10.142 subsystem ssh.files
at org.eclipse.rse.internal.efs.RSEFileStoreImpl.getConnectedFileSubSystem(RSEFileStoreImpl.java:256)
at org.eclipse.rse.internal.efs.RSEFileStoreImpl.getRemoteFileObject(RSEFileStoreImpl.java:318)
at org.eclipse.rse.internal.efs.RSEFileStoreImpl.getRemoteFileObject(RSEFileStoreImpl.java:305)
at org.eclipse.rse.internal.efs.RSEFileStoreImpl.fetchInfo(RSEFileStoreImpl.java:496)
at org.eclipse.rse.internal.efs.RSEFileStore.fetchInfo(RSEFileStore.java:275)
at org.eclipse.rse.internal.efs.RSEFileStore.fetchInfo(RSEFileStore.java:257)
... 10 more
Caused by: org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException: Failed to connect sshd on "192.168.10.142:22"
at org.eclipse.rse.internal.connectorservice.ssh.SshConnectorService.internalConnect(SshConnectorService.java:197)
at org.eclipse.rse.core.subsystems.AbstractConnectorService.connect(AbstractConnectorService.java:415)
at org.eclipse.rse.core.subsystems.SubSystem.connect(SubSystem.java:2527)
at org.eclipse.rse.internal.efs.RSEFileStoreImpl.getConnectedFileSubSystem(RSEFileStoreImpl.java:253)
... 15 more
Comment 1 Rafael Chaves CLA 2010-12-11 15:11:46 EST
Remote System Explorer End-User Runtime 3.1.2.R31x_v200911051655
RSE Core 3.1.1.v200907301400
RSE SSH Services 3.0.1.v200909160005
Build id: I20090916-0905
Comment 2 Martin Oberhuber CLA 2010-12-15 06:13:51 EST
I think this belongs to Platform Resources. 

Closing a project should be possible even if there are errors accessing files on disk ... user intended to get rid of the project, so this should succeed or the user is locked-up. We shouldn't have any cached in-memory data at this point that can't be restored from disk at a later point.

Rafael, as a workaround you should create a LOCAL project and then create a linked resource pointing to your remote files, that's the recommended workflow due to the known limitations with remote projects (especially bug 181460).

That being said, I see people use remote projects again and again. It's briefly mentioned in the TM and RSE FAQ (point 5 here: http://wiki.eclipse.org/TM_and_RSE_FAQ#How_can_I_use_a_remote_workspace_over_SSH.3F ) but apparently that's not visible enough. I'd love to hear ideas how to make this more visible.
Comment 3 Martin Oberhuber CLA 2010-12-15 06:15:43 EST
Rafael, I cannot parse this : eclipse.buildId=2.3.2.201003230009-RELEASE
Does this relate to Galileo SR2 (Eclipse 3.5.2) ?
Comment 4 Szymon Brandys CLA 2010-12-15 09:45:04 EST
The problem is Project#saveMetaInfo which is a "sanity check to make sure there is something on disk before we shutdown". I think that if the file system goes offline, we could close the project anyway and just log a warning.
Comment 5 Martin Oberhuber CLA 2010-12-15 09:47:55 EST
+1 on the approach.
Comment 6 Martin Oberhuber CLA 2011-02-01 03:35:33 EST
We should make sure this isn't forgotten in 3.7 - it's a nasty usability problem and looks like there's a simple fix.
Comment 7 Szymon Brandys CLA 2011-03-24 10:57:16 EDT
Szymon P., please take a look at it.
Comment 8 Szymon Brandys CLA 2011-04-23 07:40:30 EDT
Moving to 3.8.
Comment 9 Szymon Ptaszkiewicz CLA 2011-07-22 07:45:11 EDT
I reviewed the code and it seems that RSE has wrong implementation of IFileStore#fetchInfo(). See javadoc for this method and compare to the changes made in bug 182006. I think that RSE should do the same thing in their code.
Comment 10 Szymon Ptaszkiewicz CLA 2011-07-22 07:46:34 EDT
Moving to RSE.