You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Serial console shows "Connected" when instance is not running #2169
I have an instance that is stopped. When I navigate to its serial console in the console, it shows a blank terminal (as one would expect), but also "Connected" in the lower right. No errors display.
When I try to do the same thing in the CLI, I get:
$ oxide instance serial console --project iliana --instance axiomatic
Connection closed: Error
Server error: Invalid Request: instance is stopped and has no active serial console server
I don't know that Firefox is seeing the error; it's not showing up in the network console at all where you can usually observe the websocket traffic. Here's one from the serial console of a running instance:
But when connecting to a stopped instance I see no messages whatsoever.
The error message you see in the CLI comes from an error response from the API — maybe we're ignoring errors on the initial attempt to upgrade the connection? Or maybe something stranger is happening and API is handling the request from the browser differently.
When I connect to a stopped instance I get a 101, which I guess we take as a kind of success, and then nothing else. Will need to look closer at what the CLI is doing to get that error.
our websocket endpoints unconditionally upgrade (101) -- the thing to look for is a websocket Close message, with the relevant error message appearing as a Close Code.
Activity
david-crespo commentedon Apr 19, 2024
We're displaying the status we think it is, so there must be something wrong with our error handling:
console/app/pages/project/instances/instance/SerialConsolePage.tsx
Lines 83 to 97 in 629c94a
console/app/pages/project/instances/instance/SerialConsolePage.tsx
Lines 121 to 123 in 629c94a
iliana commentedon Apr 19, 2024
I don't know that Firefox is seeing the error; it's not showing up in the network console at all where you can usually observe the websocket traffic. Here's one from the serial console of a running instance:
But when connecting to a stopped instance I see no messages whatsoever.
david-crespo commentedon Apr 19, 2024
The CLI isn't doing anything too exciting.
https://github.com/oxidecomputer/oxide.rs/blob/bc90ca23109b9e699472bdda4867e4f93d18da1a/cli/src/cmd_instance.rs#L109-L129
The error message you see in the CLI comes from an error response from the API — maybe we're ignoring errors on the initial attempt to upgrade the connection? Or maybe something stranger is happening and API is handling the request from the browser differently.
https://github.com/oxidecomputer/omicron/blob/77fffe5e3492c471f9fd176d54e9cdce51c6e0ff/nexus/src/app/instance.rs#L1828-L1833
david-crespo commentedon Apr 19, 2024
When I connect to a stopped instance I get a 101, which I guess we take as a kind of success, and then nothing else. Will need to look closer at what the CLI is doing to get that error.
lifning commentedon May 15, 2024
our websocket endpoints unconditionally upgrade (101) -- the thing to look for is a websocket Close message, with the relevant error message appearing as a Close Code.
david-crespo commentedon May 15, 2024
Thanks @lifning, that was exactly what I needed to hear. Notice anything just very slightly off here?
console/app/pages/project/instances/instance/SerialConsolePage.tsx
Line 89 in 629c94a
https://developer.mozilla.org/en-US/docs/Web/API/WebSocket#events