Start web UI after reboot
I am trying to start arachni_web automatically after reboot on my Debian 9 server but can't seem to make it work.
I created the file arachni-web.service in /etc/systemd/system:
[Unit]
Description=Arachni Web UI
After=network.target
[Service]
Type=simple
ExecStart=/arachni/bin/arachni_web -D -o 1.1.1.1
Restart=always
[Install]
WantedBy=multi-user.target
To test, I can see the service started:
$ sudo systemctl start arachni-web.service
$ sudo systemctl list-units -t service --all | grep arachni
arachni-web.service loaded active running Arachni Web UI
The process is running:
$ ps -ef | grep arachni
root 4573 1 99 17:34 ? 00:00:03 ruby /arachni/bin/../system/gems/bin/rackup /arachni/bin/../system/arachni-ui-web/config.ru -D -o 1.1.1.1
But when I do a netstat -plnt, it is not listening on 9292. I can't connect using my web browser as well.
$ sudo netstat -plnt
[sudo] password for arachni:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 899/postgres
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1052/master
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 846/sshd
tcp6 0 0 ::1:25 :::* LISTEN 1052/master
tcp6 0 0 :::22 :::* LISTEN 846/sshd
Any ideas?
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by bWF0dC50b3JiaW4... on 12 Feb, 2018 09:09 PM
Just for kicks, if you run
/arachni/bin/arachni_web -D -o 1.1.1.1
without the service, does the application UI appear? If so, my gut is leaning towards a daemon/user permissions issue, but that's just a guess.2 Posted by weichieh on 13 Feb, 2018 04:46 AM
Yes, the web UI appears.
Permissions:
Am I missing something?
3 Posted by bWF0dC50b3JiaW4... on 13 Feb, 2018 09:51 PM
Admittedly systemd or initd setup is not my area of expertise. However, if you're able to run the exact same command as the service but when you invoke the service it works, I'm inclined to think of the issue as one of two things:
1) Permissions: Does the daemon running the service have the permissions that it needs?
2) Race Condition: Are there dependencies that are available once the system is fully booted that might not be available when the systemd or initd service is called?