rejetto / hfs

HFS is a web file server to run on your computer. Share folders or even a single file thanks to the virtual file system.
GNU General Public License v3.0
1.93k stars 189 forks source link

HFS3 on Ubuntu 22.04 jammy, can't start admin of find the executable. #423

Closed accnetdev closed 6 months ago

accnetdev commented 6 months ago

Hi,

Please help as I would be able to use your great HFS3 on Linux Boxes.

OS: Linux Ubuntu 22.04 Amd64 node -v get: v18.19.0 Using the help on your github, I created the service and it is running.

sudo systemctl daemon-reload && sudo systemctl enable hfs && sudo systemctl start hfs && sudo systemctl status hfs Created symlink /etc/systemd/system/multi-user.target.wants/hfs.service → /etc/systemd/system/hfs.service. ● hfs.service - HFS Loaded: loaded (/etc/systemd/system/hfs.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2023-12-29 09:04:47 CET; 11ms ago Main PID: 16494 (node) Tasks: 6 (limit: 6960) Memory: 7.9M CPU: 6ms CGroup: /system.slice/hfs.service └─16494 node /usr/bin/npx -y hfs@latest

What to do now? Nothing is displayed in a browser to get admin, I don't know which port tcp/ip and URL I could use to try to connect to admin and I don't know where is located the hfs executable (was it installed by npm?).

I also created a bug report about Linux Ubuntu 20.04 ARM, it was quite the same issues.

rejetto commented 6 months ago

it doesn't look like the same issue: on the arm it's probably not running, while here it is probably running but you don't know how to access it. You need to look at the output of HFS, but when it runs as a service it is hidden, that's normal. How to look at it depends on your operating system. I'm no linux user, so I don't have this information at the moment. I'll try to google for it, and make a test.

There are also a few alternative ways of solving your case that I can think of are are

but I would first focus on the main method

rejetto commented 6 months ago

i just removed the reference to w3m as it doesn't support js. Browsh is excellent but it's my understanding that it requires firefox to be installed too, so it may not be a viable alternative.

accnetdev commented 6 months ago

OK it it not the same issue. I have access to a gui (KDE) and when I point to http://localhost I get a standard error. Please for the moment, forget the ARM issue (which is less important for the community). The 22.04 x86 is probably what is the most important and all is OK according to your linux manual, now we have to find the following of your manual to give access to the admin part of HFS3 or to the location of config.yaml on linux when HFS3 is installed as a service.

rejetto commented 6 months ago

chatgpt is suggesting: sudo journalctl -u hfs

the location of config.yaml is ~/.hfs but ~ depends on the user running, and for the service it's possibly not you. You could just search for the .hfs folder or config.yaml in every user folder. I guess you don't have that many users on your system :)

accnetdev commented 6 months ago

I have no .hfs in my profile. I am going to search anywhere in the system...

accnetdev commented 6 months ago

Using locate after updatedb (to refresh its db), it does not find a config.yaml in the whole system... And the command : locate .yaml gives : /etc/netplan/01-network-manager-all.yaml /usr/lib/x86_64-linux-gnu/calamares/modules/bootloader/bootloader.schema.yaml /usr/lib/x86_64-linux-gnu/calamares/modules/bootloader/test.yaml /usr/lib/x86_64-linux-gnu/calamares/modules/displaymanager/displaymanager.schema.yaml /usr/lib/x86_64-linux-gnu/calamares/modules/fstab/fstab.schema.yaml /usr/lib/x86_64-linux-gnu/calamares/modules/fstab/test.yaml /usr/lib/x86_64-linux-gnu/calamares/modules/fstab/test2.yaml /usr/lib/x86_64-linux-gnu/calamares/modules/grubcfg/grubcfg.schema.yaml /usr/lib/x86_64-linux-gnu/calamares/modules/mount/mount.schema.yaml /usr/lib/x86_64-linux-gnu/calamares/modules/packages/packages.schema.yaml /usr/lib/x86_64-linux-gnu/calamares/modules/plymouthcfg/plymouthcfg.schema.yaml /usr/lib/x86_64-linux-gnu/calamares/modules/services-systemd/services-systemd.schema.yaml /usr/lib/x86_64-linux-gnu/calamares/modules/unpackfs/unpackfs.schema.yaml /usr/share/doc/netplan/examples/bonding.yaml /usr/share/doc/netplan/examples/bonding_router.yaml /usr/share/doc/netplan/examples/bridge.yaml /usr/share/doc/netplan/examples/bridge_vlan.yaml /usr/share/doc/netplan/examples/dhcp.yaml /usr/share/doc/netplan/examples/dhcp_wired8021x.yaml /usr/share/doc/netplan/examples/direct_connect_gateway.yaml /usr/share/doc/netplan/examples/direct_connect_gateway_ipv6.yaml /usr/share/doc/netplan/examples/infiniband.yaml /usr/share/doc/netplan/examples/ipv6_tunnel.yaml /usr/share/doc/netplan/examples/loopback_interface.yaml /usr/share/doc/netplan/examples/modem.yaml /usr/share/doc/netplan/examples/network_manager.yaml /usr/share/doc/netplan/examples/offload.yaml /usr/share/doc/netplan/examples/openvswitch.yaml /usr/share/doc/netplan/examples/route_metric.yaml /usr/share/doc/netplan/examples/source_routing.yaml /usr/share/doc/netplan/examples/sriov.yaml /usr/share/doc/netplan/examples/sriov_vlan.yaml /usr/share/doc/netplan/examples/static.yaml /usr/share/doc/netplan/examples/static_multiaddress.yaml /usr/share/doc/netplan/examples/static_singlenic_multiip_multigateway.yaml /usr/share/doc/netplan/examples/vlan.yaml /usr/share/doc/netplan/examples/vrf.yaml /usr/share/doc/netplan/examples/vxlan.yaml /usr/share/doc/netplan/examples/windows_dhcp_server.yaml /usr/share/doc/netplan/examples/wireguard.yaml /usr/share/doc/netplan/examples/wireless.yaml /usr/share/doc/netplan/examples/wpa_enterprise.yaml /usr/share/doc/python3-yaml/examples/pygments-lexer/example.yaml /usr/share/vim/registry/espeak.yaml

locate hfs Gives : /boot/grub/i386-pc/hfs.mod /boot/grub/i386-pc/hfsplus.mod /boot/grub/i386-pc/hfspluscomp.mod /etc/systemd/system/hfs.service /etc/systemd/system/multi-user.target.wants/hfs.service /usr/bin/mksquashfs /usr/bin/sshfs /usr/bin/unsquashfs /usr/lib/grub/i386-efi/hfs.mod /usr/lib/grub/i386-efi/hfsplus.mod /usr/lib/grub/i386-efi/hfspluscomp.mod /usr/lib/grub/i386-pc/hfs.mod /usr/lib/grub/i386-pc/hfsplus.mod /usr/lib/grub/i386-pc/hfspluscomp.mod /usr/lib/grub/x86_64-efi/hfs.mod /usr/lib/grub/x86_64-efi/hfsplus.mod /usr/lib/grub/x86_64-efi/hfspluscomp.mod /usr/lib/mc/extfs.d/patchfs /usr/lib/modules/5.15.0-89-generic/kernel/fs/hfs /usr/lib/modules/5.15.0-89-generic/kernel/fs/hfsplus /usr/lib/modules/5.15.0-89-generic/kernel/fs/hfs/hfs.ko /usr/lib/modules/5.15.0-89-generic/kernel/fs/hfsplus/hfsplus.ko /usr/lib/modules/5.15.0-89-generic/kernel/net/sched/sch_hfsc.ko /usr/lib/modules/5.15.0-91-generic/kernel/fs/hfs /usr/lib/modules/5.15.0-91-generic/kernel/fs/hfsplus /usr/lib/modules/5.15.0-91-generic/kernel/fs/hfs/hfs.ko /usr/lib/modules/5.15.0-91-generic/kernel/fs/hfsplus/hfsplus.ko /usr/lib/modules/5.15.0-91-generic/kernel/net/sched/sch_hfsc.ko /usr/lib/x86_64-linux-gnu/libcephfs.so.2 /usr/lib/x86_64-linux-gnu/libcephfs.so.2.0.0 /usr/lib/x86_64-linux-gnu/libhfsp.so.0 /usr/lib/x86_64-linux-gnu/libhfsp.so.0.0.0 /usr/lib/x86_64-linux-gnu/libhfstospell.so.11 /usr/lib/x86_64-linux-gnu/libhfstospell.so.11.0.0 /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-hfsplus /usr/sbin/mount.fuse.sshfs /usr/sbin/mount.sshfs /usr/share/bash-completion/completions/sshfs /usr/share/bug/sshfs /usr/share/bug/sshfs/presubj /usr/share/doc/hfsplus /usr/share/doc/libcephfs2 /usr/share/doc/libguestfs-hfsplus /usr/share/doc/libhfsp0 /usr/share/doc/libhfstospell11 /usr/share/doc/squashfs-tools /usr/share/doc/sshfs /usr/share/doc/hfsplus/changelog.Debian.gz /usr/share/doc/hfsplus/copyright /usr/share/doc/libcephfs2/changelog.Debian.gz /usr/share/doc/libcephfs2/copyright /usr/share/doc/libguestfs-hfsplus/changelog.Debian.gz /usr/share/doc/libguestfs-hfsplus/copyright /usr/share/doc/libhfsp0/NEWS.gz /usr/share/doc/libhfsp0/README /usr/share/doc/libhfsp0/bugs.html /usr/share/doc/libhfsp0/changelog.Debian.gz /usr/share/doc/libhfsp0/copyright /usr/share/doc/libhfsp0/faq.html /usr/share/doc/libhfsp0/hfsp.html /usr/share/doc/libhfsp0/libhfsp.html /usr/share/doc/libhfstospell11/changelog.Debian.gz /usr/share/doc/libhfstospell11/copyright /usr/share/doc/squashfs-tools/changelog.Debian.gz /usr/share/doc/squashfs-tools/copyright /usr/share/doc/sshfs/AUTHORS /usr/share/doc/sshfs/README.Debian /usr/share/doc/sshfs/README.rst /usr/share/doc/sshfs/changelog.Debian.gz /usr/share/doc/sshfs/copyright /usr/share/icons/Linuxfx-11/mimetypes/scalable/application-vnd.squashfs.svg /usr/share/icons/We10X/mimes/48/application-vnd.squashfs.svg /usr/share/icons/Win11/mimes/48/application-vnd.squashfs.svg /usr/share/icons/breeze/mimetypes/16/application-vnd.squashfs.svg /usr/share/icons/breeze/mimetypes/22/application-vnd.squashfs.svg /usr/share/icons/breeze/mimetypes/24/application-vnd.squashfs.svg /usr/share/icons/breeze/mimetypes/32/application-vnd.squashfs.svg /usr/share/icons/breeze/mimetypes/64/application-vnd.squashfs.svg /usr/share/icons/breeze-dark/mimetypes/16/application-vnd.squashfs.svg /usr/share/icons/breeze-dark/mimetypes/22/application-vnd.squashfs.svg /usr/share/icons/breeze-dark/mimetypes/24/application-vnd.squashfs.svg /usr/share/icons/breeze-dark/mimetypes/32/application-vnd.squashfs.svg /usr/share/icons/breeze-dark/mimetypes/64/application-vnd.squashfs.svg /usr/share/lintian/overrides/libcephfs2 /usr/share/man/man1/mksquashfs.1.gz /usr/share/man/man1/sshfs.1.gz /usr/share/man/man1/unsquashfs.1.gz /usr/share/man/man7/hfsplus.7.gz /usr/share/man/man7/tc-hfsc.7.gz /usr/share/man/man8/tc-hfsc.8.gz /usr/share/mime/application/vnd.squashfs.xml /usr/src/linux-headers-5.15.0-89/fs/hfs /usr/src/linux-headers-5.15.0-89/fs/hfsplus /usr/src/linux-headers-5.15.0-89/fs/squashfs /usr/src/linux-headers-5.15.0-89/fs/hfs/Kconfig /usr/src/linux-headers-5.15.0-89/fs/hfs/Makefile /usr/src/linux-headers-5.15.0-89/fs/hfsplus/Kconfig /usr/src/linux-headers-5.15.0-89/fs/hfsplus/Makefile /usr/src/linux-headers-5.15.0-89/fs/squashfs/Kconfig /usr/src/linux-headers-5.15.0-89/fs/squashfs/Makefile /usr/src/linux-headers-5.15.0-91/fs/hfs /usr/src/linux-headers-5.15.0-91/fs/hfsplus /usr/src/linux-headers-5.15.0-91/fs/squashfs /usr/src/linux-headers-5.15.0-91/fs/hfs/Kconfig /usr/src/linux-headers-5.15.0-91/fs/hfs/Makefile /usr/src/linux-headers-5.15.0-91/fs/hfsplus/Kconfig /usr/src/linux-headers-5.15.0-91/fs/hfsplus/Makefile /usr/src/linux-headers-5.15.0-91/fs/squashfs/Kconfig /usr/src/linux-headers-5.15.0-91/fs/squashfs/Makefile /var/lib/dpkg/info/hfsplus.list /var/lib/dpkg/info/hfsplus.md5sums /var/lib/dpkg/info/libcephfs2.list /var/lib/dpkg/info/libcephfs2.md5sums /var/lib/dpkg/info/libcephfs2.shlibs /var/lib/dpkg/info/libcephfs2.symbols /var/lib/dpkg/info/libcephfs2.triggers /var/lib/dpkg/info/libguestfs-hfsplus:amd64.list /var/lib/dpkg/info/libguestfs-hfsplus:amd64.md5sums /var/lib/dpkg/info/libhfsp0.list /var/lib/dpkg/info/libhfsp0.md5sums /var/lib/dpkg/info/libhfsp0.shlibs /var/lib/dpkg/info/libhfsp0.symbols /var/lib/dpkg/info/libhfsp0.triggers /var/lib/dpkg/info/libhfstospell11:amd64.list /var/lib/dpkg/info/libhfstospell11:amd64.md5sums /var/lib/dpkg/info/libhfstospell11:amd64.shlibs /var/lib/dpkg/info/libhfstospell11:amd64.triggers /var/lib/dpkg/info/squashfs-tools.list /var/lib/dpkg/info/squashfs-tools.md5sums /var/lib/dpkg/info/sshfs.list /var/lib/dpkg/info/sshfs.md5sums

accnetdev commented 6 months ago

No trace of HFS executable or config.yaml

However : udo systemctl status hfs ● hfs.service - HFS Loaded: loaded (/etc/systemd/system/hfs.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2023-12-29 11:07:40 CET; 1min 43s ago Main PID: 43116 (npm exec hfs@la) Tasks: 11 (limit: 6960) Memory: 28.9M CPU: 442ms CGroup: /system.slice/hfs.service └─43116 "npm exec hfs@latest" "" "" "" "" "" "" "" "" "" "" "" ""

déc. 29 11:07:40 wubuntu systemd[1]: Started HFS.

rejetto commented 6 months ago

i suspect hfs is NOT running on your system. I have an ubuntu 22 on a VM, and launching the same command as you, i get this, and that's quite different

image

my advice is you to try to run it NOT as a service first, and see if it works. launch npx hfs@latest

rejetto commented 6 months ago

if you cannot use port 80 try with sudo sudo npx hfs@latest

accnetdev commented 6 months ago

sudo systemctl status hfs ○ hfs.service - HFS Loaded: loaded (/etc/systemd/system/hfs.service; enabled; vendor preset: enabled) Active: inactive (dead) since Fri 2023-12-29 11:15:09 CET; 2min 34s ago Process: 43116 ExecStart=/usr/bin/npx -y hfs@latest (code=killed, signal=TERM) Main PID: 43116 (code=killed, signal=TERM) CPU: 454ms

déc. 29 11:07:40 wubuntu systemd[1]: Started HFS. déc. 29 11:15:09 wubuntu systemd[1]: Stopping HFS... déc. 29 11:15:09 wubuntu systemd[1]: hfs.service: Deactivated successfully. déc. 29 11:15:09 wubuntu systemd[1]: Stopped HFS. eproust@wubuntu:~$ sudo npx hfs@latest

Nothing happens, I have have to break the command using Ctrl-C

rejetto commented 6 months ago

try: sudo node -v

accnetdev commented 6 months ago

sudo node -v v18.19.0

accnetdev commented 6 months ago

Do I should remove the service, if stopping is not enough?

gbrlfrc commented 6 months ago

Hey @accnetdev, so, Im trying to create an environment as similar as possible to yours. In the meanwhile can I ask you to post the output of the following comands:

An additional question for you: do you remember if you installed node via nvm or by adding the apt repository ? My guess is that HFS never started, thats why you cannot find its file.

PS: please post the output using the snippet notation or by attaching the output as file.

accnetdev commented 6 months ago

cat /etc/os-release

PRETTY_NAME="Windows Ubuntu 11.4.3" NAME="Windows Ubuntu" VERSION_ID="22.04" VERSION="11.4.3" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.wubuntu.org/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy

env | grep node

Nothing displayed

cat /etc/systemd/system/hfs.service

[Unit] Description=HFS After=network.target

[Service] Type=simple Restart=always ExecStart=/usr/bin/npx -y hfs@latest

[Install] WantedBy=multi-user.target

which npx

/usr/bin/npx

systemctl daemon-reload && sudo systemctl restart hfs.service

Nothing displayed

journalctl -u hfs.service

déc. 29 09:04:47 wubuntu systemd[1]: Started HFS. déc. 29 09:12:27 wubuntu npx[16494]: npm ERR! code ETIMEDOUT déc. 29 09:12:27 wubuntu npx[16494]: npm ERR! syscall connect déc. 29 09:12:27 wubuntu npx[16494]: npm ERR! errno ETIMEDOUT déc. 29 09:12:27 wubuntu npx[16494]: npm ERR! network request to https://registry.npmjs.org/hfs failed, reason: connect ETIMEDOUT 2606:4700::6810:123:443 déc. 29 09:12:27 wubuntu npx[16494]: npm ERR! network This is a problem related to network connectivity. déc. 29 09:12:27 wubuntu npx[16494]: npm ERR! network In most cases you are behind a proxy or have bad network settings. déc. 29 09:12:27 wubuntu npx[16494]: npm ERR! network déc. 29 09:12:27 wubuntu npx[16494]: npm ERR! network If you are behind a proxy, please make sure that the déc. 29 09:12:27 wubuntu npx[16494]: npm ERR! network 'proxy' config is set properly. See: 'npm help config' déc. 29 09:12:27 wubuntu npx[16494]: npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-12-29T08_04_47_562Z-debug-0.log déc. 29 09:12:27 wubuntu systemd[1]: hfs.service: Main process exited, code=exited, status=1/FAILURE déc. 29 09:12:27 wubuntu systemd[1]: hfs.service: Failed with result 'exit-code'. déc. 29 09:12:28 wubuntu systemd[1]: hfs.service: Scheduled restart job, restart counter is at 1. déc. 29 09:12:28 wubuntu systemd[1]: Stopped HFS. déc. 29 09:12:28 wubuntu systemd[1]: Started HFS. déc. 29 09:20:08 wubuntu npx[19404]: npm ERR! code ETIMEDOUT déc. 29 09:20:08 wubuntu npx[19404]: npm ERR! syscall connect déc. 29 09:20:08 wubuntu npx[19404]: npm ERR! errno ETIMEDOUT déc. 29 09:20:08 wubuntu npx[19404]: npm ERR! network request to https://registry.npmjs.org/hfs failed, reason: connect ETIMEDOUT 2606:4700::6810:1a22:443 déc. 29 09:20:08 wubuntu npx[19404]: npm ERR! network This is a problem related to network connectivity. déc. 29 09:20:08 wubuntu npx[19404]: npm ERR! network In most cases you are behind a proxy or have bad network settings. déc. 29 09:20:08 wubuntu npx[19404]: npm ERR! network déc. 29 09:20:08 wubuntu npx[19404]: npm ERR! network If you are behind a proxy, please make sure that the déc. 29 09:20:08 wubuntu npx[19404]: npm ERR! network 'proxy' config is set properly. See: 'npm help config' déc. 29 09:20:08 wubuntu npx[19404]: npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-12-29T08_12_28_360Z-debug-0.log déc. 29 09:20:08 wubuntu systemd[1]: hfs.service: Main process exited, code=exited, status=1/FAILURE déc. 29 09:20:08 wubuntu systemd[1]: hfs.service: Failed with result 'exit-code'. déc. 29 09:20:08 wubuntu systemd[1]: hfs.service: Scheduled restart job, restart counter is at 2. déc. 29 09:20:08 wubuntu systemd[1]: Stopped HFS. déc. 29 09:20:08 wubuntu systemd[1]: Started HFS. déc. 29 09:27:49 wubuntu npx[21072]: npm ERR! code ETIMEDOUT déc. 29 09:27:49 wubuntu npx[21072]: npm ERR! syscall connect déc. 29 09:27:49 wubuntu npx[21072]: npm ERR! errno ETIMEDOUT déc. 29 09:27:49 wubuntu npx[21072]: npm ERR! network request to https://registry.npmjs.org/hfs failed, reason: connect ETIMEDOUT 2606:4700::6810:23:443 déc. 29 09:27:49 wubuntu npx[21072]: npm ERR! network This is a problem related to network connectivity. déc. 29 09:27:49 wubuntu npx[21072]: npm ERR! network In most cases you are behind a proxy or have bad network settings. déc. 29 09:27:49 wubuntu npx[21072]: npm ERR! network déc. 29 09:27:49 wubuntu npx[21072]: npm ERR! network If you are behind a proxy, please make sure that the déc. 29 09:27:49 wubuntu npx[21072]: npm ERR! network 'proxy' config is set properly. See: 'npm help config' déc. 29 09:27:49 wubuntu npx[21072]: npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-12-29T08_20_09_074Z-debug-0.log déc. 29 09:27:49 wubuntu systemd[1]: hfs.service: Main process exited, code=exited, status=1/FAILURE déc. 29 09:27:49 wubuntu systemd[1]: hfs.service: Failed with result 'exit-code'. déc. 29 09:27:49 wubuntu systemd[1]: hfs.service: Scheduled restart job, restart counter is at 3. déc. 29 09:27:49 wubuntu systemd[1]: Stopped HFS. déc. 29 09:27:49 wubuntu systemd[1]: Started HFS. déc. 29 09:35:30 wubuntu npx[22532]: npm ERR! code ETIMEDOUT déc. 29 09:35:30 wubuntu npx[22532]: npm ERR! syscall connect déc. 29 09:35:30 wubuntu npx[22532]: npm ERR! errno ETIMEDOUT déc. 29 09:35:30 wubuntu npx[22532]: npm ERR! network request to https://registry.npmjs.org/hfs failed, reason: connect ETIMEDOUT 2606:4700::6810:1f22:443 déc. 29 09:35:30 wubuntu npx[22532]: npm ERR! network This is a problem related to network connectivity. déc. 29 09:35:30 wubuntu npx[22532]: npm ERR! network In most cases you are behind a proxy or have bad network settings. déc. 29 09:35:30 wubuntu npx[22532]: npm ERR! network déc. 29 09:35:30 wubuntu npx[22532]: npm ERR! network If you are behind a proxy, please make sure that the déc. 29 09:35:30 wubuntu npx[22532]: npm ERR! network 'proxy' config is set properly. See: 'npm help config' déc. 29 09:35:30 wubuntu npx[22532]: npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-12-29T08_27_49_849Z-debug-0.log déc. 29 09:35:30 wubuntu systemd[1]: hfs.service: Main process exited, code=exited, status=1/FAILURE déc. 29 09:35:30 wubuntu systemd[1]: hfs.service: Failed with result 'exit-code'. déc. 29 09:35:30 wubuntu systemd[1]: hfs.service: Scheduled restart job, restart counter is at 4. déc. 29 09:35:30 wubuntu systemd[1]: Stopped HFS. déc. 29 09:35:30 wubuntu systemd[1]: Started HFS. déc. 29 09:43:11 wubuntu npx[23873]: npm ERR! code ETIMEDOUT déc. 29 09:43:11 wubuntu npx[23873]: npm ERR! syscall connect déc. 29 09:43:11 wubuntu npx[23873]: npm ERR! errno ETIMEDOUT déc. 29 09:43:11 wubuntu npx[23873]: npm ERR! network request to https://registry.npmjs.org/hfs failed, reason: connect ETIMEDOUT 2606:4700::6810:1a22:443 déc. 29 09:43:11 wubuntu npx[23873]: npm ERR! network This is a problem related to network connectivity. déc. 29 09:43:11 wubuntu npx[23873]: npm ERR! network In most cases you are behind a proxy or have bad network settings. déc. 29 09:43:11 wubuntu npx[23873]: npm ERR! network déc. 29 09:43:11 wubuntu npx[23873]: npm ERR! network If you are behind a proxy, please make sure that the déc. 29 09:43:11 wubuntu npx[23873]: npm ERR! network 'proxy' config is set properly. See: 'npm help config' déc. 29 09:43:11 wubuntu npx[23873]: npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-12-29T08_35_30_580Z-debug-0.log déc. 29 09:43:11 wubuntu systemd[1]: hfs.service: Main process exited, code=exited, status=1/FAILURE déc. 29 09:43:11 wubuntu systemd[1]: hfs.service: Failed with result 'exit-code'. déc. 29 09:43:11 wubuntu systemd[1]: hfs.service: Scheduled restart job, restart counter is at 5. déc. 29 09:43:11 wubuntu systemd[1]: Stopped HFS. déc. 29 09:43:11 wubuntu systemd[1]: Started HFS. déc. 29 09:50:51 wubuntu npx[25183]: npm ERR! code ETIMEDOUT déc. 29 09:50:51 wubuntu npx[25183]: npm ERR! syscall connect déc. 29 09:50:51 wubuntu npx[25183]: npm ERR! errno ETIMEDOUT déc. 29 09:50:51 wubuntu npx[25183]: npm ERR! network request to https://registry.npmjs.org/hfs failed, reason: connect ETIMEDOUT 2606:4700::6810:1a22:443 déc. 29 09:50:51 wubuntu npx[25183]: npm ERR! network This is a problem related to network connectivity. déc. 29 09:50:51 wubuntu npx[25183]: npm ERR! network In most cases you are behind a proxy or have bad network settings. déc. 29 09:50:51 wubuntu npx[25183]: npm ERR! network déc. 29 09:50:51 wubuntu npx[25183]: npm ERR! network If you are behind a proxy, please make sure that the déc. 29 09:50:51 wubuntu npx[25183]: npm ERR! network 'proxy' config is set properly. See: 'npm help config' déc. 29 09:50:51 wubuntu npx[25183]: npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-12-29T08_43_11_583Z-debug-0.log déc. 29 09:50:51 wubuntu systemd[1]: hfs.service: Main process exited, code=exited, status=1/FAILURE déc. 29 09:50:51 wubuntu systemd[1]: hfs.service: Failed with result 'exit-code'. déc. 29 09:50:52 wubuntu systemd[1]: hfs.service: Scheduled restart job, restart counter is at 6. déc. 29 09:50:52 wubuntu systemd[1]: Stopped HFS. déc. 29 09:50:52 wubuntu systemd[1]: Started HFS. déc. 29 09:58:32 wubuntu npx[27579]: npm ERR! code ETIMEDOUT déc. 29 09:58:32 wubuntu npx[27579]: npm ERR! syscall connect déc. 29 09:58:32 wubuntu npx[27579]: npm ERR! errno ETIMEDOUT déc. 29 09:58:32 wubuntu npx[27579]: npm ERR! network request to https://registry.npmjs.org/hfs failed, reason: connect ETIMEDOUT 2606:4700::6810:1d22:443 déc. 29 09:58:32 wubuntu npx[27579]: npm ERR! network This is a problem related to network connectivity. déc. 29 09:58:32 wubuntu npx[27579]: npm ERR! network In most cases you are behind a proxy or have bad network settings. déc. 29 09:58:32 wubuntu npx[27579]: npm ERR! network déc. 29 09:58:32 wubuntu npx[27579]: npm ERR! network If you are behind a proxy, please make sure that the déc. 29 09:58:32 wubuntu npx[27579]: npm ERR! network 'proxy' config is set properly. See: 'npm help config' déc. 29 09:58:32 wubuntu npx[27579]: npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-12-29T08_50_52_343Z-debug-0.log déc. 29 09:58:32 wubuntu systemd[1]: hfs.service: Main process exited, code=exited, status=1/FAILURE déc. 29 09:58:32 wubuntu systemd[1]: hfs.service: Failed with result 'exit-code'. déc. 29 09:58:32 wubuntu systemd[1]: hfs.service: Scheduled restart job, restart counter is at 7. lines 1-104


Installation from procedure in : https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-22-04

Option 2 — Installing Node.js with Apt Using a NodeSource PPA

After I decided to install NVM for future nodejs management. Installed but not used to modify anything at the moment.

gbrlfrc commented 6 months ago

Oh, from the journalctl logs looks like you are not able to reach registry.npmjs.org, you have some sort of connection issue, I dont think is related to HFS its-self.

To check it, pls run:

Additionally, have you tried running hfs using the binary file? You can download it from here: HFS Binary File

accnetdev commented 6 months ago

nslookup registry.npmjs.org

Server: 127.0.0.53 Address: 127.0.0.53#53

Non-authoritative answer: Name: registry.npmjs.org Address: 104.16.25.34 Name: registry.npmjs.org Address: 104.16.2.35 Name: registry.npmjs.org Address: 104.16.29.34 Name: registry.npmjs.org Address: 104.16.1.35 Name: registry.npmjs.org Address: 104.16.30.34 Name: registry.npmjs.org Address: 104.16.27.34 Name: registry.npmjs.org Address: 104.16.31.34 Name: registry.npmjs.org Address: 104.16.24.34 Name: registry.npmjs.org Address: 104.16.28.34 Name: registry.npmjs.org Address: 104.16.26.34 Name: registry.npmjs.org Address: 104.16.3.35 Name: registry.npmjs.org Address: 104.16.0.35 Name: registry.npmjs.org Address: 2606:4700::6810:1b22 Name: registry.npmjs.org Address: 2606:4700::6810:23 Name: registry.npmjs.org Address: 2606:4700::6810:123 Name: registry.npmjs.org Address: 2606:4700::6810:323 Name: registry.npmjs.org Address: 2606:4700::6810:1d22 Name: registry.npmjs.org Address: 2606:4700::6810:1922 Name: registry.npmjs.org Address: 2606:4700::6810:223 Name: registry.npmjs.org Address: 2606:4700::6810:1a22 Name: registry.npmjs.org Address: 2606:4700::6810:1f22 Name: registry.npmjs.org Address: 2606:4700::6810:1c22 Name: registry.npmjs.org Address: 2606:4700::6810:1822 Name: registry.npmjs.org Address: 2606:4700::6810:1e22

ping registry.npmjs.org

PING registry.npmjs.org(2606:4700::6810:1f22 (2606:4700::6810:1f22)) 56 data bytes ^C --- registry.npmjs.org ping statistics --- 69 packets transmitted, 0 received, 100% packet loss, time 69627ms

nc -zv registry.npmjs.org 443

^C

accnetdev commented 6 months ago

Using hfs executable in my home : /Apps/hfs-linux

./hfs

HFS ~ HTTP File Server - Copyright 2021-2023, Massimo Melina a@rejetto.com License https://www.gnu.org/licenses/gpl-3.0.txt started 2023-12-29 15:38:35 version 0.50.5 build 2023-12-28T14:52:48.139Z cwd /root/.hfs node v18.5.0 platform linux pid 93996 config config.yaml No config file, using defaults HINT: type "help" for help http serving on any network : 80 serving on http://192.168.1.137 serving on http://10.0.3.15 loading plugin antibrute

I can see HFS3 but can you give me the default password to admin? OK using your manual : create-admin pw This way it works, thanks! How to do it as a service?

gbrlfrc commented 6 months ago

Ok, definitely you are having connection issue ... that's why the npx command was hanging! The system is no able to download the repository , so its returns a connection timeout.

This is the guide to configure the password at the first boot. HFS.

To make it as a systemd service I think you can just use the previous one, changing the ExecStart command to run the binary file, so something like:

[Unit]
Description=HFS
After=network.target

[Service]
Type=simple
Restart=always
ExecStart=<absolute path to binary file>

[Install]
WantedBy=multi-user.target

I think @rejetto can close this thread since is not a bug related to HFS.

rejetto commented 6 months ago

@gbrlfrc is the best

accnetdev commented 6 months ago

+1 Thanks a lot! I will investigate on the connection issue (DNS or AdGuard Home) and replace ExecStart value by the absolute path to HFS binary. I am very happy to be able to use HFS3 on my Linux boxes. Have a good Christmas and new year holidays if you have some.