Container console error

I am getting this error when I go to the console tab of my container. Anyone knows what does it means?


You probably just don’t have a password set up for your user. The terminal can be an alternative depending on your use case as well. If you wish to use the Console just go to the Terminal and set up a password for your user. If that user is root, just run sudo passwd root.

I just created the container without passing cloud.init for user. Now When I go to the console tab it loads and I get the warning in my logs. I used the terminal too but I do not want to give the root user access to the users. console is the best option which suits my use case.

Got it, I missed the snapshot with the logs before and it seems odd to me. Does setting a password with sudo passwd <user> on the terminal help?

Would you mind sharing the output of lxc config show kjb --expanded?

Also, does this happen for any new container?

yes this happens for all the containers when I go to the console tab

I do not want to give the root user access to the users

Could you elaborate on this? The root user has full control of the system and of the other users. If you want to stablish some kind of multitenancy, we have projects to support such use cases and you can also set up SSH keys to log into instances as a particular users.

I want to only give the console access to users not terminal. I am accessing the console via rest-api I create the container user via cloud.init I was just asking what is causing the warning when I go to the console tab in lxd-ui

Hello, thank you for your request.

If you restricted terminal access for the root user, the error might come from browsing the terminal tab in the instance detail page of the UI. The terminal tab opens a web socket connection, and if that fails, it can produce the error in the log.

You may already be familiar with the statements below, but I’m sharing them here in case they’re helpful:

To interact with the console, you need to log in with a valid user and password. If you do not know the password, you can reset it from the command line with this command.

lxc exec kjb passwd

This assumes the instance name is kjb and the instance is living in the project default. It will prompt you for a new password, and ask for confirmation.

After succeeding, you can log in in the UI with the username root and the password chosen with the command.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.