Open lapineige opened 1 year ago
Same probleme here.
I don't really know why it's happening π€
How can I help you to debug this ?
Hi,
Same problem here.
In the admin panel, the service "13ft" is down. Here is the error message:
janv. 26 12:43:06 systemd[1]: Started 13ft launcher service.
janv. 26 12:43:06 systemd[446]: 13ft.service: Failed to set up standard output: No such file or directory
janv. 26 12:43:06 systemd[446]: 13ft.service: Failed at step STDOUT spawning /var/www/13ft/venv/bin/python3: No such file or directory
janv. 26 12:43:08 systemd[1]: 13ft.service: Main process exited, code=exited, status=209/STDOUT
janv. 26 12:43:08 systemd[1]: 13ft.service: Failed with result 'exit-code'.
janv. 26 12:58:49 systemd[1]: Started 13ft launcher service.
janv. 26 12:58:49 systemd[11060]: 13ft.service: Failed to set up standard output: No such file or directory
janv. 26 12:58:49 systemd[11060]: 13ft.service: Failed at step STDOUT spawning /var/www/13ft/venv/bin/python3: No such file or directory
janv. 26 12:58:49 systemd[1]: 13ft.service: Main process exited, code=exited, status=209/STDOUT
janv. 26 12:58:49 systemd[1]: 13ft.service: Failed with result 'exit-code'.
Failed at step STDOUT spawning /var/www/13ft/venv/bin/python3: No such file or directory
Uh wait what ? It should be there π€
What's the result of /var/www/13ft/venv/bin/python3 /var/www/13ft/index.py
?
Can you try to install/upgrade to this branch ? https://github.com/YunoHost-Apps/13ft_ynh/pull/6
What's the result of
/var/www/13ft/venv/bin/python3 /var/www/13ft/index.py
?
Traceback (most recent call last):
File "/var/www/13ft/index.py", line 2, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
Can you try to install/upgrade to this branch ? #6
Sorry, I'm not a github expert. What URL should I use to update from this branch?
Edit: upgrading from https://github.com/YunoHost-Apps/13ft_ynh/tree/testing makes the error message disappear. But doesn't solve the first problem as you noticed.
Ok, so we have the same issue. The branch you tested, and that I just merged (normal upgrade will do now :).
The service is now working, but I don't know what the issueβ¦
The 13ft code is very simple, I do not see any reasons that this should happen. You could try adding some print statements in between the code (in the file used for yunohost) and then see what happens.
i'have this logs
-- Journal begins at Sun 2022-12-04 21:17:01 CET, ends at Sun 2023-01-29 22:48:31 CET. -- janv. 24 22:55:27 systemd[1]: Started 13ft launcher service. janv. 24 22:55:27 systemd[157494]: 13ft.service: Failed to set up standard output: No such file or directory janv. 24 22:55:27 systemd[157494]: 13ft.service: Failed at step STDOUT spawning /var/www/13ft/venv/bin/python3: No such file or directory janv. 24 22:55:27 systemd[1]: 13ft.service: Main process exited, code=exited, status=209/STDOUT janv. 24 22:55:27 systemd[1]: 13ft.service: Failed with result 'exit-code'. -- Boot 9f5953ab12ce41568375fe76aaa64bc7 -- janv. 29 22:45:16 systemd[1]: Started 13ft launcher service. janv. 29 22:45:16 systemd[665195]: 13ft.service: Failed to set up standard output: No such file or directory janv. 29 22:45:16 systemd[665195]: 13ft.service: Failed at step STDOUT spawning /var/www/13ft/venv/bin/python3: No such file or directory janv. 29 22:45:16 systemd[1]: 13ft.service: Main process exited, code=exited, status=209/STDOUT janv. 29 22:45:16 systemd[1]: 13ft.service: Failed with result 'exit-code'.
Even with the latest version ?
i'have this logs
-- Journal begins at Sun 2022-12-04 21:17:01 CET, ends at Sun 2023-01-29 22:48:31 CET. -- janv. 24 22:55:27 systemd[1]: Started 13ft launcher service. janv. 24 22:55:27 systemd [157494]: 13ft.service: Failed to set up standard output: No such file or directory janv. 24 22:55:27 systemd [157494]: 13ft.service: Failed at step STDOUT spawning /var/www/13ft/venv/bin/python3: No such file or directory janv. 24 22:55:27 systemd[1]: 13ft.service: Main process exited, code=exited, status=209/STDOUT janv. 24 22:55:27 systemd[1]: 13ft.service: Failed with result 'exit-code'. -- Boot 9f5953ab12ce41568375fe76aaa64bc7 -- janv. 29 22:45:16 systemd [1]: Started 13ft launcher service. janv. 29 22:45:16 systemd[665195]: 13ft.service: Failed to set up standard output: No such file or directory janv. 29 22:45:16 systemd[665195]: 13ft.service: Failed at step STDOUT spawning /var/www/13ft/venv/bin/python3: No such file or directory janv. 29 22:45:16 systemd [1]: 13ft.service: Main process exited, code=exited, status=209/STDOUT janv. 29 22:45:16 systemd[1]: 13ft.service: Failed with result 'exit-code'.`
Same here in main and testing branch
Can you check if /var/www/13ft/venv/bin/python3
exists ?
And if yes, can you run /var/www/13ft/venv/bin/python3 /var/www/13ft/index.py
and share the result here ?
Can you check if
/var/www/13ft/venv/bin/python3
exists ?And if yes, can you run
/var/www/13ft/venv/bin/python3 /var/www/13ft/index.py
and share the result here ?
xxx@xxx:~$ sudo /var/www/13ft/venv/bin/python3 /var/www/13ft/index.py
* Serving Flask app 'index'
* Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://127.0.0.1:5000
Press CTRL+C to quit
* Restarting with stat
* Debugger is active!
* Debugger PIN: 135-782-041
xxx@xxx:~$ sudo tree /var/www/13ft/venv/bin/
/var/www/13ft/venv/bin/
βββ activate
βββ activate.csh
βββ activate.fish
βββ Activate.ps1
βββ easy_install
βββ easy_install-3.9
βββ flask
βββ normalizer
βββ pip
βββ pip3
βββ pip3.9
βββ python -> python3
βββ python3 -> /usr/bin/python3
βββ python3.9 -> python3
I don't understand the issue, the file is here, the service can start, but it failed π€
maybe it helps using files from python instead linking to it in the folder.
I don't understand your point. You mean file from the system python installation ? We use a virtual environment to avoid messing up with other packages.
Hello,
I managed to successfully launch the service by creating /var/log/13ft/ which didn't existed
systemctl status 13ft β 13ft.service - 13ft launcher service Loaded: loaded (/etc/systemd/system/13ft.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2023-05-23 12:15:42 CEST; 41s ago Main PID: 62963 (python3) Tasks: 3 (limit: 8691) Memory: 41.6M CPU: 523ms CGroup: /system.slice/13ft.service ββ62963 /var/www/13ft/venv/bin/python3 /var/www/13ft/index.py ββ62965 /var/www/13ft/venv/bin/python3 /var/www/13ft/index.py
Now the service is ok but still every request is redirected to the SSO.
Nothing in the logs :
/var/log/13ft# tail -f 13ft.log
Hi, sorry, not hugely familiar with Yunohost.
But this file: https://github.com/YunoHost-Apps/13ft_ynh/blob/master/conf/nginx.conf
Results into /etc/nginx/conf.d/yourdomain.conf.d/13ft.conf
#sub_path_only rewrite ^/$ / permanent;
location / {
# Path to source
alias /var/www/13ft/;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
ls /var/www/13ft
index.html index.py LICENSE portable.py README.md requirements.txt screenshots venv
Shouldn't there be a reverse proxy to http://127.0.0.1:5000 or something, instead?
Yes, this quick edit:
#sub_path_only rewrite ^/$ / permanent;
location / {
# Path to source
#alias /var/www/13ft/;
# static files
proxy_pass http://localhost:5000;
proxy_set_header Host $http_host;
more_set_headers "X-Frame-Options: ALLOWALL";
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
Makes it work again :-) it still requires @BrunoSpy part.
Thank a lot !
It fails :(
Service is running but the issue is still there.
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
- Running on http://127.0.0.1:5000
@wasi-master any idea ? :sweat_smile:
It fails :(
Service is running but the issue is still there.
itβs working fine here. Please note that mine is a quick fix. It will work when serving at the root of a (sub)domain, but not in a sub-folder, for example.
Oh that's the thing ! I use a subfolder. What should it be in that case ?
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
- Running on http://127.0.0.1:5000
@wasi-master any idea ? π
@lapineige that means the app is online. I didn't use a production grade server because I thought people would not deploy it online and just self host. Now I guess I need to use one.
I thought people would not deploy it online and just self host.
What do you mean ? Self-host on their personal computer and not in a separated server (even at home) ?
I thought people would not deploy it online and just self host.
What do you mean ? Self-host on their personal computer and not in a separated server (even at home) ?
I guess the warning doesnβt matter. The development server is not designed to be particularly efficient, stable, or secure. But if someone is using it at home. I guess they can just use the development server.
I don't get what's the issue :
May 26 17:24:28 systemd[4514]: 13ft.service: Failed to set up standard output: No such file or directory
May 26 17:24:28 systemd[4514]: 13ft.service: Failed at step STDOUT spawning /var/www/13ft/venv/bin/python3: No such file or directory
When I enter any URL, I'm sent back to Yunohost main page (SSO). It's as if I was asking for the wrong webpage and then it redirects meβ¦ But it's a public app so it should not be blocking any subpageβ¦
@wasi-master do you know what might be wrong in my Nginx config or so ?