Fast Reverse Proxy failing after installation

Thank you guys for DietPi, it is a wonderful project!

Creating a bug report/issue

I have searched the existing open and closed issues

System

  • DietPi v9.8.0 | Bookworm running on a RPi B (armv6l)
  • Software title: frp (fast reverse proxy)

Steps to reproduce

  1. newly installed headless DietPi (no Desktop Environment, no Webserver), running perfectly fine.
  2. Installed and configured tailscale via dietpi-software, runs fine
  3. Installed frp via dietpi-software as “server only”

Expected behaviour

  • frps should be available on defined port (default port 7000)
  • web-based dashboard should be available on port 7500

Actual behaviour

  • none of the defined ports are open
  • no web-based dashboard is available

Extra details

  • Dietpi-services says: frp [enabled], but: state [failed]
  • systemd log: frps. service: Failed with result 'signal'.

Also: the frp github states that the .ini file format will be deprecated, and .toml should be used. Maybe the dietpi frp install needs a general overhaul?

pls can you share following

journalctl -u frps

yes, of course.
I never manually started, stopped or restarted any services.

Nov 26 16:42:43 DietPi systemd[1]: Started frps.service - frp server (DietPi).
Nov 26 16:42:43 DietPi systemd[1]: frps.service: Main process exited, code=killed, status=4/ILL
Nov 26 16:42:43 DietPi systemd[1]: frps.service: Failed with result 'signal'.
Nov 26 16:42:48 DietPi systemd[1]: frps.service: Scheduled restart job, restart counter is at 1.
Nov 26 16:42:48 DietPi systemd[1]: Stopped frps.service - frp server (DietPi).
Nov 26 16:42:48 DietPi systemd[1]: Started frps.service - frp server (DietPi).
Nov 26 16:42:49 DietPi systemd[1]: frps.service: Main process exited, code=killed, status=4/ILL
Nov 26 16:42:49 DietPi systemd[1]: frps.service: Failed with result 'signal'.
Nov 26 16:42:54 DietPi systemd[1]: frps.service: Scheduled restart job, restart counter is at 2.
Nov 26 16:42:54 DietPi systemd[1]: Stopped frps.service - frp server (DietPi).
Nov 26 16:42:54 DietPi systemd[1]: Started frps.service - frp server (DietPi).
Nov 26 16:42:54 DietPi systemd[1]: frps.service: Main process exited, code=killed, status=4/ILL
Nov 26 16:42:54 DietPi systemd[1]: frps.service: Failed with result 'signal'.
Nov 26 16:42:59 DietPi systemd[1]: frps.service: Scheduled restart job, restart counter is at 3.
Nov 26 16:42:59 DietPi systemd[1]: Stopped frps.service - frp server (DietPi).
Nov 26 16:42:59 DietPi systemd[1]: frps.service: Start request repeated too quickly.
Nov 26 16:42:59 DietPi systemd[1]: frps.service: Failed with result 'signal'.
Nov 26 16:42:59 DietPi systemd[1]: Failed to start frps.service - frp server (DietPi).

hmm for me, both frpc and frps are working. I can open dashboard for client & server and ports are LISTEN as well

Nov 27 10:35:48 DietPi5 systemd[1]: Started frpc.service - frp client (DietPi).
Nov 27 10:35:48 DietPi5 frpc[1186]: WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead!
Nov 27 10:35:48 DietPi5 frpc[1186]: 2024-11-27 10:35:48.479 [I] [sub/root.go:142] start frpc service for config file [/etc/frp/frpc.ini]
Nov 27 10:35:48 DietPi5 frpc[1186]: 2024-11-27 10:35:48.479 [I] [client/service.go:295] try to connect to server...
Nov 27 10:35:48 DietPi5 frpc[1186]: 2024-11-27 10:35:48.479 [I] [client/service.go:174] admin server listen on 0.0.0.0:7400
Nov 27 10:35:48 DietPi5 frpc[1186]: 2024-11-27 10:35:48.488 [I] [client/service.go:287] [5b5535baecd326db] login to server success, get run id [5b5535baecd326db]
Nov 27 10:52:02 DietPi5 systemd[1]: Stopping frpc.service - frp client (DietPi)...
Nov 27 10:52:02 DietPi5 frpc[1186]:
Nov 27 10:52:02 DietPi5 systemd[1]: frpc.service: Deactivated successfully.
Nov 27 10:52:02 DietPi5 systemd[1]: Stopped frpc.service - frp client (DietPi).
Nov 27 10:52:02 DietPi5 systemd[1]: Started frpc.service - frp client (DietPi).
Nov 27 10:52:02 DietPi5 frpc[1230]: WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead!
Nov 27 10:52:02 DietPi5 frpc[1230]: 2024-11-27 10:52:02.931 [I] [sub/root.go:142] start frpc service for config file [/etc/frp/frpc.ini]
Nov 27 10:52:02 DietPi5 frpc[1230]: 2024-11-27 10:52:02.932 [I] [client/service.go:295] try to connect to server...
Nov 27 10:52:02 DietPi5 frpc[1230]: 2024-11-27 10:52:02.932 [I] [client/service.go:174] admin server listen on 0.0.0.0:7400
Nov 27 10:52:02 DietPi5 frpc[1230]: 2024-11-27 10:52:02.939 [I] [client/service.go:287] [055626b9d5412f50] login to server success, get run id [055626b9d5412f50]
Nov 27 10:35:43 DietPi5 systemd[1]: Started frps.service - frp server (DietPi).
Nov 27 10:35:43 DietPi5 frps[498]: WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead!
Nov 27 10:35:43 DietPi5 frps[498]: 2024-11-27 10:35:43.210 [I] [frps/root.go:105] frps uses config file: /etc/frp/frps.ini
Nov 27 10:35:43 DietPi5 frps[498]: 2024-11-27 10:35:43.723 [I] [server/service.go:237] frps tcp listen on 0.0.0.0:7000
Nov 27 10:35:43 DietPi5 frps[498]: 2024-11-27 10:35:43.723 [I] [frps/root.go:114] frps started successfully
Nov 27 10:35:43 DietPi5 frps[498]: 2024-11-27 10:35:43.723 [I] [server/service.go:351] dashboard listen on 0.0.0.0:7500
Nov 27 10:35:48 DietPi5 frps[498]: 2024-11-27 10:35:48.488 [I] [server/service.go:576] [5b5535baecd326db] client login info: ip [127.0.0.1:59324] version [0.61.0] hostname [] os [linux] arch [arm64]
Nov 27 10:52:02 DietPi5 frps[498]: 2024-11-27 10:52:02.913 [I] [server/control.go:357] [5b5535baecd326db] client exit success
Nov 27 10:52:02 DietPi5 frps[498]: 2024-11-27 10:52:02.938 [I] [server/service.go:576] [055626b9d5412f50] client login info: ip [127.0.0.1:33602] version [0.61.0] hostname [] os [linux] arch [arm64]
Nov 27 10:52:11 DietPi5 frps[498]: 2024-11-27 10:52:11.928 [I] [server/dashboard_api.go:107] Http request: [/api/serverinfo]
Nov 27 10:52:11 DietPi5 frps[498]: 2024-11-27 10:52:11.928 [I] [server/dashboard_api.go:100] Http response [/api/serverinfo]: code [200]
Nov 27 10:52:13 DietPi5 frps[498]: 2024-11-27 10:52:13.886 [I] [server/dashboard_api.go:227] Http request: [/api/proxy/tcp]
Nov 27 10:52:13 DietPi5 frps[498]: 2024-11-27 10:52:13.887 [I] [server/dashboard_api.go:221] Http response [/api/proxy/tcp]: code [200]
Nov 27 10:52:14 DietPi5 frps[498]: 2024-11-27 10:52:14.529 [I] [server/dashboard_api.go:227] Http request: [/api/proxy/udp]
Nov 27 10:52:14 DietPi5 frps[498]: 2024-11-27 10:52:14.529 [I] [server/dashboard_api.go:221] Http response [/api/proxy/udp]: code [200]
Nov 27 10:52:16 DietPi5 frps[498]: 2024-11-27 10:52:16.547 [I] [server/dashboard_api.go:107] Http request: [/api/serverinfo]
Nov 27 10:52:16 DietPi5 frps[498]: 2024-11-27 10:52:16.547 [I] [server/dashboard_api.go:100] Http response [/api/serverinfo]: code [200]
ss -tulpn | grep frp
tcp   LISTEN 0      4096               *:7400            *:*    users:(("frpc",pid=1230,fd=5))
tcp   LISTEN 0      4096               *:7500            *:*    users:(("frps",pid=498,fd=3))
tcp   LISTEN 0      4096               *:7000            *:*    users:(("frps",pid=498,fd=6))

Actually this is a waring only and should not prevent the service start.

ok let’s try to start it manually

systemctl stop frps
/usr/local/bin/frps -c /etc/frp/frps.ini

Thank you for your reply!

I followed your suggestion. While trying to stop the service as dietpi user, i got a failed to connect to bus, so I executed with sudo. Here the result:

dietpi@DietPi:~$ sudo systemctl stop frps
dietpi@DietPi:~$ sudo /usr/local/bin/frps -c /etc/frp/frps.ini
Ungültiger Maschinenbefehl
dietpi@DietPi:~$

„Ungültiger Maschinenbefehl“ translates to something like „invalid command“. So far I did not make any changes to the default .ini file, and if opened, the .ini file looks okay.

Also, ss -tulpn | grep frp showed no open ports for frp

I would recommend doing trouble shooting as user root

looks like frp doesn’t support your RPi B armv6l board anymore. Too bad, one more app that has dropped support on armv6

@MichaIng one app to block for armv6 device.

Dear @Joulinar
Thanks for your reply and troubleshooting!

If I understand correctly, I have to upgrade my hardware to a newer RPi to get frp to work?

My use case in brief: NAS behind CGNAT. RPi reachable via public IPv4. The goal is to expose a few services/ports from the NAS via the RPi to the public. frp would be a very good choice. Should I get a newer inexpensive RPi or try to achieve this with nginx/lighttpd/rathole or something else?

Thanks a lot!

Yes before starting to get a new hardware, you could use Nginx or Apache web server. Both are capable to do the job and quite common as reverse proxy

Have been looking at dietpi-software and for frp it defaults to arm_hf.

On frp release page there is available arm too.

It could work maybe? I don’t know what difference between arm_hf and arm is.

Unfortunetally I don’t have an ARMv6 board to test. There should be an RPP1 within my lab, but I’m not able to find it actually.

If anyone feels in the mood, they can test the following two versions on an ARMv6 device. Simply download, unzip and then try to start.

The same idea with the arm version crossed my mind as well.

I downloaded the arm package from github and was able to start the frp-server without failure! :tada: Web-Dashboard is accessible. So the arm package did the trick! Thank you!

From what I figure from a brief google search, arm_hf is supported by armv7+, so in my case (armv6), it wouldn’t work.

Ok, let me push a change to our DietPi Github to get a way of differentiating between ARMv6 and ARMv7 here. At least as an attempt :slight_smile:


EDIT:
ok can you do following, first remove FRP, switch to a testing branch and reinstall. Pls share full installation output.

dietpi-software uninstall 171
G_DEV_BRANCH frp
dietpi-software install 171
journalctl -u frps

of course:

uninstalled already before pulling the github version.

G_DEV_BRANCH frp --> Output
root@DietPi:/home/dietpi# G_DEV_BRANCH frp
[  OK  ] G_CONFIG_INJECT | Setting in /boot/dietpi.txt adjusted: DEV_GITBRANCH=frp

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Checking for available DietPi update

[  OK  ] DietPi-Update | Checking IPv4 network connectivity
[  OK  ] DietPi-Update | Checking DNS resolver
[ INFO ] DietPi-Update | Getting latest version from: https://raw.githubusercontent.com/MichaIng/DietPi/frp/.update/version
[  OK  ] DietPi-Update | Got valid latest version: 9.9.-1
[ INFO ] DietPi-Update | Repatch was requested: Subversion reduced to "7" to reapply the last update
[  OK  ] DietPi-Update | Update available:
[ INFO ] DietPi-Update | Current version : v9.7.0 (branch: MichaIng/master)
[ INFO ] DietPi-Update | Latest version  : v9.9.-1 (branch: MichaIng/frp)

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Checking for update pre-requirements

[  OK  ] DietPi-Update | DietPi-Userdata validation: /mnt/dietpi_userdata
[  OK  ] DietPi-Update | Free space check: path=/ | available=11681 MiB | required=100 MiB
[ SUB1 ] DietPi-Services > stop 
[  OK  ] DietPi-Services | stop : cron

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Applying pre-patches

[  OK  ] DietPi-Update | Downloading pre-patches
[  OK  ] DietPi-Update | Applying execute permission
[  OK  ] DietPi-Update | Successfully applied pre-patches

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Upgrading APT packages

[ INFO ] DietPi-Update | APT update, please wait...
Get:1 http://raspbian.raspberrypi.com/raspbian bookworm InRelease [15.0 kB]
Hit:2 https://dietpi.com/apt bookworm InRelease
Hit:3 https://dietpi.com/apt all InRelease
Get:4 https://pkgs.tailscale.com/stable/debian bookworm InRelease
Get:5 https://archive.raspberrypi.com/debian bookworm InRelease [39.3 kB]
Get:6 https://archive.raspberrypi.com/debian bookworm/main armhf Packages [542 kB]
Fetched 603 kB in 20s (29.5 kB/s)
Reading package lists...
[  OK  ] DietPi-Update | APT update
[ INFO ] DietPi-Update | APT upgrade, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[  OK  ] DietPi-Update | APT upgrade

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Installing new DietPi code

[  OK  ] DietPi-Update | Downloading update archive
[  OK  ] DietPi-Update | Unpacking update archive
[  OK  ] DietPi-Update | Removing unused files
[  OK  ] DietPi-Update | Hardening update archive mode
[  OK  ] DietPi-Update | Installing new DietPi scripts
[  OK  ] DietPi-Update | Installing new DietPi system files
[ SUB1 ] DietPi-Set_software > verify_dietpi.txt
[  OK  ] DietPi-Set_software | Downloading current dietpi.txt
[  OK  ] verify_dietpi.txt  | Completed
[  OK  ] DietPi-Update | sync
[  OK  ] DietPi-Update | systemctl daemon-reload

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Applying incremental patches

[ INFO ] DietPi-Update | Current version : v9.7.0
[ INFO ] DietPi-Update | Latest version  : v9.9.-1
[ INFO ] DietPi-Patch | Patching to DietPi v9.8...
[  OK  ] DietPi-Patch | Patched to DietPi v9.8
[ INFO ] DietPi-Patch | Patching to DietPi v9.9...
[  OK  ] DietPi-Patch | Patched to DietPi v9.9
[ INFO ] DietPi-Update | APT autopurge, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[  OK  ] DietPi-Update | APT autopurge
[  OK  ] DietPi-Update | systemctl daemon-reload
[  OK  ] DietPi-Update | Incremental patching to v9.9.-1 completed
[ INFO ] DietPi-Update | Checking for new available live patches

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Completed

[ INFO ] DietPi-Update | Current version : v9.9.-1
[ INFO ] DietPi-Update | Latest version  : v9.9.-1
[  OK  ] DietPi-Survey | Sending survey data
[  OK  ] DietPi-Update | sync
[ SUB1 ] DietPi-Services > restart 
[  OK  ] DietPi-Services | restart : cron
dietpi-software install 171 --> Output
root@DietPi:/home/dietpi# dietpi-software install 171
[  OK  ] DietPi-Software | Initialised database
[  OK  ] DietPi-Software | Reading database

 DietPi-Software
─────────────────────────────────────────────────────
 Mode: Automated install

[  OK  ] DietPi-Software | Installing frp: reverse proxy
[  OK  ] DietPi-Software | DietPi-Userdata validation: /mnt/dietpi_userdata

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Checking for conflicts and missing inputs


 DietPi-Software
─────────────────────────────────────────────────────
 Step: Checking for prerequisite software

[  OK  ] DietPi-Software | mkdir -p /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads /var/www /opt /usr/local/bin
[  OK  ] DietPi-Software | chown dietpi:dietpi /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads
[  OK  ] DietPi-Software | chmod 0775 /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads
[ SUB1 ] DietPi-Services > stop 
[  OK  ] DietPi-Services | stop : cron
[ INFO ] DietPi-Software | APT update, please wait...
Hit:1 http://raspbian.raspberrypi.com/raspbian bookworm InRelease
Hit:2 https://dietpi.com/apt bookworm InRelease
Hit:3 https://dietpi.com/apt all InRelease
Hit:4 https://archive.raspberrypi.com/debian bookworm InRelease
Get:5 https://pkgs.tailscale.com/stable/debian bookworm InRelease
Fetched 6581 B in 9s (698 B/s)
Reading package lists...
[  OK  ] DietPi-Software | APT update

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Installing frp: reverse proxy

[  OK  ] DietPi-Software | cd /tmp/DietPi-Software
[  OK  ] DietPi-Software | curl -sSfL https://github.com/fatedier/frp/releases/download/v0.61.0/frp_0.61.0_linux_arm.tar.gz -o frp_0.61.0_linux_arm.tar.gz
[  OK  ] DietPi-Software | tar xf frp_0.61.0_linux_arm.tar.gz
[  OK  ] DietPi-Software | rm frp_0.61.0_linux_arm.tar.gz
[  OK  ] DietPi-Software | cd frp_0.61.0_linux_arm
[  OK  ] DietPi-Software | mkdir -p /etc/frp
[  OK  ] DietPi-Software | useradd -rMU -d /etc/frp -s /usr/sbin/nologin frp
[  OK  ] DietPi-Software | mv frps /usr/local/bin/frps
[  OK  ] DietPi-Software | chmod 0640 /etc/frp/frps.toml
[  OK  ] DietPi-Software | chown root:frp /etc/frp/frps.toml
[  OK  ] DietPi-Software | cd /tmp/DietPi-Software
[  OK  ] DietPi-Software | rm -R frp_0.61.0_linux_arm

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Finalising install

[ INFO ] DietPi-Software | Enabling installed services
[  OK  ] DietPi-Software | systemctl --no-reload enable frps
[  OK  ] DietPi-Software | systemctl daemon-reload
2024-11-27 21:24:52 [ INFO ] DietPi-RAMlog | Storing /var/log to /var/tmp/dietpi/logs/dietpi-ramlog_store...
2024-11-27 21:24:52 [  OK  ] DietPi-RAMlog | Stored /var/log to /var/tmp/dietpi/logs/dietpi-ramlog_store.

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Install completed

[  OK  ] DietPi-Survey | Sending survey data
[ SUB1 ] DietPi-Services > restart 
[  OK  ] DietPi-Services | restart : frps
[  OK  ] DietPi-Services | restart : cron
journalctl -u frps --> Output
...
Nov 27 21:24:54 DietPi systemd[1]: Started frps.service - frp server (DietPi).
Nov 27 21:24:54 DietPi frps[10244]: 2024-11-27 21:24:54.861 [I] [frps/root.go:105] frps uses config file: /etc/frp/frps.toml
Nov 27 21:25:15 DietPi frps[10244]: 2024-11-27 21:25:15.703 [I] [server/service.go:237] frps tcp listen on 0.0.0.0:7000
Nov 27 21:25:15 DietPi frps[10244]: 2024-11-27 21:25:15.716 [I] [frps/root.go:114] frps started successfully
Nov 27 21:25:15 DietPi frps[10244]: 2024-11-27 21:25:15.719 [I] [server/service.go:351] dashboard listen on 0.0.0.0:7500
Nov 27 21:25:31 DietPi frps[10244]: 2024-11-27 21:25:31.817 [I] [server/dashboard_api.go:107] Http request: [/api/serverinfo]
Nov 27 21:25:31 DietPi frps[10244]: 2024-11-27 21:25:31.830 [I] [server/dashboard_api.go:100] Http response [/api/serverinfo]: code [200]

got prompted with the server / client / both install decision.
now the web-dashboard is available. And ports 7000 and 7500 are open as expected.

PS: also, with this installation, I end up with frps.toml in /etc/frp instead of the .ini

Ok that seems to have worked.

btw, you could switch back to master branch as follow

G_DEV_BRANCH master

This should not have any impact to your running frp installation

Looks like this commit made the arm_hf builds incompatible with ARMv6hf: adjust arm compilation configuration (#4181) · fatedier/frp@c1893ee · GitHub