arp_standin
arp_standin copied to clipboard
raspberry pi - unable to start service
./bin/setup
bundle install
+ bundle install
Using rake 13.0.1
Using pcaprub 0.13.1
Using packetfu 1.1.13
Using arp_standin 0.1.0 from source at `.` and installing its executables
Using bundler 2.4.8
Bundle complete! 2 Gemfile dependencies, 5 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
bundle exec rake install
arp_standin 0.1.0 built to pkg/arp_standin-0.1.0.gem.
arp_standin (0.1.0) installed.
# Create systemd service
sudo cp arp-standin.example.service /etc/systemd/system/arp-standin.service
sudo nano /etc/systemd/system/arp-standin.service
# Be sure to set the three configuration environment variables:
# STANDIN_MAC_ADDR: The MAC address of the machine to answer on behalf of.
# STANDIN_IP_ADDR: The IP address of the machine to answer on behalf of.
# NETWORK_INTERFACE: The network interface to send/receive on.
# ✅ done
sudo systemctl daemon-reload
sudo systemctl enable arp-standin.service
sudo systemctl start arp-standin.service
systemctl status arp-standin.service # 👈 error see below
arp-standin.service - ARP Stand-in
Loaded: loaded (/etc/systemd/system/arp-standin.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2023-04-23 17:21:36 PDT; 4s ago
Process: 8173 ExecStart=/usr/local/bin/arp_standin (code=exited, status=203/EXEC)
Main PID: 8173 (code=exited, status=203/EXEC)
CPU: 33ms
Apr 23 17:21:36 torrentpi systemd[1]: Started ARP Stand-in.
Apr 23 17:21:36 torrentpi systemd[8173]: arp-standin.service: Failed to locate executable /usr/local/bin/arp_standin: No such file or di>
Apr 23 17:21:36 torrentpi systemd[8173]: arp-standin.service: Failed at step EXEC spawning /usr/local/bin/arp_standin: No such file or d>
Apr 23 17:21:36 torrentpi systemd[1]: arp-standin.service: Main process exited, code=exited, status=203/EXEC
lines 1-11...skipping...
● arp-standin.service - ARP Stand-in
● arp-standin.service - ARP Stand-in
Loaded: loaded (/etc/systemd/system/arp-standin.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2023-04-23 17:21:36 PDT; 4s ago
Process: 8173 ExecStart=/usr/local/bin/arp_standin (code=exited, status=203/EXEC)
Main PID: 8173 (code=exited, status=203/EXEC)
CPU: 33ms
Apr 23 17:21:36 torrentpi systemd[1]: Started ARP Stand-in.
Apr 23 17:21:36 torrentpi systemd[8173]: arp-standin.service: Failed to locate executable /usr/local/bin/arp_standin: No such file or di>
Apr 23 17:21:36 torrentpi systemd[8173]: arp-standin.service: Failed at step EXEC spawning /usr/local/bin/arp_standin: No such file or d>
Apr 23 17:21:36 torrentpi systemd[1]: arp-standin.service: Main process exited, code=exited, status=203/EXEC
Apr 23 17:21:36 torrentpi systemd[1]: arp-standin.service: Failed with result 'exit-code'.
ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [armv7l-linux-eabihf]
Hello,
Looks like you are getting an error where the executable is not found. Can you confirm that arp_standin does exist in /usr/local/bin/?
@AgentSonji
looks like I can just make a symlink 🤷♂️
restarted the pi today, re-started the services and now it's failing. I'm still pointing to the symlink
➜ ~ sudo systemctl daemon-reload
sudo systemctl enable arp-standin.service
sudo systemctl start arp-standin.service
➜ ~ systemctl status arp-standin.service
● arp-standin.service - ARP Stand-in
Loaded: loaded (/etc/systemd/system/arp-standin.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2023-04-24 20:41:27 PDT; 7s ago
Process: 4214 ExecStart=/usr/local/bin/arp_standin (code=exited, status=1/FAILURE)
Main PID: 4214 (code=exited, status=1/FAILURE)
CPU: 370ms
Apr 24 20:41:27 torrentpi systemd[1]: Started ARP Stand-in.
Apr 24 20:41:27 torrentpi arp_standin[4214]: /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require': cannot load such file -- pcaprub >
Apr 24 20:41:27 torrentpi arp_standin[4214]: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require'
Apr 24 20:41:27 torrentpi arp_standin[4214]: from /home/pi/Dev/arp_standin/lib/arp_standin.rb:4:in `<top (required)>'
Apr 24 20:41:27 torrentpi arp_standin[4214]: from /usr/local/bin/arp_standin:3:in `require_relative'
Apr 24 20:41:27 torrentpi arp_standin[4214]: from /usr/local/bin/arp_standin:3:in `<main>'
Apr 24 20:41:27 torrentpi systemd[1]: arp-standin.service: Main process exited, code=exited, status=1/FAILURE
Apr 24 20:41:27 torrentpi systemd[1]: arp-standin.service: Failed with result 'exit-code'.
Force a restart of the service then run:
journalctl _PID=(whatever PID the service had)
(Journalctl allows you to interact and view multiple system log files at once and merges them). See if that yields any new information
Hey @marclundgren 👋
It looks like the issue here is that the script can't find the pcaprub gem:
Apr 24 20:41:27 torrentpi arp_standin[4214]: /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require': cannot load such file -- pcaprub >
You could try running sudo gem install pcaprub to install it globally, though there is probably a better way to do it without using sudo.
It would be great to have a Docker image to help avoid installation quirks like this. If anybody is interested to submit a PR for one, that would be a big help.