Ventoy Forums
Solved iVentory on the same server as a different DHCP server (Pi-Hole) - Printable Version

+- Ventoy Forums (https://forums.ventoy.net)
+-- Forum: iVentoy General Use —— iVentoy 使用交流 (https://forums.ventoy.net/forumdisplay.php?fid=7)
+--- Forum: iVentoy Discussion Forum (https://forums.ventoy.net/forumdisplay.php?fid=8)
+--- Thread: Solved iVentory on the same server as a different DHCP server (Pi-Hole) (/showthread.php?tid=2511)

Pages: 1 2


iVentory on the same server as a different DHCP server (Pi-Hole) - BrainStone - 06-30-2023

Hi,

I have a server which is running Pi-Hole with DHCP enabled. I would like to run iVentoy on the same machine.

So I switched DHCP server mode to external (hoping it would disable the DHCP server ran by iVentoy) and clicked start. Which resulted in iVentoy telling me that it could not bind the port:

Code:
2023/06/30 20:34:42.135 [HTTP] API request: <{"method":"start_server","ip":"10.69.42.42","mask":"255.255.255.0","gw":"10.69.42.1","pool_begin":"10.69.42.200","pool_end":"10.69.42.219"}>
2023/06/30 20:34:42.135 [DHCP] DHCP port 67(UDP) is in use now.

What can I do so this setup works?


RE: iVentory on the same server as a different DHCP server (Pi-Hole) - longpanda - 07-02-2023

Try 1.0.07


RE: iVentory on the same server as a different DHCP server (Pi-Hole) - hawkinf - 07-02-2023

i am trying to run iventoy on synology NAS, The NAS has his own DHCP server, so on iventoy, i selected External, but when i try to start on the browser i am getting:

iVentoy start failed: DHCP port is occupied by another program now!

Using here iventoy 1.0.07


RE: iVentory on the same server as a different DHCP server (Pi-Hole) - BrainStone - 07-02-2023

Yes. Sadly the same as hawkinf.


RE: iVentory on the same server as a different DHCP server (Pi-Hole) - longpanda - 07-03-2023

1. Please upload the log.txt
2. Try as follows:
1) Stop the NAS DHCP Server
2) Start iVentoy in External DHCP Server mode
3) Start the NAS DHCP Server again


RE: iVentory on the same server as a different DHCP server (Pi-Hole) - BrainStone - 07-03-2023

So I stopped my DHCP server, started iVentoy and the tried to start the DHCP server again, but that didn't work because iVentoy was binding the port:

Code:
~ # netstat -tupln | grep iventoy
tcp        0      0 0.0.0.0:26000           0.0.0.0:*               LISTEN      381110/iventoy     
tcp        0      0 10.69.42.42:10809       0.0.0.0:*               LISTEN      381110/iventoy     
tcp        0      0 10.69.42.42:16000       0.0.0.0:*               LISTEN      381110/iventoy     
udp        0      0 0.0.0.0:67              0.0.0.0:*                           381110/iventoy     
udp        0      0 10.69.42.42:69          0.0.0.0:*                           381110/iventoy

Log:
Code:
2023/07/03 03:18:45.696 [HTTP] API request: <{"method":"start_server","ip":"10.69.42.42","mask":"255.255.255.0","gw":"10.69.42.1","pool_begin":"10.69.42.200","pool_end":"10.69.42.219","dns_server":""}>
2023/07/03 03:18:45.696 [DHCP] DHCP port 67(UDP) is occupied by another program now.
2023/07/03 03:19:44.761 [HTTP] API request: <{"method":"start_server","ip":"10.69.42.42","mask":"255.255.255.0","gw":"10.69.42.1","pool_begin":"10.69.42.200","pool_end":"10.69.42.219","dns_server":""}>
2023/07/03 03:19:44.761 [PXE]  Update Mask[255.255.255.0 --> 255.255.255.0] GW[10.69.42.1 --> 10.69.42.1]
2023/07/03 03:19:44.761 [PXE]  iVentoy service is starting ...
2023/07/03 03:19:44.761 [DHCP] Old IP pool [0.0.0.0 - 0.0.0.0] unuseable, free dhcp db.
2023/07/03 03:19:44.761 [PXE]  [1] Phase2 parse image <iso/HBCD_PE_x64.iso> <UDF> starting...
2023/07/03 03:19:44.761 [PXE]  [1] locate wim data (wims:1) ...
2023/07/03 03:19:44.761 [PXE]  [2] Phase2 parse image <iso/Win10_22H2_German_x64v1.iso> <UDF> starting...
2023/07/03 03:19:44.761 [PXE]  [2] locate wim data (wims:1) ...
2023/07/03 03:19:44.762 [PXE]  [1] ExtraBuf totlen:906600 tool:905408 autonum:0 injectlen:0
2023/07/03 03:19:44.762 [PXE]  [1] @@ locate wim file </sources/boot.wim> ...
2023/07/03 03:19:44.762 [PXE]  [2] ExtraBuf totlen:906600 tool:905408 autonum:0 injectlen:0
2023/07/03 03:19:44.762 [PXE]  [2] @@ locate wim file </sources/boot.wim> ...
2023/07/03 03:19:44.771 [HTTP] API request: <{"method":"query_status"}>
2023/07/03 03:19:44.776 [PXE]  [1] @@@ overlen=8 overoff=13083052 fe_entry_size_offset=13082680 start_block=257 file_offset=1962133504
2023/07/03 03:19:44.785 [PXE]  [2] @@@ overlen=8 overoff=2603240 fe_entry_size_offset=2603064 start_block=304 file_offset=22818816
2023/07/03 03:19:44.796 [PXE]  [1] 575031 2274536 chunk_num=70
2023/07/03 03:19:44.804 [PXE]  [1] last chunk_size:3854 decompresslen:13544 tot:2274536
2023/07/03 03:19:44.804 [PXE]  [1] read lookup offset:1136294355 size:462950
2023/07/03 03:19:44.816 [PXE]  [1] search pecmd.exe 0x7f0a241fdbc8
2023/07/03 03:19:44.816 [PXE]  [1] search reg SYSTEM 0x7f0a24247d98
2023/07/03 03:19:44.816 [PXE]  [1] find system lookup entry_id:114 raw_size:8388608
2023/07/03 03:19:44.817 [PXE]  [2] 999124 5221896 chunk_num=139680926400672
2023/07/03 03:19:44.833 [PXE]  [1] 1533862 8388608 chunk_num=256
2023/07/03 03:19:44.838 [PXE]  [2] last chunk_size:2472 decompresslen:11784 tot:5221896
2023/07/03 03:19:44.838 [PXE]  [2] read lookup offset:694869551 size:775950
2023/07/03 03:19:44.854 [PXE]  [2] search pecmd.exe (nil)
2023/07/03 03:19:44.854 [PXE]  [2] search winpeshl.exe 0x7f0a281891a0
2023/07/03 03:19:44.854 [PXE]  [2] find replace file at 0x7f0a281891a0
2023/07/03 03:19:44.854 [PXE]  [2] search hash <b398925bedfcd765a7bff51f10c25d844f462baa>
2023/07/03 03:19:44.855 [PXE]  [2] find replace lookup entry_id:10642 raw_size:33280
2023/07/03 03:19:44.858 [PXE]  [1] last chunk_size:263 decompresslen:32768 tot:8388608
2023/07/03 03:19:44.858 [PXE]  [1] find registry cmdline i:12128 offset:(0x666798)6711192 size:(0x56)86
2023/07/03 03:19:44.858 [PXE]  [1] start offset is 0x66779c(6715292)
2023/07/03 03:19:44.858 [PXE]  [1] registry setup cmdline:<Pecmd.exe Main %Windir%\system32\Pecmd.ini>
2023/07/03 03:19:44.858 [PXE]  [1] @ directly use pecmd.exe 0x7f0a241fdbc8
2023/07/03 03:19:44.858 [PXE]  [1] find replace file at 0x7f0a241fdbc8
2023/07/03 03:19:44.858 [PXE]  [1] search hash <a58bae4d147d3ab1e818fb893d65e11f1c13707e>
2023/07/03 03:19:44.859 [PXE]  [1] find replace lookup entry_id:8516 raw_size:855040
2023/07/03 03:19:44.860 [PXE]  [2] 13272 33280 chunk_num=2
2023/07/03 03:19:44.860 [PXE]  [2] last chunk_size:144 decompresslen:512 tot:33280
2023/07/03 03:19:44.860 [PXE]  [2] jump exe </win/vtoypxe64.exe> len:187392 alignlen:187392
2023/07/03 03:19:44.861 [PXE]  [2] jump_exe_len:187392 bin_raw_len:1127340 bin_align_len:1128448
2023/07/03 03:19:44.861 [PXE]  [2] windows locate wim finish
2023/07/03 03:19:44.861 [PXE]  [2] Windows virt data new <Windows> ...
2023/07/03 03:19:44.861 [PXE]  [2] bootfix.bin data: 80 00 cd 13
2023/07/03 03:19:44.861 [PXE]  [2] Auto suppress BIOS cdrom prompt
2023/07/03 03:19:44.861 [PXE]  [2] Auto suppress UEFI cdrom prompt
2023/07/03 03:19:44.861 [PXE]  [2] UDF fill override data ...
2023/07/03 03:19:44.861 [PXE]  [2] PdSizeOffset=530624 tagOffset=530432
2023/07/03 03:19:44.861 [PXE]  [2] UDF tag valid OK, should match it.
2023/07/03 03:19:44.861 [PXE]  [2] UDF tag refresh OK.
2023/07/03 03:19:44.861 [PXE]  [2] ## virt wim file </sources/boot.wim> <695649605> <New:702777344> ...
2023/07/03 03:19:44.861 [PXE]  [2] file_entry and extend data in the same block.
2023/07/03 03:19:44.861 [PXE]  [2] fix tag override 224[2603024 - 2603248] 2603064 2603008 56
2023/07/03 03:19:44.861 [PXE]  [2] find target file, name_len:24, offset: 684304, upadte hash
2023/07/03 03:19:44.862 [PXE]  [2] find target file, name_len:24, offset: 3412656, upadte hash
2023/07/03 03:19:44.862 [PXE]  [2] update replace lookup entry_id:10642
2023/07/03 03:19:44.862 [PXE]  [2] find meta lookup entry_id:1, update resource head and hash(5221896)
2023/07/03 03:19:44.862 [PXE]  [2] Virt data ISO file size: 6154278912 6857056256
2023/07/03 03:19:44.862 [PXE]  [2] ================ OVERRIDE DUMP ================
2023/07/03 03:19:44.862 [PXE]  [2]  <0> [ 9816088 - 9816092 4 ]
2023/07/03 03:19:44.862 [PXE]  [2]  <1> [ 1056768 - 2531328 1474560 ]
2023/07/03 03:19:44.862 [PXE]  [2]  <2> [ 530432 - 530944 512 ]
2023/07/03 03:19:44.862 [PXE]  [2]  <3> [ 2603008 - 2603520 512 ]
2023/07/03 03:19:44.862 [PXE]  [2] ================ OVERRIDE DUMP ================
2023/07/03 03:19:44.862 [PXE]  [2] ================ VIRT RANGE DUMP ================
2023/07/03 03:19:44.862 [PXE]  [2]  <iso/Win10_22H2_German_x64v1.iso> WIM:1/1
2023/07/03 03:19:44.862 [PXE]  [2]  <01> [6154278912 - 6849929216 695650304 ] Remap
2023/07/03 03:19:44.862 [PXE]  [2]  <02> [6154278912 - 6154279120 208       ] Memory
2023/07/03 03:19:44.862 [PXE]  [2]  <03> [6849929216 - 6851057664 1128448   ] Memory
2023/07/03 03:19:44.862 [PXE]  [2]  <04> [6850116708 - 6850117732 1024      ] iVentoy Param
2023/07/03 03:19:44.862 [PXE]  [2]  <05> [6851057664 - 6856280064 5222400   ] Memory
2023/07/03 03:19:44.862 [PXE]  [2]  <06> [6851741968 - 6851741988 20        ] WIM BIN CHK
2023/07/03 03:19:44.862 [PXE]  [2]  <07> [6854470320 - 6854470340 20        ] WIM BIN CHK
2023/07/03 03:19:44.862 [PXE]  [2]  <08> [6856280064 - 6857056256 776192    ] Memory
2023/07/03 03:19:44.862 [PXE]  [2]  <09> [6856812194 - 6856812214 20        ] WIM BIN CHK
2023/07/03 03:19:44.862 [PXE]  [2]  <10> [6856280144 - 6856280164 20        ] WIM META CHK
2023/07/03 03:19:44.862 [PXE]  [2] ================ VIRT RANGE DUMP ================
2023/07/03 03:19:44.862 [PXE]  [2] Phase2 parse image <iso/Win10_22H2_German_x64v1.iso> finished success
2023/07/03 03:19:44.870 [PXE]  [1] 826767 855040 chunk_num=27
2023/07/03 03:19:44.873 [PXE]  [1] last chunk_size:1971 decompresslen:3072 tot:855040
2023/07/03 03:19:44.873 [PXE]  [1] jump exe </win/vtoypxe64.exe> len:187392 alignlen:187392
2023/07/03 03:19:44.875 [PXE]  [1] jump_exe_len:187392 bin_raw_len:1949100 bin_align_len:1949696
2023/07/03 03:19:44.875 [PXE]  [1] windows locate wim finish
2023/07/03 03:19:44.875 [PXE]  [1] Windows virt data new <WinPE> ...
2023/07/03 03:19:44.875 [PXE]  [1] UDF fill override data ...
2023/07/03 03:19:44.875 [PXE]  [1] PdSizeOffset=69824 tagOffset=69632
2023/07/03 03:19:44.875 [PXE]  [1] UDF tag valid OK, should match it.
2023/07/03 03:19:44.875 [PXE]  [1] UDF tag refresh OK.
2023/07/03 03:19:44.875 [PXE]  [1] ## virt wim file </sources/boot.wim> <1136759507> <New:1141450752> ...
2023/07/03 03:19:44.875 [PXE]  [1] file_entry and extend data in the same block.
2023/07/03 03:19:44.875 [PXE]  [1] fix tag override 428[13082640 - 13083068] 13082680 13082624 56
2023/07/03 03:19:44.875 [PXE]  [1] find target file, name_len:18, offset: 1165832, upadte hash
2023/07/03 03:19:44.875 [PXE]  [1] update replace lookup entry_id:8516
2023/07/03 03:19:44.875 [PXE]  [1] find meta lookup entry_id:0, update resource head and hash(2274536)
2023/07/03 03:19:44.875 [PXE]  [1] Virt data ISO file size: 3099203584 4240654336
2023/07/03 03:19:44.875 [PXE]  [1] ================ OVERRIDE DUMP ================
2023/07/03 03:19:44.875 [PXE]  [1]  <0> [ 69632 - 70144 512 ]
2023/07/03 03:19:44.875 [PXE]  [1]  <1> [ 13082624 - 13083136 512 ]
2023/07/03 03:19:44.875 [PXE]  [1] ================ OVERRIDE DUMP ================
2023/07/03 03:19:44.875 [PXE]  [1] ================ VIRT RANGE DUMP ================
2023/07/03 03:19:44.875 [PXE]  [1]  <iso/HBCD_PE_x64.iso> WIM:1/1
2023/07/03 03:19:44.875 [PXE]  [1]  <01> [3099203584 - 4235964416 1136760832] Remap
2023/07/03 03:19:44.875 [PXE]  [1]  <02> [3099203584 - 3099203792 208       ] Memory
2023/07/03 03:19:44.875 [PXE]  [1]  <03> [4235964416 - 4237914112 1949696   ] Memory
2023/07/03 03:19:44.875 [PXE]  [1]  <04> [4236151908 - 4236152932 1024      ] iVentoy Param
2023/07/03 03:19:44.875 [PXE]  [1]  <05> [4237914112 - 4240189440 2275328   ] Memory
2023/07/03 03:19:44.875 [PXE]  [1]  <06> [4239079944 - 4239079964 20        ] WIM BIN CHK
2023/07/03 03:19:44.875 [PXE]  [1]  <07> [4240189440 - 4240654336 464896    ] Memory
2023/07/03 03:19:44.875 [PXE]  [1]  <08> [4240615270 - 4240615290 20        ] WIM BIN CHK
2023/07/03 03:19:44.875 [PXE]  [1]  <09> [4240189470 - 4240189490 20        ] WIM META CHK
2023/07/03 03:19:44.875 [PXE]  [1] ================ VIRT RANGE DUMP ================
2023/07/03 03:19:44.875 [PXE]  [1] Phase2 parse image <iso/HBCD_PE_x64.iso> finished success
2023/07/03 03:19:44.875 [PXE]  Update ipxe menu 1 ...
2023/07/03 03:19:44.875 [PXE]  ================= IMG TREE DUMP =================
2023/07/03 03:19:44.875 [PXE]  HBCD_PE_x64.iso [1] <WIMS:1/1>
2023/07/03 03:19:44.875 [PXE]  Win10_22H2_German_x64v1.iso [2] <WIMS:1/1>
2023/07/03 03:19:44.875 [PXE]  ================================================
2023/07/03 03:19:44.875 [HTTP] HTTP PXE service starting ...
2023/07/03 03:19:44.875 [TFTP] TFTP service starting ...
2023/07/03 03:19:44.875 [HTTP] HTTP PXE service is running on 10.69.42.42:16000 ...
2023/07/03 03:19:44.876 [TFTP] TFTP write thread is running 80 ...
2023/07/03 03:19:44.876 [DHCP] DHCP service starting ...
2023/07/03 03:19:44.876 [UTIL] Bind Socket(10.69.42.42) to Device br0
2023/07/03 03:19:44.876 [TFTP] TFTP service is running ...
2023/07/03 03:19:44.876 [NBD]  NBD service starting ...
2023/07/03 03:19:44.876 [PXE]  Now save iventoy config data ...
2023/07/03 03:19:44.876 [DHCP] DHCP service is running ...
2023/07/03 03:19:44.876 [HTTP] NBD service is running on 10.69.42.42:10809 ...
2023/07/03 03:19:44.876 [PXE]  iventoy config data (data/config.dat) save OK
2023/07/03 03:19:44.876 [PXE]  ===========================================================
2023/07/03 03:19:44.876 [PXE]         iVentoy 1.0.07 [Linux 64] is running now ...
2023/07/03 03:19:44.876 [PXE]  ===========================================================
2023/07/03 03:19:45.275 [HTTP] API request: <{"method":"query_status"}>
2023/07/03 03:19:45.306 [HTTP] API request: <{"method":"sys_ip_list"}>
2023/07/03 03:19:45.321 [HTTP] API request: <{"method":"get_dhcp_mode"}>
2023/07/03 03:20:48.598 [HTTP] API request: <{"method":"stop_server"}>
2023/07/03 03:20:48.598 [PXE]  iVentoy service is stopping ...
2023/07/03 03:20:48.598 [PXE]  Now save iventoy config data ...
2023/07/03 03:20:48.598 [PXE]  iventoy config data (data/config.dat) save OK
2023/07/03 03:20:48.598 [PXE]  [1] image phase2 free for <iso/HBCD_PE_x64.iso>
2023/07/03 03:20:48.598 [PXE]  [1] wim location free
2023/07/03 03:20:48.598 [PXE]  [1] Windows virt data free <WinPE> ...
2023/07/03 03:20:48.598 [PXE]  [2] image phase2 free for <iso/Win10_22H2_German_x64v1.iso>
2023/07/03 03:20:48.598 [PXE]  [2] wim location free
2023/07/03 03:20:48.598 [PXE]  [2] Windows virt data free <Windows> ...
2023/07/03 03:20:48.598 [DHCP] DHCP service stop starting...
2023/07/03 03:20:48.598 [DHCP] DHCP service stop finished OK
2023/07/03 03:20:48.598 [TFTP] TFTP service stop starting...
2023/07/03 03:20:48.598 [TFTP] Wating for tftp write thread finish ...
2023/07/03 03:20:48.598 [TFTP] tftp write thread finished OK
2023/07/03 03:20:48.598 [TFTP] Wating for tftp read thread finish ...
2023/07/03 03:20:48.599 [TFTP] tftp read thread finished OK
2023/07/03 03:20:48.599 [TFTP] TFTP service stop finished OK
2023/07/03 03:20:48.599 [HTTP] HTTP PXE service stop starting...
2023/07/03 03:20:48.599 [HTTP] HTTP PXE master stop starting...
2023/07/03 03:20:48.599 [HTTP] HTTP PXE master stop finished OK
2023/07/03 03:20:48.599 [HTTP] HTTP PXE service stop finished OK
2023/07/03 03:20:48.599 [NBD]  NBD service stop starting...
2023/07/03 03:20:48.599 [NBD]  NBD master stop starting...
2023/07/03 03:20:48.599 [NBD]  NBD master stop finished OK
2023/07/03 03:20:48.599 [NBD]  NBD service stop finished OK
2023/07/03 03:20:48.599 [PXE]  iVentoy service stop OK.
2023/07/03 03:20:48.605 [HTTP] API request: <{"method":"query_status"}>
2023/07/03 03:20:48.667 [HTTP] API request: <{"method":"sys_ip_list"}>
2023/07/03 03:20:48.683 [HTTP] API request: <{"method":"get_dhcp_mode"}>



RE: iVentory on the same server as a different DHCP server (Pi-Hole) - Just_Fish - 07-03-2023

Exclamation since the iventoy provide the "next-server boot-files"
but Iventoy still need to responde dhcp request for "next-server boot-files" which would use UDP-67 and which is occupied by another program(your dhcp server) in your scene
this is not the bug .but I think dedicated DHCP server or dedicated Iventoy (not same IP)is better choise?

虽然iventoy 提供"next-server boot-files"
但是它任然需要回应DHCP请求.你的案例中你的67UDP被你的DHCP服务器占用了.所以iventoy 无法提供"next-server boot-files"
我觉得这个不是BUG.更好的办法其实DHCP服务器或者iventoy专用. Exclamation

Heart 1.0.0.7 has fix the bug


RE: iVentory on the same server as a different DHCP server (Pi-Hole) - BrainStone - 07-04-2023

I don't see why iVentoy would need to answer the requests if the already existing server can do so as well. Or why it would need to run on the default port


RE: iVentory on the same server as a different DHCP server (Pi-Hole) - BrainStone - 07-06-2023

Tried 1.0.08 with no difference


RE: iVentory on the same server as a different DHCP server (Pi-Hole) - longpanda - 07-19-2023

You can test with latest 1.0.16 with DHCP ExternalNet mode.
Before that please refer this for details:
https://www.iventoy.com/en/doc_ext_dhcp.html