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] Can't run on Raspberry Pi? Can't access API? #377

Closed
erohtar opened this issue Sep 27, 2022 · 7 comments
Closed

[BUG] Can't run on Raspberry Pi? Can't access API? #377

erohtar opened this issue Sep 27, 2022 · 7 comments
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed waiting for response

Comments

@erohtar
Copy link

erohtar commented Sep 27, 2022

Describe the bug
Sorry if this isn't a bug, but..
I'm running Scrutiny on a Raspberry Pi (under Docker) with a 5TB Hard Disk connected. I'm facing multiple issues:

  • Only Docker image I found was Linuxserverr but they say it's deprecated now, and the official doesn't seem to support ARM/v7 - so I'm stuck with old version?
  • I'm trying to access the API, but (with the past hour+ of searching) I can't figure out where the API docs are? Only things I've found so far are (running on port 8030):
notify:
  level: 'warn' # 'warn' or 'error'
  urls:
    - "pushbullet://o.omeXXXXXXXXXXXXXXXXXXXXXPNgr"

..but the docker logs say this each time when I do "curl -X POST http://localhost:8030/api/health/notify/":
[GIN-debug] redirecting request 307: /api/health/notify --> /api/health/notify

github.com/AnalogJ/scrutiny                            dev-0.3.12

Start the scrutiny server
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

Trying to connect to database stored: /config/scrutiny.db
[GIN-debug] GET    /api/health               --> github.com/analogj/scrutiny/webapp/backend/pkg/web.(*AppEngine).Setup.func1 (5 handlers)
[GIN-debug] POST   /api/health/notify        --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.SendTestNotification (5 handlers)
[GIN-debug] POST   /api/devices/register     --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.RegisterDevices (5 handlers)
[GIN-debug] GET    /api/summary              --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.GetDevicesSummary (5 handlers)
[GIN-debug] POST   /api/device/:wwn/smart    --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.UploadDeviceMetrics (5 handlers)
[GIN-debug] POST   /api/device/:wwn/selftest --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.UploadDeviceSelfTests (5 handlers)
[GIN-debug] GET    /api/device/:wwn/details  --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.GetDeviceDetails (5 handlers)
[GIN-debug] GET    /web/*filepath            --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (5 handlers)
[GIN-debug] HEAD   /web/*filepath            --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (5 handlers)
[GIN-debug] GET    /                         --> github.com/analogj/scrutiny/webapp/backend/pkg/web.(*AppEngine).Setup.func2 (5 handlers)
[GIN-debug] Listening and serving HTTP on 0.0.0.0:8080
[GIN-debug] redirecting request 307: /api/health/notify --> /api/health/notify
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing... 
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 01-migrations: executing... 
[migrations] started
[migrations] no migrations found
[cont-init.d] 01-migrations: exited 0.
[cont-init.d] 02-tamper-check: executing... 
[cont-init.d] 02-tamper-check: exited 0.
[cont-init.d] 10-adduser: executing... 
usermod: no changes

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1000
User gid:    1000
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 50-config: executing... 
[cont-init.d] 50-config: exited 0.
[cont-init.d] 90-custom-folders: executing... 
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing... 
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2022/09/27 20:00:10 Loading configuration file: /scrutiny/config/scrutiny.yaml

 ___   ___  ____  __  __  ____  ____  _  _  _  _
/ __) / __)(  _ \(  )(  )(_  _)(_  _)( \( )( \/ )
\__ \( (__  )   / )(__)(   )(   _)(_  )  (  \  /
(___/ \___)(_)\_)(______) (__) (____)(_)\_) (__)
github.com/AnalogJ/scrutiny                            dev-0.3.12

Start the scrutiny server
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

Trying to connect to database stored: /config/scrutiny.db
[GIN-debug] GET    /api/health               --> github.com/analogj/scrutiny/webapp/backend/pkg/web.(*AppEngine).Setup.func1 (5 handlers)
[GIN-debug] POST   /api/health/notify        --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.SendTestNotification (5 handlers)
[GIN-debug] POST   /api/devices/register     --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.RegisterDevices (5 handlers)
[GIN-debug] GET    /api/summary              --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.GetDevicesSummary (5 handlers)
[GIN-debug] POST   /api/device/:wwn/smart    --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.UploadDeviceMetrics (5 handlers)
[GIN-debug] POST   /api/device/:wwn/selftest --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.UploadDeviceSelfTests (5 handlers)
[GIN-debug] GET    /api/device/:wwn/details  --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.GetDeviceDetails (5 handlers)
[GIN-debug] GET    /web/*filepath            --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (5 handlers)
[GIN-debug] HEAD   /web/*filepath            --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (5 handlers)
[GIN-debug] GET    /                         --> github.com/analogj/scrutiny/webapp/backend/pkg/web.(*AppEngine).Setup.func2 (5 handlers)
[GIN-debug] Listening and serving HTTP on 0.0.0.0:8080
[GIN-debug] redirecting request 307: /api/health/notify --> /api/health/notify
[GIN-debug] redirecting request 307: /api/health/notify --> /api/health/notify

Expected behavior

  • Ability to run latest version on RPi Bullseye (32bit)
  • Ability to access API docs and API itself

Docker compose

  scrutiny:
    image: linuxserver/scrutiny:060ac7b8-ls34
    container_name: monitor_scrutiny
    cap_add:
      - SYS_RAWIO
      - SYS_ADMIN #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Kolkata
      - SCRUTINY_API_ENDPOINT=http://localhost:8080
      - SCRUTINY_WEB=true
      - SCRUTINY_COLLECTOR=true
    volumes:
      - /home/pi/Docker/scrutiny:/config
      - /run/udev:/run/udev:ro
    ports:
      - 8030:8080
    devices:
      - /dev/disk/by-uuid/xxxx:/dev/sda    #WD elements (retrieved using 'sudo blkid')
    restart: unless-stopped

Please also provide the output of docker info

Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Docker Buildx (Docker Inc., v0.9.1-docker)
compose: Docker Compose (Docker Inc., v2.10.2)

Server:
Containers: 14
Running: 14
Paused: 0
Stopped: 0
Images: 14
Server Version: 20.10.18
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
seccomp
Profile: default
cgroupns
Kernel Version: 5.15.61-v7l+
Operating System: Raspbian GNU/Linux 11 (bullseye)
OSType: linux
Architecture: armv7l
CPUs: 4
Total Memory: 7.714GiB
Name: raspberrypi
ID: 2XRH:HS5S:IT4N:S77T:6QXW:SKJG:ZPHC:3K6M:IJGB:7BWD:OBZY:QVGT
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: No memory limit support
WARNING: No swap limit support

@erohtar erohtar added the bug Something isn't working label Sep 27, 2022
@AnalogJ
Copy link
Owner

AnalogJ commented Oct 13, 2022

Hey @erohtar
Sorry the LSIO image is out of date and not supported -- its running an old 0.3.x release.

You're partially correct, Scrutiny does build ARM 7 images (for the web and collector) however we don't build an omnibus image as the InfluxDB binary is not compatible with ARM7 -- see this issue

Honestly I don't know much about Raspberry Pi's. Do you know if your arch is 64bit or 32bit? I did notice a InfluxDB ARM32v7 image available on docker hub (linked in the issue above).

@AnalogJ AnalogJ added enhancement New feature or request help wanted Extra attention is needed waiting for response labels Oct 13, 2022
@erohtar
Copy link
Author

erohtar commented Oct 13, 2022

Thank you for replying.

Do you know if your arch is 64bit or 32bit?
Does this part from the above message answer your Q "RPi Bullseye (32bit)"? It's Debian OS.

we don't build an omnibus image as the InfluxDB binary is not compatible with ARM7
So I'm stuck with the obsolete release? That's a bummer, since I don't know of any alternative apps that might work instead.

Also, I can't find Scrutiny API docs anywhere - could you pls help?

@AnalogJ
Copy link
Owner

AnalogJ commented Nov 30, 2022

This may be possible by leveraging the work done by this developer - https://bitbucket.org/choekstra/influxdb2-linux-arm/src/master/

They've figured out a way to generate 32bit binaries for Influxdb v2.x (something that is officially unsupported).

@kajmaj
Copy link

kajmaj commented Dec 28, 2022

Does this all mean that there is no support (yet) for RP 4 64bit?
As far as I know, InfluxDB can run under Raspbian

@martadinata666
Copy link

If the OS is 64bit then you good, the influxdb 2.0 for 32bit not existed yet, or you can build it yourself like the link analogj attached above.

@kajmaj
Copy link

kajmaj commented Dec 30, 2022

Thanx, so I proceeded to the next step, installed with the help of omnibus.docker-compose.yml, scrutiny runs, influxdb as well but I see only "empty" scrutiny UI dashboard
Scrutiny Dashboard
And I am not able to to login to influxdb as well even if I am not sure if I need it. Reason - I do not know login and password

@AnalogJ
Copy link
Owner

AnalogJ commented Apr 6, 2023

The default influxdb credentials are documented here - https://github.com/AnalogJ/scrutiny/blob/master/docs/TROUBLESHOOTING_INFLUXDB.md#customize-influxdb-admin-username--password

I've added documentation which states that RPi 32b won't be supported since Influxdb doesn't have a 32bit package/artifact.

I'm going to close this issue, but feel free to reopen it.

@AnalogJ AnalogJ closed this as completed Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed waiting for response
Projects
None yet
Development

No branches or pull requests

4 participants