linuxserver / docker-unifi-network-application

GNU General Public License v3.0
553 stars 41 forks source link

[BUG] Can't get unifi-network-application running on Raspberry Pi #20

Closed salamihawk closed 9 months ago

salamihawk commented 9 months ago

Is there an existing issue for this?

Current Behavior

I've managed to find the appropriate arm64 images for unifi and mongodb, but for some reason both mongodb and unifi-network-application are stuck restarting with no log information whatsoever.

Can someone have a look at my docker-compose.yml file and tell me what I'm doing wrong?

version: "2.1"
services:
  unifi-db:
    image: docker.io/arm64v8/mongo:4.4.22-focal
    container_name: unifi-db
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
      - ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
      - unifi_db:/data/db
      - mongo_cnfdb:/data/configdb
    ports:
      - 27017:27017
    restart: unless-stopped

  unifi-network-application:
    image: lscr.io/linuxserver/unifi-network-application:arm64v8-latest
    container_name: unifi-network-application
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - MONGO_USER=unifi
      - MONGO_PASS=MONGO_PASS
      - MONGO_HOST=unifi-db
      - MONGO_PORT=27017
      - MONGO_DBNAME=unifi
      - MEM_LIMIT=1024 #optional
      - MEM_STARTUP=1024 #optional
    volumes:
      - unifi_app:/config
    ports:
      - 8443:8443
      - 3478:3478/udp
      - 10001:10001/udp
      - 8080:8080
      - 1900:1900/udp #optional
      - 8843:8843 #optional
      - 8880:8880 #optional
      - 6789:6789 #optional
      - 5514:5514/udp #optional
    depends_on:
      - unifi-db
    restart: unless-stopped

volumes:
  unifi_app:
    name: "unifi_app"
  unifi_db:
    name: "unifi_db"
  mongo_cnfdb:
    name: "mongo_cnfdb"

I've created all directories as my user in my user home, so I don't believe there are any permissions issues. I see unifi-network-application coming up every now and again, but it quickly restarts within a second or two.

I've set up everything according to what Mystery-X suggested in #8 . This might have helped a little bit, but it still isn't running.

In addition to this, I have a pi-hole running on the same pi. There aren't any port conflicts and pi-hole ran flawlessly from the beginning.

Expected Behavior

No response

Steps To Reproduce

created docker-compose.yml executed docker-compose up -d

Environment

- OS:
- How docker service was installed:

CPU architecture

arm64

Docker creation

executed docker-compose up -d

Container logs

There are no logs
github-actions[bot] commented 9 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

salamihawk commented 9 months ago

Sorry, I was able to resolve my issue. The problem was that I had accidentally installed the 32-bit version of Raspbian OS on my Raspberry Pi.

I copied off the configuration files via SCP, reimaged the Pi with 64-bit, copied everything back, ran docker-compose up -d and it worked right away.

kaylumah commented 2 months ago

Hi @salamihawk

Thank you for providing the docker-compose file. Yours has been one of the few that I was able to pull the images

When I try to run however I get the error:

The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/arm/v8) and no specific platform was requested 

As far as I know I am on a RaspberryPI5 with 64 bit OS

cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)"
NAME="Raspbian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
uname -a
Linux raspberrypi-vpn 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux

Did you run into the same error?