Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to download server startup kit from dashboard #2854

Open
Plachido opened this issue Aug 27, 2024 · 4 comments
Open

[BUG] Unable to download server startup kit from dashboard #2854

Plachido opened this issue Aug 27, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Plachido
Copy link

While users can download their startup kits from the dashboard, the request for downloading the server startup kit fails. Said request is made from the project admin to http://10.101.190.50:4000/api/v1/servers/1/blob (dashboard is running on custom chosen port).

Despite the box with "Your download should be starting soon." appears, the request to the server fails (server answers with Internal Server Error)

Server details: Ubuntu 22.04.4 LTS, Python 3.10, nvflare 2.40

@Plachido Plachido added the bug Something isn't working label Aug 27, 2024
@YuanTingHsieh
Copy link
Collaborator

@Plachido thanks for reporting!

Just gathering more information, so the project admin when downloading admin package or client startup kits all work?
just that when trying to download the server startup kits it failed?

You say "server answers with Internal Server Error", do you have the log/error on the server side?

@Plachido
Copy link
Author

Thank you for answering!
I seem to be able to download everything (with users and admin) except for the primary start kit (from project admin account).
Here is the error raising inside the docker container:

[2024-08-28 05:00:15,331] ERROR in app: Exception on /api/v1/servers/1/blob [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/local/lib/python3.8/site-packages/flask_jwt_extended/view_decorators.py", line 158, in decorator
    return current_app.ensure_sync(fn)(*args, **kwargs)
  File "/opt/NVFlare/nvflare/dashboard/application/project.py", line 120, in server_blob
    fileobj, filename = Store.get_server_blob(pin, id == 1)
  File "/opt/NVFlare/nvflare/dashboard/application/store.py", line 144, in get_server_blob
    fileobj, filename = gen_server(key, first_server)
  File "/opt/NVFlare/nvflare/dashboard/application/blob.py", line 129, in gen_server
    os.mkdir(server_dir)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp326y5060/http://10.101.190.50/'
10.122.17.100 - - [28/Aug/2024 05:00:15] "POST /api/v1/servers/1/blob HTTP/1.1" 500 -

In case you need it, I am also attaching the full container log of the container where I have done the following operations:

  • PROJECT ADMIN: admin log in
  • ORG ADMIN: user subscription (org admin with one site)
  • PROJECT ADMIN: approved site
  • PROJECT ADMIN: approved user
  • ORG ADMIN: downlaoded Flare Console
  • ORG ADMIN: downloaded Startup Kit for Client Site
  • PROJECT ADMIN: downloaded Flare Console
  • PROJECT ADMIN: downlaod of Server Startup Kit (Primary) Failed

@nvkevlu
Copy link
Collaborator

nvkevlu commented Aug 28, 2024

@Plachido thank you for the details. It looks like this has to do with the usage of the IP including "http://" for creating the the directory storing the server startup kit, and this contains several illegal characters for a directory name, which causes the error in the request.

I can look into a fix for this, but in the meantime, if it is possible to use a fully qualified domain name (FQDN) instead of an IP address for the server (you could edit /etc/hosts and point the name to your IP), this issue can be avoided.

@YuanTingHsieh
Copy link
Collaborator

@nvkevlu @IsaacYangSLA can we add a check to throw error or something when user give input that contains illegal characters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants