Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting up and running / installation documentation #84

Closed
quantumzedno opened this issue Jun 7, 2022 · 12 comments
Closed

Getting up and running / installation documentation #84

quantumzedno opened this issue Jun 7, 2022 · 12 comments

Comments

@quantumzedno
Copy link

Hi there,

I am very interested in this project and have been trying to set up a test vm with it for awhile but i've been struggling to get it up and running with the getting started documentation and was hoping to get some assistance/ request (or even help create) better setup documentation once I understand how to get going:

what i've done so far:

downloaded latest binary Argus-0.6.0.linux-amd64

transferred binary to centos 8 vm via scp

gave the binary execute permissions via chmod

ran ./Argus-0.6.0.linux-amd64 -help

created a /home/argus/argus directory structure and moved the binary to /home/argus/argus/Argus-0.6.0.linux-amd64

created a config.yml at /home/argus/argus/config.yml

added the following to the config.yml file just for a test:

settings:
  log:
    level: INFO           # Log level, DEBUG/VERBOSE/INFO/WARNING/ERROR
    timestamps: false     # Log with timestamps
  web:
    listen_host: 172.29.2.128  # IP address to listen on
    listen_port: 8080     # Port to listen on
    route_prefix: /       # Web route prefix, e.g. /demo means http://IP:PORT/demo to access
    cert_file: ''         # HTTPS Cert path, e.g. `cert.pem`
    pkey_file: ''         # HTTPS PrivKey path, e.g. `privkey.pem`

service:
  adnanh/webhook:
    type: github
    url: adnanh/webhook
    web_url: https://github.com/adnanh/webhook/releases/{{ version }}
    regex_content: webhook-linux-amd64\.tar\.gz
    icon: https://raw.githubusercontent.com/adnanh/webhook/development/docs/logo/logo-128x128.png

created a systemd service file at /etc/systemd/system/argus.service


[Unit]
Description=Argus Server
Documentation=https://release-argus.io/docs
After=network-online.target

[Service]
User=argus
Restart=on-failure
ExecStart=/home/argus/argus \
  -config.file=/home/argus/argus/config.yml

[Install]
WantedBy=multi-user.target

I'm not sure what else, but i feel like i'm definitely missing something....
i cant hit the web ui at the boxes ip address (172.29.2.128:8080)
also tried disabling firewall and se linux so it's neither of those

@JosephKav
Copy link
Collaborator

What do the logs say?

@quantumzedno
Copy link
Author

What do the logs say?

How do I access the logs?

@larsl-net
Copy link
Contributor

created a /home/argus/argus directory structure and moved the binary to /home/argus/argus/Argus-0.6.0.linux-amd64

If your Argus binary is located under /home/argus/argus/Argus-0.6.0.linux-amd64

You must also change the systemd service

[Unit]
Description=Argus Server
Documentation=https://release-argus.io/docs
After=network-online.target

[Service]
User=argus
Restart=on-failure
ExecStart=/home/argus/argus/Argus-0.6.0.linux-amd64 \
  -config.file=/home/argus/argus/config.yml

[Install]
WantedBy=multi-user.target

To see the logs you can use journalctl -xeu argus

@JosephKav
Copy link
Collaborator

Did you definitely start the systemd service?

systemctl daemon-reload
systemctl start argus

Logs - journalctl -u argus

@quantumzedno
Copy link
Author

quantumzedno commented Jun 8, 2022

made the change @larsl-net suggested but still no luck...

ran systemctl status argus service:

@SARGUS argus]$ sudo systemctl status argus.service
● argus.service - Argus Server
   Loaded: loaded (/etc/systemd/system/argus.service; enabled; vendor preset: disabled)
   Active: failed (thawing) (Result: exit-code) since Wed 2022-06-08 10:07:03 EDT; 41s ago
     Docs: https://release-argus.io/docs
  Process: 2541 ExecStart=/home/argus/argus/Argus-0.6.0.linux-amd64 -config.file=/home/argus/argus/config.yml (code=exited, status=203/EXEC)
 Main PID: 2541 (code=exited, status=203/EXEC)

Jun 08 10:07:02 SARGUS systemd[1]: argus.service: Failed with result 'exit-code'.
Jun 08 10:07:03 SARGUS systemd[1]: argus.service: Service RestartSec=100ms expired, scheduling restart.
Jun 08 10:07:03 SARGUS systemd[1]: argus.service: Scheduled restart job, restart counter is at 5.
Jun 08 10:07:03 SARGUS systemd[1]: Stopped Argus Server.
Jun 08 10:07:03 SARGUS systemd[1]: argus.service: Start request repeated too quickly.
Jun 08 10:07:03 SARGUS systemd[1]: argus.service: Failed with result 'exit-code'.
Jun 08 10:07:03 SARGUS systemd[1]: Failed to start Argus Server.
Jun 08 10:07:09 SARGUS systemd[1]: argus.service: Start request repeated too quickly.
Jun 08 10:07:09 SARGUS systemd[1]: argus.service: Failed with result 'exit-code'.
Jun 08 10:07:09 SARGUS systemd[1]: Failed to start Argus Server.

and journalctl -u argus

-- Logs begin at Wed 2022-06-08 09:59:00 EDT, end at Wed 2022-06-08 10:09:05 EDT. --
Jun 08 09:59:07 SARGUS systemd[1]: Started Argus Server.
Jun 08 09:59:07 SARGUS systemd[1]: argus.service: Main process exited, code=exited, status=203/EXEC
Jun 08 09:59:07 SARGUS systemd[1]: argus.service: Failed with result 'exit-code'.
Jun 08 09:59:08 SARGUS systemd[1]: argus.service: Service RestartSec=100ms expired, scheduling restart.
Jun 08 09:59:08 SARGUS systemd[1]: argus.service: Scheduled restart job, restart counter is at 1.
Jun 08 09:59:08 SARGUS systemd[1]: Stopped Argus Server.
...

@JosephKav
Copy link
Collaborator

Easiest way to see if it's an issue with the config/perms, run

/home/argus/argus/Argus-0.6.0.linux-amd64 -config.file=/home/argus/argus/config.yml

@JosephKav
Copy link
Collaborator

@quantumzedno, checking your config.yml, it appears that the

    cert_file: ''         # HTTPS Cert path, e.g. `cert.pem`
    pkey_file: ''         # HTTPS PrivKey path, e.g. `privkey.pem`

are causing this issue. I'll do a commit to check that these files exist before trying to use them. I won't do another release just for this though. In the meantime, just comment out/remove these lines and it should work

@quantumzedno
Copy link
Author

quantumzedno commented Jun 8, 2022

Running /home/argus/argus/Argus-0.6.0.linux-amd64 -config.file=/home/argus/argus/config.yml seems to work after making that change


 /home/argus/argus/Argus-0.6.0.linux-amd64 -config.file=/home/argus/argus/config.yml
INFO: Found 1 services to monitor:
  - adnanh/webhook
VERBOSE: adnanh/webhook, Tracking adnanh/webhook at https://github.com/adnanh/webhook every 10m
INFO: Listening on 172.29.2.128:8080/



DEBUG: WebSocket (172.29.120.55), READ {"version":1,"page":"APPROVALS","type":"INIT"}
VERBOSE: wsService (172.29.120.55), -

however the service is still failing to run with the same error:

-- Logs begin at Wed 2022-06-08 11:04:41 EDT, end at Wed 2022-06-08 11:08:36 EDT. --
Jun 08 11:05:37 SARGUS systemd[1]: Started Argus Server.
Jun 08 11:05:37 SARGUS systemd[1]: argus.service: Main process exited, code=exited, status=203/EXEC
Jun 08 11:05:37 SARGUS systemd[1]: argus.service: Failed with result 'exit-code'.
Jun 08 11:05:37 SARGUS systemd[1]: argus.service: Service RestartSec=100ms expired, scheduling restart.
Jun 08 11:05:37 SARGUS systemd[1]: argus.service: Scheduled restart job, restart counter is at 1.
Jun 08 11:05:37 SARGUS systemd[1]: Stopped Argus Server.
...

@JosephKav
Copy link
Collaborator

Perm issues?
sudo -u argus /home/argus/argus/Argus-0.6.0.linux-amd64 -config.file=/home/argus/argus/config.yml

@quantumzedno
Copy link
Author

worked fine:

[lockwobe@SARGUS ~]$ sudo -u argus /home/argus/argus/Argus-0.6.0.linux-amd64 -config.file=/home/argus/argus/config.yml
[sudo] password for lockwobe:
INFO: Found 1 services to monitor:

@JosephKav
Copy link
Collaborator

SELinux? https://serverfault.com/a/1013293

JosephKav added a commit that referenced this issue Jun 8, 2022
also handles cert/key being and empty string
#84 (comment)
JosephKav added a commit that referenced this issue Jun 8, 2022
also handles cert/key being an empty string (so use http)
#84 (comment)
@quantumzedno
Copy link
Author

That did it! thank you so much for all the help, greatly appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants