mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-25 14:15:59 +03:00
[GH-ISSUE #1154] LGSM recently blocks nested sessions #905
Labels
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LinuxGSM#905
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CasperAlant on GitHub (Oct 25, 2016).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/1154
I run multiple LGSM servers on the same machine. I create a tmux session for each user and login with that user account and run LGSM as a nested session.
I've been doing this for more than a year now and it has worked flawlessly. I installed a new server on 2016-10-13 with no problem. When I did the same today, I got the following errors:
[ FAIL ] Install csgo-server: tmuxception error: Sorry Cobb you cannot start a tmux session inside of a screen session.
Information! LGSM creates a tmux session when starting the server.
Tmux allows nested sessions.
@CasperAlant commented on GitHub (Oct 25, 2016):
I bypassed the error by commenting out the following lines in ~/lgsm/functions/check_tmuxception.sh:
fn_check_is_in_tmux
fn_check_is_in_screen
@dgibbs64 commented on GitHub (Oct 25, 2016):
How are you running LGSM within a tmux session? Unless you are only using debug mode
@CasperAlant commented on GitHub (Oct 25, 2016):
The only funny part is when I run ./csgoserver console, the server console is a nested tmux session. So you need to double Ctrl+B to control the inner session.
@UltimateByte commented on GitHub (Oct 25, 2016):
How come does it even work ? Other people got errors all around. What's the point of nesting tmux sessions ?
@CasperAlant commented on GitHub (Oct 25, 2016):
I've never received any errors doing this. The only problem I can recall is to give LGSM user accounts permission to usermod -a -G tty user.
My reason for doing this is so that I don't need to login to the LGSM user account every time I want to change or do something on a server.
I have an open tmux session for every server like this:
casper@_host-machine_:~$ tmux list-sessions
csgo_prac_server_1: 1 windows (created Tue Oct 25 06:53:32 2016) [204x61]
csgo_server_1: 1 windows (created Tue Oct 11 06:26:34 2016) [204x61]
csgo_server_2: 1 windows (created Tue Oct 11 06:39:57 2016) [204x61]
csgo_server_3: 1 windows (created Tue Oct 11 06:41:49 2016) [204x61]
csgo_server_4: 1 windows (created Tue Oct 11 06:43:03 2016) [204x61]
csgo_server_5: 1 windows (created Tue Oct 11 06:44:31 2016) [204x61]
csgo_server_6: 1 windows (created Tue Oct 11 06:45:33 2016) [204x61]
csgo_server_7: 1 windows (created Tue Oct 11 06:55:44 2016) [204x61]
csgo_server_8: 1 windows (created Tue Oct 11 06:56:50 2016) [204x61]
Each of the sessions is logged into a user account with the same name. Those user accounts are my LGSM accounts, each running a game server.
I'm running Ubuntu Server 15.10 with tmux 2.0.
@UltimateByte commented on GitHub (Oct 25, 2016):
Well, issues happen with tmux < 2.0 for sure, debian 8 for example uses tmux 1.9 and this fails.
Here is for example the output people will usually got when trying to nest tmux sessions together:
So i'm personally OK to allow tmux inside tmux (even if i think it's incredibly stupid) if we can find the condition that determines if it will work or not. My guess is that it's not as simple as checking tmux version, but i could be wrong.
@cedarlug commented on GitHub (Oct 25, 2016):
I believe the distinction here is that we want to prevent the end-user of lgsm from running tmux inside of tmux.
But what @CasperAlant wants to do is to run tmux as the super-lgsm user where he then su's to the actual lgsm end-user to fire up the game-specific tmux session.
So if the the TMUX environment is set, but the tmux pty isn't owned by the current user (owned by "casper" instead of csgoserver, for example), then allow it?
@CasperAlant commented on GitHub (Oct 25, 2016):
Yes, @cedarlug, that is how I run my lgsm servers.
I just did a test where I logged in as a LGSM user, started a tmux session as that user and ran ./csgoserver start. In this case, it does indeed throw an error as @UltimateByte described:
@cedarlug commented on GitHub (Oct 25, 2016):
@CasperAlant - do you
sudo su csgo_server_1or ???You shouldn't have any errors if you included the dash:
sudo su - csgo_server_1and then start the game as usual.How do you switch to your sub accounts?
@dgibbs64 commented on GitHub (Oct 25, 2016):
@CasperAlant It would be a good idea if you could work with us to ensure that we can still prevent users from starting LGSM within a tmux session but still being able to achieve your goal. Since @cedarlug appears to know what you need to do it would be great if you guys could collaborate on this and put forward a fix for this. I'm am happy to accept a pull requests for this issue
@UltimateByte commented on GitHub (Oct 25, 2016):
Well in your case it's not a stupid usage at all but rather a controlled and clever way, so don't take account for what i said before.
So @CasperAlant @cedarlug feel free to pull request (to devbranch) needed changes so that this usage is allowed.
https://github.com/GameServerManagers/LinuxGSM/blob/development/lgsm/functions/check_tmuxception.sh
@cedarlug commented on GitHub (Oct 25, 2016):
It may already allow what @CasperAlant wants to do. @CasperAlant, could you describe how you're transitioning from the casper account to the game-specific accounts? (See my question above.)
@CasperAlant commented on GitHub (Oct 26, 2016):
I log in using
suas you described. With or without the dash, ${TERM} is still set to "screen" which caused fn_check_is_in_screen to trigger. The last commit I made allows checking for a screen session without this issue.@UltimateByte commented on GitHub (Nov 9, 2016):
This has been merged to master. Please re-open if it's not fixed, but should be fine now.
@lock[bot] commented on GitHub (Jul 19, 2018):
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.