helfrichmichael / cura-novnc

Provides an instance of Cura via noVNC in your favorite web browser!
13 stars 8 forks source link

Cura Not Loading #1

Closed GitCuppaJoe closed 2 years ago

GitCuppaJoe commented 2 years ago

When using the Unraid Docker Template, the Cura application does not load.

After connection to no vnc, the screen is black. You can move the mouse and the vnc options on the left hand side of screen is there. Right clicking the desktop presents the open box menu. Clicking on Cura fails. Other options work.

Manually running AppRun displays permission denied errors /home/cura/.local.

Reviewing the log file for cura found in /tmp has permission errors inside /home/cura/.local.

I have tried other docker image tags.

Steps to reproduce:

  1. Create Container
  2. Navigate to no-vnc
  3. Click connect

Log from unraid supervisord.log:

2022-02-13 10:44:29,539 INFO supervisord started with pid 1 2022-02-13 10:44:30,540 INFO spawned: 'x11' with pid 16 2022-02-13 10:44:30,541 INFO spawned: 'easy-novnc' with pid 17 2022-02-13 10:44:30,542 INFO spawned: 'openbox' with pid 18 2022-02-13 10:44:30,542 INFO spawned: 'cura' with pid 19 2022-02-13 10:44:31,078 INFO exited: cura (exit status 1; not expected) 2022-02-13 10:44:32,079 INFO success: x11 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-02-13 10:44:32,079 INFO success: easy-novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-02-13 10:44:32,079 INFO success: openbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-02-13 10:44:32,080 INFO spawned: 'cura' with pid 65 2022-02-13 10:44:32,418 INFO exited: cura (exit status 1; not expected) 2022-02-13 10:44:34,420 INFO spawned: 'cura' with pid 91 2022-02-13 10:44:34,728 INFO exited: cura (exit status 1; not expected) 2022-02-13 10:44:37,733 INFO spawned: 'cura' with pid 117 2022-02-13 10:44:38,067 INFO exited: cura (exit status 1; not expected) 2022-02-13 10:44:39,068 INFO gave up: cura entered FATAL state, too many start retries too quickly

helfrichmichael commented 2 years ago

When using the Unraid Docker Template, the Cura application does not load.

After connection to no vnc, the screen is black. You can move the mouse and the vnc options on the left hand side of screen is there. Right clicking the desktop presents the open box menu. Clicking on Cura fails. Other options work.

Manually running AppRun displays permission denied errors /home/cura/.local.

Reviewing the log file for cura found in /tmp has permission errors inside /home/cura/.local.

I have tried other docker image tags.

Steps to reproduce:

  1. Create Container
  2. Navigate to no-vnc
  3. Click connect

Log from unraid supervisord.log:

2022-02-13 10:44:29,539 INFO supervisord started with pid 1 2022-02-13 10:44:30,540 INFO spawned: 'x11' with pid 16 2022-02-13 10:44:30,541 INFO spawned: 'easy-novnc' with pid 17 2022-02-13 10:44:30,542 INFO spawned: 'openbox' with pid 18 2022-02-13 10:44:30,542 INFO spawned: 'cura' with pid 19 2022-02-13 10:44:31,078 INFO exited: cura (exit status 1; not expected) 2022-02-13 10:44:32,079 INFO success: x11 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-02-13 10:44:32,079 INFO success: easy-novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-02-13 10:44:32,079 INFO success: openbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-02-13 10:44:32,080 INFO spawned: 'cura' with pid 65 2022-02-13 10:44:32,418 INFO exited: cura (exit status 1; not expected) 2022-02-13 10:44:34,420 INFO spawned: 'cura' with pid 91 2022-02-13 10:44:34,728 INFO exited: cura (exit status 1; not expected) 2022-02-13 10:44:37,733 INFO spawned: 'cura' with pid 117 2022-02-13 10:44:38,067 INFO exited: cura (exit status 1; not expected) 2022-02-13 10:44:39,068 INFO gave up: cura entered FATAL state, too many start retries too quickly

Can you go into the terminal from the right-click menu, (feel free to hop into bash from the shell) and run ls -la /home/cura/ and ls -la /home/cura/.local/ I'm curious if the permissions weren't properly set for some reason. Doing this from master on my desktop with a fresh volume I get the following permissions.

image

Ran from master with docker build -t cura-novnc . && docker run --detach --volume=cura-novnc-data:/home/cura/ -p 8080:8080 --name=cura-novnc cura-novnc locally.

GitCuppaJoe commented 2 years ago

It seems like that is an issue. Directory doesn't exist.

image

From the cura-stdout---supervisor-dus06d.log file:

root@0fa2f6191292:/tmp# cat cura-stdout---supervisor-dus06d.log

:259: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses Traceback (most recent call last): File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/__startup__.py", line 74, in run File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/Console.py", line 36, in run File "/home/ultimaker/src/output/build/inst/bin/cura", line 89, in File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 223, in makedirs PermissionError: [Errno 13] Permission denied: '/home/cura/.local' :259: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses Traceback (most recent call last): File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/__startup__.py", line 74, in run File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/Console.py", line 36, in run File "/home/ultimaker/src/output/build/inst/bin/cura", line 89, in File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 223, in makedirs PermissionError: [Errno 13] Permission denied: '/home/cura/.local' :259: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses Traceback (most recent call last): File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/__startup__.py", line 74, in run File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/Console.py", line 36, in run File "/home/ultimaker/src/output/build/inst/bin/cura", line 89, in File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 223, in makedirs PermissionError: [Errno 13] Permission denied: '/home/cura/.local' :259: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses Traceback (most recent call last): File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/__startup__.py", line 74, in run File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/Console.py", line 36, in run File "/home/ultimaker/src/output/build/inst/bin/cura", line 89, in File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 223, in makedirs PermissionError: [Errno 13] Permission denied: '/home/cura/.local'
helfrichmichael commented 2 years ago

It seems like that is an issue. Directory doesn't exist.

image

From the cura-stdout---supervisor-dus06d.log file:

root@0fa2f6191292:/tmp# cat cura-stdout---supervisor-dus06d.log :259: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses Traceback (most recent call last): File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/startup.py", line 74, in run File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/Console.py", line 36, in run File "/home/ultimaker/src/output/build/inst/bin/cura", line 89, in File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 223, in makedirs PermissionError: [Errno 13] Permission denied: '/home/cura/.local' :259: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses Traceback (most recent call last): File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/startup.py", line 74, in run File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/Console.py", line 36, in run File "/home/ultimaker/src/output/build/inst/bin/cura", line 89, in File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 223, in makedirs PermissionError: [Errno 13] Permission denied: '/home/cura/.local' :259: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses Traceback (most recent call last): File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/startup.py", line 74, in run File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/Console.py", line 36, in run File "/home/ultimaker/src/output/build/inst/bin/cura", line 89, in File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 223, in makedirs PermissionError: [Errno 13] Permission denied: '/home/cura/.local' :259: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses Traceback (most recent call last): File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/startup.py", line 74, in run File "/srv/cura-build-environment/lib/python3.8/site-packages/cx_Freeze/initscripts/Console.py", line 36, in run File "/home/ultimaker/src/output/build/inst/bin/cura", line 89, in File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 213, in makedirs File "/srv/cura-build-environment/lib/python3.8/os.py", line 223, in makedirs PermissionError: [Errno 13] Permission denied: '/home/cura/.local'

To confirm, when you are running this Docker container, you are binding /home/cura/ to a local volume/mount (IE --volume=cura-novnc-data:/home/cura/), correct? I just tested this on my secondary unraid server also and it worked just fine.

It's strange considering the Dockerfile will generate the homedir. I might need to look if there's something missing if that volume was mounted in your instance.

GitCuppaJoe commented 2 years ago

That is the issue. I was using the default mapped volume from the Unraid template that targets: '/mnt/cache/appdata/cura'.

If I change the mapping to a new share, let's say Storage... it works fine. I tried changing the volume to '/mnt/user/appdata/cura' because that is where all of my docker configurations live (they live on the unraid cache and are backed up).

What mapping are you using? You have a share called 'cura-novnc-data'? I'm trying to think about what I can do to change the mapping to the same location my other containers are running off of.

GitCuppaJoe commented 2 years ago

Actually, I got it worked out. For some reason, the permissions on '/mnt/user/appdata/cura' weren't set correctly. I changed the permission on that folder:

chmod -R 777 /mnt/user/appdata/cura

We're good now! Thank you very much.

helfrichmichael commented 2 years ago

There's still a good opportunity for me here given that I have a cache pool, but that's not a requirement for unraid.

I'll adjust the unraid templates to use /mnt/user/ instead of /mnt/cache/ going forward. Thanks for this! Should be pushed in just a few minutes to the unraid templates repo.

GitCuppaJoe commented 2 years ago

@helfrichmichael it might also be beneficial to have separate mounts for storage. Right now, the container configuration is saved in my /mnt/user/appdata/cura. I have my files hosted in a share called /Storage/3D Prints/. It would be nice to have that Storage folder be mapped to the home folder, instead of the config. That way, I can leverage the mapped folder cura and have my files in that directory without having to browse the container filesystem to find my storage volume.

I don't want to store my STLs in the appdata folder. I essentially want the Home Folder to target my storage. Picky I know, but I thought I would share this with you.

helfrichmichael commented 2 years ago

That's actually a change I have staged locally for Prusaslicer :D, but it will be pushed to all my slicing repositories once it's in a good spot. It will add a /prints/ bookmark on the file manager and I will provide that as a bindable mount also.

GitCuppaJoe commented 2 years ago

Sounds great! Looks like you already have it on your radar 👍 . Now to export my settings from my gaming pc and import them into this instance.

helfrichmichael commented 2 years ago

Added /prints/ in https://github.com/helfrichmichael/unraid-templates/commit/cef9b6f5013f7f727563ea030b92bcca8cfe7a20 to all the repositories.

I also added a note for adding these fixes if you already have an existing configuration: https://github.com/helfrichmichael/cura-novnc#note-for-those-who-installed-prior-to-021322.

Hope this helps and the Docker image is being pushed from GitHub to Docker Hub as we speak with these fixes.