Giter Site home page Giter Site logo

Comments (28)

dgraziotin avatar dgraziotin commented on May 27, 2024 5

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.

from 13ft_ynh.

dotInTheWind avatar dotInTheWind commented on May 27, 2024 1

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'.

from 13ft_ynh.

wasi-master avatar wasi-master commented on May 27, 2024 1

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.

https://github.com/wasi-master/13ft/blob/main/index.py

from 13ft_ynh.

BrunoSpy avatar BrunoSpy commented on May 27, 2024 1

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

  • 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: 534-857-092

from 13ft_ynh.

wasi-master avatar wasi-master commented on May 27, 2024 1

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.

from 13ft_ynh.

emiliien avatar emiliien commented on May 27, 2024

Same probleme here.

from 13ft_ynh.

wasi-master avatar wasi-master commented on May 27, 2024

I don't really know why it's happening πŸ€”

from 13ft_ynh.

lapineige avatar lapineige commented on May 27, 2024

How can I help you to debug this ?

from 13ft_ynh.

lapineige avatar lapineige commented on May 27, 2024

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 ? #6

from 13ft_ynh.

dotInTheWind avatar dotInTheWind commented on May 27, 2024

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.

from 13ft_ynh.

lapineige avatar lapineige commented on May 27, 2024

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…

from 13ft_ynh.

emiliien avatar emiliien commented on May 27, 2024

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'.

from 13ft_ynh.

lapineige avatar lapineige commented on May 27, 2024

Even with the latest version ?

from 13ft_ynh.

karolfilarski avatar karolfilarski commented on May 27, 2024

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

from 13ft_ynh.

lapineige avatar lapineige commented on May 27, 2024

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 ?

from 13ft_ynh.

irrweg avatar irrweg commented on May 27, 2024

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

from 13ft_ynh.

lapineige avatar lapineige commented on May 27, 2024

I don't understand the issue, the file is here, the service can start, but it failed πŸ€”

from 13ft_ynh.

irrweg avatar irrweg commented on May 27, 2024

maybe it helps using files from python instead linking to it in the folder.

from 13ft_ynh.

lapineige avatar lapineige commented on May 27, 2024

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.

from 13ft_ynh.

dgraziotin avatar dgraziotin commented on May 27, 2024

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?

from 13ft_ynh.

lapineige avatar lapineige commented on May 27, 2024

Thank a lot !

from 13ft_ynh.

lapineige avatar lapineige commented on May 27, 2024

It fails :(

Service is running but the issue is still there.

from 13ft_ynh.

lapineige avatar lapineige commented on May 27, 2024

WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.

@wasi-master any idea ? πŸ˜…

from 13ft_ynh.

dgraziotin avatar dgraziotin commented on May 27, 2024

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.

from 13ft_ynh.

lapineige avatar lapineige commented on May 27, 2024

Oh that's the thing !
I use a subfolder. What should it be in that case ?

from 13ft_ynh.

wasi-master avatar wasi-master commented on May 27, 2024

WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.

@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.

from 13ft_ynh.

lapineige avatar lapineige commented on May 27, 2024

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) ?

from 13ft_ynh.

lapineige avatar lapineige commented on May 27, 2024

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

from 13ft_ynh.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.