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

Can't run snap package #4706

Open
KhazAkar opened this issue Jun 2, 2024 · 8 comments
Open

Can't run snap package #4706

KhazAkar opened this issue Jun 2, 2024 · 8 comments

Comments

@KhazAkar
Copy link

KhazAkar commented Jun 2, 2024

Hi!
I found your interesting project in App Centre in Ubuntu, but I can't get it to work.

khazakar@unity-e7250:~$ parca
ooooooooo.
`888   `Y88.
 888   .d88'  .oooo.   oooo d8b  .ooooo.   .oooo.
 888ooo88P'  `P  )88b  `888""8P d88' `"Y8 `P  )88b
 888          .oP"888   888     888        .oP"888
 888         d8(  888   888     888   .o8 d8(  888
o888o        `Y888""8o d888b    `Y8bod8P' `Y888""8o



level=warn name=parca ts=2024-06-02T18:08:15.538369941Z caller=main.go:59 msg="failed to set GOMAXPROCS automatically" err="open /proc/self/mountinfo: permission denied"
level=error name=parca ts=2024-06-02T18:08:15.53840174Z caller=parca.go:206 msg="failed to read config" path=parca.yaml
level=error name=parca ts=2024-06-02T18:08:15.538421435Z caller=main.go:66 msg="Program exited with error" err="open parca.yaml: no such file or directory"
@jnsgruk
Copy link
Contributor

jnsgruk commented Jun 21, 2024

Hi there! Sorry for the delay. That's because you're not providing a config file for Parca to run.

There are a couple of options outlined in the docs - you can either grab a config file from this repo and point the binary to it, or you can sudo snap start parca to start it with the default config.

@KhazAkar
Copy link
Author

Starting service and running binary didn't helped unfortunately, those 3 lines are persistent. When running sudo parca

level=warn name=parca ts=2024-06-21T11:17:05.36490789Z caller=main.go:59 msg="failed to set GOMAXPROCS automatically" err="open /proc/self/mountinfo: permission denied"
level=error name=parca ts=2024-06-21T11:17:05.364984521Z caller=parca.go:206 msg="failed to read config" path=parca.yaml
level=error name=parca ts=2024-06-21T11:17:05.365004706Z caller=main.go:66 msg="Program exited with error" err="open parca.yaml: permission denied"

when running without sudo:

level=warn name=parca ts=2024-06-21T11:17:32.499109185Z caller=main.go:59 msg="failed to set GOMAXPROCS automatically" err="open /proc/self/mountinfo: permission denied"
level=error name=parca ts=2024-06-21T11:17:32.49914405Z caller=parca.go:206 msg="failed to read config" path=parca.yaml
level=error name=parca ts=2024-06-21T11:17:32.49915577Z caller=main.go:66 msg="Program exited with error" err="open parca.yaml: no such file or directory"

Here is log from snap logs parca

2024-06-21T13:16:47+02:00 parca.parca-svc[176237]: level=warn name=parca ts=2024-06-21T11:16:47.385919404Z caller=main.go:59 msg="failed to set GOMAXPROCS automatically" err="open /proc/self/mountinfo: permission denied"
2024-06-21T13:16:47+02:00 parca.parca-svc[176237]: level=info name=parca ts=2024-06-21T11:16:47.387101751Z caller=factory.go:53 msg="loading bucket configuration"
2024-06-21T13:16:47+02:00 parca.parca-svc[176237]: level=info name=parca ts=2024-06-21T11:16:47.3894585Z caller=badger.go:54 msg="Set nextTxnTs to 0"
2024-06-21T13:16:47+02:00 parca.parca-svc[176237]: level=info name=parca ts=2024-06-21T11:16:47.392902224Z caller=server.go:90 msg="starting server" addr=:7070

@KhazAkar
Copy link
Author

Additionally, when trying to run with parca.yaml file from repo, this is what I get (with service started)

level=warn name=parca ts=2024-06-21T11:22:56.41977818Z caller=main.go:59 msg="failed to set GOMAXPROCS automatically" err="open /proc/self/mountinfo: permission denied"
level=info name=parca ts=2024-06-21T11:22:56.420065699Z caller=factory.go:53 msg="loading bucket configuration"
level=info name=parca ts=2024-06-21T11:22:56.423565192Z caller=badger.go:54 msg="Set nextTxnTs to 0"
level=info name=parca ts=2024-06-21T11:22:56.428538352Z caller=server.go:90 msg="starting server" addr=:7070
level=info db=parca name=parca ts=2024-06-21T11:22:56.43616135Z caller=db.go:1002 msg="closing DB"
level=info db=parca name=parca ts=2024-06-21T11:22:56.436209991Z caller=db.go:1015 msg="closed all tables"
level=error name=parca ts=2024-06-21T11:22:56.441863836Z caller=main.go:66 msg="Program exited with error" err="listen tcp :7070: bind: address already in use"

After stopping works fine when providing path to config.

@jnsgruk
Copy link
Contributor

jnsgruk commented Jun 21, 2024

Okay, so it looks like with that last one we're getting pretty close. It seems like something is already running on :7070, which you can check with sudo ss -tlpn | grep 7070 - that should give you an idea of what's already got the port. If it's just another instance of parca, I'd recommend killing it and then trying sudo snap restart parca, then sudo snap logs parca to see the result :)

@jnsgruk
Copy link
Contributor

jnsgruk commented Jun 21, 2024

Ah! Actually -- you need to stop the service before you launch manually...

sudo snap stop parca
sudo parca -c /path/to/config.yaml

@KhazAkar
Copy link
Author

KhazAkar commented Jun 21, 2024

So only thing left to figure our is to run parca without providing parca.yaml file manually it seems :)

@jnsgruk
Copy link
Contributor

jnsgruk commented Jun 21, 2024

I don't think that's possible. What you're talking about is the equivalent of "Running Parca from Binary" in the upstream docs: https://www.parca.dev/docs/binary, where the path to the config is always passed in as a command line arg.

@KhazAkar
Copy link
Author

KhazAkar commented Jun 21, 2024

Yup, but there's no mention of providing config file on parca snap package page, which I use :)
https://www.parca.dev/docs/parca-snap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants