ziggyds/iventoy

build_1 [UTIL] mount directory failed, errno:1 build_1 [PXE] ### iVentoy start failed. ### error

Closed this issue · 3 comments

Docker version 24.0.5, build ced0996
docker-compose version 1.29.2, build 5becea4c
Linux computer 5.18.0-4mx-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.16-1~mx21+1 (2022-08-22) x86_64 GNU/Linux

docker volume create --name=isos
docker volume create --name=config
docker volume create --name=iventoy_logs
root@computer:/opt/docker/iventoy# docker-compose up

Starting iventoy         ... done
Starting iventoy_build_1 ... done
Attaching to iventoy, iventoy_build_1
iventoy    | iventoy start SUCCESS PID=16
iventoy    | 
iventoy    | Please open your browser and visit http://127.0.0.1:26000 or http://x.x.x.x:26000 (x.x.x.x is any valid IP address)
iventoy    | 
build_1    | iventoy start SUCCESS PID=0
build_1    | 
build_1    | Please open your browser and visit http://127.0.0.1:26000 or http://x.x.x.x:26000 (x.x.x.x is any valid IP address)
build_1    | 
iventoy    | 2023/11/09 02:21:34.599 [PXE]  602da149414e6904c79f9208ef68fcf657d118a965e2ed4e266e91920b6e7380
iventoy    | 2023/11/09 02:21:34.599 [PXE]  ====================== SYSTEM IP LIST ===================================
iventoy    | 2023/11/09 02:21:34.599 [PXE]   [1] 172.18.0.2        255.255.0.0       172.18.0.1        eth0
iventoy    | 2023/11/09 02:21:34.599 [PXE]  =========================================================================
iventoy    | 2023/11/09 02:21:34.599 [PXE]  PXE cofigure recovery ...
iventoy    | 2023/11/09 02:21:34.599 [PXE]  data/config.dat is valid, now recover data ...
iventoy    | 2023/11/09 02:21:34.599 [PXE]  Recover: dhcp server mode 0
iventoy    | 2023/11/09 02:21:34.599 [PXE]  Recover: boot background mode 0
iventoy    | 2023/11/09 02:21:34.599 [PXE]  ########## iVentoy auto running. #########
iventoy    | 2023/11/09 02:21:34.599 [PXE]  No image file detected.
build_1    | 2023/11/09 01:30:06.343 [PXE]  ==========================================================
build_1    | 2023/11/09 01:30:06.343 [UTIL] mount directory failed, errno:1
build_1    | 2023/11/09 01:30:06.343 [PXE]  ### iVentoy start failed. ###
build_1    | 2023/11/09 02:21:34.408 [PXE]  ==========================================================
build_1    | 2023/11/09 02:21:34.408 [PXE]  ##########################################################
build_1    | 2023/11/09 02:21:34.408 [PXE]  ##################### IVENTOY RUN ########################
build_1    | 2023/11/09 02:21:34.408 [PXE]  ##########################################################
build_1    | 2023/11/09 02:21:34.408 [PXE]  ==========================================================
build_1    | 2023/11/09 02:21:34.408 [UTIL] mount directory failed, errno:1
build_1    | 2023/11/09 02:21:34.409 [PXE]  ### iVentoy start failed. ###

docker-compose.yml the only difference is I have - iventoy_logs:/app/log under volumes

I have an iso in /var/lib/docker/volumes/isos
/var/lib/docker/volumes/iventoy_logs is empty

docker exec -it iventoy_build_1 /bin/bash
/app/iso directory is empty
/app/log directory contains log.txt and history directory
/app/config directory is empty

It appears the volumes aren't being mounted although I'm at a loss as to why.

zidesm commented

I see you are using the compose file from the repo which contains the build step I use to build the image locally for testing purposes.
You can use the one from the readme or the command below should also work.
docker-compose up iventoy

You otherwise end up with this:
Attaching to iventoy, iventoy_build_1
Of which you only need the first one, which is working fine, seeing the logs.

I redid the docker-compose.yml

version: '3.9'
services:
  iventoy:
    image: ziggyds/iventoy:latest
    container_name: iventoy
    restart: always
    privileged: true #must be true
    ports:
      - 26000:26000
      - 16000:16000
      - 10809:10809
      - 67:67/udp
      - 69:69/udp
    volumes:
      - isos:/app/iso
      - config:/app/data
      - iventoy_logs:/app/log

    environment:
      - AUTO_START_PXE=true
    

#  build:
#    build:
#      context: .
#      dockerfile: Dockerfile
#      labels:
#        IVENTOY: 1.0.19
#      args:
#        IVENTOY: 1.0.19

volumes:
  isos:
    external: true
  config:
    external: true
  iventoy_logs:
    external: true

Looks like I'm tripping at the finish line:

iventoy    | 2023/11/10 04:45:45.861 [DHCP] Proc DHCP DISCOVER pkt from client 34e6-d748-085c
iventoy    | 2023/11/10 04:45:45.861 [DHCP] dhcp_cfg_alloc_ip MAC:aa-bb-cc-dd-ee-ff
iventoy    | 2023/11/10 04:45:45.861 [DHCP] dhcp_cfg_alloc_ip alloc DB ip from pool 172.18.0.200
iventoy    | 2023/11/10 04:45:45.861 [DHCP] Recv DHCP Discover from 34e6-d748-085c, response DHCP OFFER with ip 172.18.0.200/255.255.0.0
iventoy    | 2023/11/10 04:45:45.861 [DHCP] DHCP boot file is <ipxe.bios.0>
iventoy    | 2023/11/10 04:45:49.871 [DHCP] Proc DHCP DISCOVER pkt from client 34e6-d748-085c
iventoy    | 2023/11/10 04:45:49.871 [DHCP] The client already exist, 172.18.0.200 34e6-d748-085c dhcp_rfc_proc_discover 1432
iventoy    | 2023/11/10 04:45:49.871 [DHCP] Use the Last IP for PXE Client(aa-bb-cc-dd-ee-ff) in normal mode.
iventoy    | 2023/11/10 04:45:49.871 [DHCP] Recv DHCP Discover from 34e6-d748-085c, response DHCP OFFER with ip 172.18.0.200/255.255.0.0
iventoy    | 2023/11/10 04:45:49.871 [DHCP] DHCP boot file is <ipxe.bios.0>
iventoy    | 2023/11/10 04:45:53.880 [DHCP] Proc DHCP DISCOVER pkt from client 34e6-d748-085c
iventoy    | 2023/11/10 04:45:53.880 [DHCP] The client already exist, 172.18.0.200 34e6-d748-085c dhcp_rfc_proc_discover 1432
iventoy    | 2023/11/10 04:45:53.880 [DHCP] Use the Last IP for PXE Client(aa-bb-cc-dd-ee-ff) in normal mode.
iventoy    | 2023/11/10 04:45:53.880 [DHCP] Recv DHCP Discover from 34e6-d748-085c, response DHCP OFFER with ip 172.18.0.200/255.255.0.0
iventoy    | 2023/11/10 04:45:53.880 [DHCP] DHCP boot file is <ipxe.bios.0>
iventoy    | 2023/11/10 04:45:57.890 [DHCP] Proc DHCP DISCOVER pkt from client 34e6-d748-085c
iventoy    | 2023/11/10 04:45:57.890 [DHCP] The client already exist, 172.18.0.200 34e6-d748-085c dhcp_rfc_proc_discover 1432
iventoy    | 2023/11/10 04:45:57.890 [DHCP] Use the Last IP for PXE Client(aa-bb-cc-dd-ee-ff) in normal mode.
iventoy    | 2023/11/10 04:45:57.890 [DHCP] Recv DHCP Discover from 34e6-d748-085c, response DHCP OFFER with ip 172.18.0.200/255.255.0.0
iventoy    | 2023/11/10 04:45:57.890 [DHCP] DHCP boot file is <ipxe.bios.0>
iventoy    | 2023/11/10 04:46:01.899 [DHCP] Proc DHCP DISCOVER pkt from client 34e6-d748-085c
iventoy    | 2023/11/10 04:46:01.899 [DHCP] The client already exist, 172.18.0.200 34e6-d748-085c dhcp_rfc_proc_discover 1432
iventoy    | 2023/11/10 04:46:01.899 [DHCP] Use the Last IP for PXE Client(aa-bb-cc-dd-ee-ff) in normal mode.
iventoy    | 2023/11/10 04:46:01.899 [DHCP] Recv DHCP Discover from 34e6-d748-085c, response DHCP OFFER with ip 172.18.0.200/255.255.0.0
iventoy    | 2023/11/10 04:46:01.899 [DHCP] DHCP boot file is <ipxe.bios.0>
iventoy    | 2023/11/10 04:46:05.909 [DHCP] Proc DHCP DISCOVER pkt from client 34e6-d748-085c
iventoy    | 2023/11/10 04:46:05.909 [DHCP] The client already exist, 172.18.0.200 34e6-d748-085c dhcp_rfc_proc_discover 1432
iventoy    | 2023/11/10 04:46:05.909 [DHCP] Use the Last IP for PXE Client(aa-bb-cc-dd-ee-ff) in normal mode.
iventoy    | 2023/11/10 04:46:05.909 [DHCP] Recv DHCP Discover from 34e6-d748-085c, response DHCP OFFER with ip 172.18.0.200/255.255.0.0
iventoy    | 2023/11/10 04:46:05.909 [DHCP] DHCP boot file is <ipxe.bios.0>
iventoy    | 2023/11/10 04:46:09.918 [DHCP] Proc DHCP DISCOVER pkt from client 34e6-d748-085c
iventoy    | 2023/11/10 04:46:09.919 [DHCP] The client already exist, 172.18.0.200 34e6-d748-085c dhcp_rfc_proc_discover 1432
iventoy    | 2023/11/10 04:46:09.919 [DHCP] Use the Last IP for PXE Client(aa-bb-cc-dd-ee-ff) in normal mode.
iventoy    | 2023/11/10 04:46:09.919 [DHCP] Recv DHCP Discover from 34e6-d748-085c, response DHCP OFFER with ip 172.18.0.200/255.255.0.0
iventoy    | 2023/11/10 04:46:09.919 [DHCP] DHCP boot file is <ipxe.bios.0>

It launches although the client fails with PXE-E53. I suppose I've merely forgotten to do something.

zidesm commented

Do you've legacy boot enabled on the client?