Comments (4)
- Is it fine to move this to Q&A discussions? (it would close this thread but move it to a Question format)
While I can't give support, some troubleshooting ideas:
-
Whether
wsgi
is involved is probably not relevantBetween Ubuntu 20.04 and 22.04, the tmux version may have shifted
-
libtmux version?: e.g.
pip show libtmux
Through the wsgi application, try subprocess.run
and see how subprocess.run(['tmux', 'list-sessions'])
reacts. If that was in the code where libtmux normally is, it will be the most barebones way see what tmux
itself is doing based on the app's environmental conditions.
Guess / shot in the dark: it may be that either the tmux server isn't alive while the app is running (but the console is automatically creating a server while you use it, and persisting it since a client is attached). It may be needed to initialize a server via libtmux, e.g.
if not server.is_alive():
server.new_session()
from libtmux.
Hey Tony :-)
Yup - they are the exact two tmux versions involved (3.0a and 3.2a).
tmux 3.3 adds an -a (user access) switch, but the tmux changelog between the mentioned versions shows nothing that's relevant.
libtmux was 0.21.1 on the old host, and 0.23.2 is on the new one. I've stepped back through every version to 0.21.1 in the course of troubleshooting.
Will try subprocess.run() shortly, but see next...
I should have been clearer about the fact that I meant the app runs in the console and via wsgi simultaneously. And that, by the time either instance is fired, systemd and a bash script have already created the server and session (and runs the python app in a tmux window) after which the python app attaches to the session and further fires up around 80 processes, which each get a tmux window. Then I generally attach to the session myself in an ssh terminal and interact with the python process in one of the tmux windows. So the server and session are definitely running the entire time :-)
I don't expect you to provide support, but am very appreciative that you're doing so anyways. I've been on this for several days now, and been rather thorough / extensive, to no avail. Something has changed somewhere, but I just can't pick it...
from libtmux.
Soooo, your suggestion (subsystem.run()) led me to finding the problem and thus the solution...
In the systemd unit file for gunicorn, we had set PATH as an env var. And only included the venv's bin/ folder.
Adding /usr/bin fixed it.
Doesn't explain why moving the apache / wsgi config file across from the old host also exhibited the same problem, but we were always gonna shift to nginx / gunicorn anyways, so all's well that ends well :-)
Thanks soooo much for your time and help. You're a champ!!
from libtmux.
Good it got figured out, thanks for the explanation as well, other's may find that handy.
from libtmux.
Related Issues (20)
- Dataclasses: Add field that maps attribute <-> formatter HOT 1
- pytest-xdist issues when libtmux > v0.16.1 HOT 14
- fetch_objs breaks when buffer_sample contains pipe symbol |
- The parse of list-panes output breaks when the screen buffer contains pipe symbol HOT 6
- Tests failing on ppc64le HOT 2
- Tests failing on aarch64 HOT 2
- Tests failing on armv7l HOT 3
- Intermittent errors with tests on x86_64 / amd64 HOT 7
- Intermittent errors with tests on i586 (32bit)
- Is there any way to connect to a tmux session on a remote machine? HOT 1
- Intermittent / flaky test test_capture_pane
- select_pane not working correctly with multiple sessions HOT 2
- Drop Python 3.7 HOT 1
- `build(build-system)`: Remove `setuptools` build dependency
- unknown pytest option --doctest-docutils-modules HOT 7
- `TmuxObjectDoesNotExist` when creating `libtmux.Server().new_session(attach=True)` HOT 13
- Remove assert from __eq__ for windows HOT 5
- Tests failing with "FileNotFoundError: [Errno 2]" and "Unknown directive type: 'currentmodule' [myst.directive_unknown]" HOT 6
- Tests: Snapshots
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libtmux.