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

error 404 all of a sudden #1609

Closed
4 tasks done
LarryT8959 opened this issue Jun 3, 2024 · 35 comments
Closed
4 tasks done

error 404 all of a sudden #1609

LarryT8959 opened this issue Jun 3, 2024 · 35 comments
Assignees
Labels
🔧 Exteral issue ✅ Fixed [ISSUE] Auto-Assigned to Tickets whose fix has been deployed 🤷‍♂️ Question [ISSUE] Further information is requested

Comments

@LarryT8959
Copy link

Question

All of a sudden, all of my widgets are failing an I've tried everything I know to resolve it. Everything was fine, not sure what caused this.
Fail to load resource: Origin http:// 192.168.10.10:4000 is not allowed by access control allow orgin. Status code 404.
What is this telling me?

Screenshot 2024-06-03 at 12 55 35 PM Screenshot 2024-06-03 at 12 56 19 PM

Category

Widgets

Please tick the boxes

@LarryT8959 LarryT8959 added the 🤷‍♂️ Question [ISSUE] Further information is requested label Jun 3, 2024
@CrazyWolf13
Copy link
Collaborator

CrazyWolf13 commented Jun 3, 2024

Hi
Look here for widget troubleshooting:
https://dashy.to/docs/widgets#troubleshooting-widget-errors

In your specific case you can add the following, and the widgets should work again.

Those are CORS-Erros.

useProxy: true

@LarryT8959
Copy link
Author

LarryT8959 commented Jun 3, 2024 via email

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jun 3, 2024
@CrazyWolf13
Copy link
Collaborator

Hi @LarryT8959

To be honest, I can't fully understand what you mean.

Does it work after adding the useProxy ?

Please share your full config and describe clearly what your problem is, what you've tried and some exact steps, so I can reproduce the issue.

@LarryT8959
Copy link
Author

LarryT8959 commented Jun 3, 2024 via email

@CrazyWolf13
Copy link
Collaborator

Yeah that's correct, as there were changes to glances, they migrated to api v4.

After updating to the latest version and adding useProxy: true everything works again fine, tested with mutiple systems and different users.

Rebuild your container through docker, make sure the tag is set to latest and re-pull the image.

@LarryT8959
Copy link
Author

LarryT8959 commented Jun 3, 2024 via email

@CrazyWolf13
Copy link
Collaborator

Yeah you're right!
That's really weird, that shouldn't be happening, can you send the browser logs again, after enabling the proxy?

@LarryT8959
Copy link
Author

LarryT8959 commented Jun 3, 2024 via email

@LarryT8959
Copy link
Author

LarryT8959 commented Jun 3, 2024 via email

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jun 4, 2024
@CrazyWolf13
Copy link
Collaborator

@LarryT8959 Could you reupload your uploaded images from github?

For me they are not rendered correctly and don't display.

@LarryT8959
Copy link
Author

Screenshot 2024-06-03 at 5 25 00 PM Screenshot 2024-06-03 at 4 42 17 PM

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jun 4, 2024
@LarryT8959
Copy link
Author

Screenshot 2024-06-03 at 5 21 52 PM

@CrazyWolf13
Copy link
Collaborator

Hmm, this looks like the Glances server is not correctly set up, are you running the latest version?

Plase share your version number of the installed glances.

@LarryT8959
Copy link
Author

LarryT8959 commented Jun 4, 2024 via email

@LarryT8959
Copy link
Author

LarryT8959 commented Jun 4, 2024 via email

@CrazyWolf13
Copy link
Collaborator

Yeah, most likely what happened here, glances updated to apiv4, dashy adapted to apiv4 ant therefore broke apiv3 support, and your specific instance has not yet updated to the new glances version, simply updating the python package on you mac should work.

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jun 5, 2024
@LarryT8959
Copy link
Author

No matter what I do, the PI3 won't work with the widgets. I setup the same way as I did the PI4 I have which is working great.

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jun 10, 2024
@CrazyWolf13
Copy link
Collaborator

Can you verify that the apiv4 works on the server you want to use for the widgets?

For example something like this, please execute oth of those commands, replace the ip and port with your own and show the results here.

curl http://192.168.0.10:61208/api/3/pluginslist
curl http://192.168.0.10:61208/api/4/pluginslist

@LarryT8959
Copy link
Author

Got what looks like a normal response from 3 but an error on 4.
Screenshot 2024-06-12 at 12 39 33 PM

@CrazyWolf13
Copy link
Collaborator

Yeah that means, you are still on an old version of glances.

Would you mind sharing, how you installed glances on that machine, so I can try to help you to update glances?

@LarryT8959
Copy link
Author

I believe I used this stack;

Docker Compose file version

version: "3"

Define services to run

services:

Service name: glances

glances:
# Name of the container
container_name: glances

# Docker image to use
image: nicolargo/glances:3.4.0.3-full

# Port mapping between host and container
ports:
  - 7300:61208

# Environment variables
environment:
  - TZ=$ America/New_York # Timezone
  - GLANCES_OPT=-w # Glances option to run as a web server

# Use the host's PID namespace
pid: host

# Container restart policy
restart: unless-stopped

# Volumes to mount into the container
volumes:
  - /var/run/docker.sock:/var/run/docker.sock:ro # Docker socket for monitoring

Don't understand because I used same method on other PI and have no issues. I did try to edit stack to change version but it wouldn't allow it.??

@LarryT8959
Copy link
Author

These are containers running on the PI.
Screenshot 2024-06-12 at 2 26 03 PM

@LarryT8959
Copy link
Author

I got it! I edited the stack to this! It would't work the other day for whatever reason. Thanks so much, I appreciate the help.

Docker Compose file version

version: "3"

Define services to run

services:

Service name: glances

glances:
# Name of the container
container_name: glances

# Docker image to use
image: nicolargo/glances:latest-full

# Port mapping between host and container
ports:
  - 61208:61208

# Environment variables
environment:
  - TZ=$ America/New_York # Timezone
  - GLANCES_OPT=-w # Glances option to run as a web server

# Use the host's PID namespace
pid: host

# Container restart policy
restart: unless-stopped

# Volumes to mount into the container
volumes:
  - /var/run/docker.sock:/var/run/docker.sock:ro # Docker socket for monitoring

@CrazyWolf13
Copy link
Collaborator

Yeah that's correct, yes updating the tag make docker automatically use tha latest or whatever tag specified on rebuild.

Great to hear, that you got it working.

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jun 12, 2024
@LarryT8959
Copy link
Author

One last thing, I had two instances of glances running on an old iMac I turned into a server. one running in docker desktop (port 7300), and the other running on the macOS (port 61208). I was able to monitor resources on both. Any ideas of why I can't get the one on the Mac to connect to dashy? I have verified they both are version four.
Thanks

@CrazyWolf13 CrazyWolf13 reopened this Jun 12, 2024
@CrazyWolf13
Copy link
Collaborator

Please share some more info about the macOS instance and the browser conosle logs of dashy.

@LarryT8959
Copy link
Author

Must be the same issue because I'm getting error on api 4 but not 3 even though it said I'm running version 4 of glances.

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jun 12, 2024
@LarryT8959
Copy link
Author

Same error
Screen Shot 2024-06-12 at 4 39 53 PM

@LarryT8959
Copy link
Author

Other instance. I just can figure out how to install the new version on macOS. I used home-brew to install if I can remember correctly. When I run "brew upgrade glances" is says glances is not installed? But it is an I can reach it.
Screen Shot 2024-06-12 at 4 41 22 PM

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jun 13, 2024
@CrazyWolf13
Copy link
Collaborator

Hi you can try the following, if you installed glances using brew:

brew update
brew upgrade glances
glances -v

If you installed using ports:

sudo port selfupdate
sudo port upgrade glances
glances -v

Otherwise you can try to loon into taskmanager or something like that, to find the process and how it's started.

@LarryT8959
Copy link
Author

I can't get past this message. Disable home-brew no install cleanup? I need to figure this out. I get this when I try to reinstall glances.

@Larrys-iMac ~ % brew reinstall glances
==> Downloading https://ghcr.io/v2/homebrew/core/glances/manifests/4.0.8
Already downloaded: /Users/larrythompson/Library/Caches/Homebrew/downloads/2775a675706dd8cef14632c4790f39a275e3c12b59dfb686b70eb30791e4f261--glances-4.0.8.bottle_manifest.json
==> Fetching glances
==> Downloading https://ghcr.io/v2/homebrew/core/glances/blobs/sha256:480cb774a7
Already downloaded: /Users/larrythompson/Library/Caches/Homebrew/downloads/688e4c408f0a3e4515ffac30a9180cd0bad44fc46b81a98c3d08c6e24e84f693--glances--4.0.8.monterey.bottle.tar.gz
==> Reinstalling glances
==> Pouring glances--4.0.8.monterey.bottle.tar.gz
🍺 /usr/local/Cellar/glances/4.0.8: 288 files, 4MB
==> Running brew cleanup glances...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew).

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jun 13, 2024
@LarryT8959
Copy link
Author

Yea, I've tried just about everything I can think of. Looks like I'll have to nuke my Mac and reinstall everything over to get this resolved. Not sure if its worth that because everything else is okay. Thanks for your help.

@LarryT8959
Copy link
Author

Removed glances and reinstalled using ports.
This is the error I'm getting;
FastAPI import error. Glances cannot start in web server mode

@CrazyWolf13
Copy link
Collaborator

Hi to be honest I also don't know this, as I don't own a mac and never use brew.

As the dashy side is working I suggest creating an issue on their github, I'm sure they are able to help you.

@CrazyWolf13 CrazyWolf13 added ✅ Fixed [ISSUE] Auto-Assigned to Tickets whose fix has been deployed 🔧 Exteral issue and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Jun 13, 2024
@LarryT8959
Copy link
Author

Thank you. I ended up getting it but don't completely understand what and why? The first thing I did was to delete the docker instance of glances, removed pip and brew then started over. Once I got that instance going, I added the docker instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 Exteral issue ✅ Fixed [ISSUE] Auto-Assigned to Tickets whose fix has been deployed 🤷‍♂️ Question [ISSUE] Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants