Skip to content

Surface stderr from failing proxy command #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
spikecurtis opened this issue Dec 6, 2023 · 2 comments
Open

Surface stderr from failing proxy command #335

spikecurtis opened this issue Dec 6, 2023 · 2 comments
Assignees

Comments

@spikecurtis
Copy link
Collaborator

Some users are reporting trouble connecting to their workspaces, and receive an error "Server closed connection during identification exchange" on the "Choose IDE and project for workspace ... " screen.

Stack trace is:

java.lang.Throwable: Failed to retrieve IDEs (attempt 1; will retry in 5000 ms)
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:370)
	at com.coder.gateway.views.steps.CoderLocateRemoteProjectStepView$onInit$1$ides$2.invoke(CoderLocateRemoteProjectStepView.kt:212)
	at com.coder.gateway.views.steps.CoderLocateRemoteProjectStepView$onInit$1$ides$2.invoke(CoderLocateRemoteProjectStepView.kt:186)
	at com.coder.gateway.sdk.RetryKt.suspendingRetryWithExponentialBackOff(Retry.kt:63)
	at com.coder.gateway.sdk.RetryKt$suspendingRetryWithExponentialBackOff$1.invokeSuspend(Retry.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at com.intellij.openapi.application.impl.DispatchedRunnable.run(DispatchedRunnable.kt:43)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:208)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:190)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
	at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:478)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:121)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:690)
	at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:593)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWithoutImplicitRead(ApplicationImpl.java:1485)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:593)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:997)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:997)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
@code-asher
Copy link
Member

code-asher commented Dec 12, 2023

We identified that the issue was the proxy command failed because the header command provided to the plugin was failing.

I wonder if it is possible to surface a better error instead of just "server closed", but I think it depends on whether the error returned by the Gateway API contains that information in some way or if it really is just "server closed".

If it does not, maybe there is something else we can do to suss out problems with the header command, like running SSH ourselves just as a sanity check before we call out to Gateway's stuff.

@code-asher code-asher changed the title Server closed connection during identification exchange Show error from failing ssh command Jun 19, 2024
@code-asher code-asher changed the title Show error from failing ssh command Surface from failing ssh command Jun 19, 2024
@code-asher
Copy link
Member

Renamed the issue to somehow surface an error from running the proxy command. We had another issue where it was failing because the agent was shutting down but this was not being shown directly to the user.

@code-asher code-asher changed the title Surface from failing ssh command Surface stderr from failing ssh command Jun 19, 2024
@code-asher code-asher changed the title Surface stderr from failing ssh command Surface stderr from failing proxy command Jun 19, 2024
@Kira-Pilot Kira-Pilot added enhancement and removed bug labels Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants