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

[BUG] Service failing on startup on RHEL8 #395

Open
IkerUmba opened this issue Feb 5, 2025 · 4 comments
Open

[BUG] Service failing on startup on RHEL8 #395

IkerUmba opened this issue Feb 5, 2025 · 4 comments
Labels

Comments

@IkerUmba
Copy link

IkerUmba commented Feb 5, 2025

Describe the bug

  • I am attempting to install OpenCanary on RHEL8 . (the box is 192.168.198.2)

  • I believe OpenCanary is running, when I run the command "top", I see the service: (on my Ubuntu, when I run "Top" OpenCanary PID relates to the process "twistd")
    53384 testuser.+ 20 0 8363604 8.0g 2844 S 34.2 51.8 3:47.15 opencanaryd
    60507 testuser.+ 20 0 8367168 8.0g 1528 R 2.3 51.8 0:00.07 opencanaryd
    (OpenCanary also crashes after 30 minutes or so. (I have 20G of RAM))

  • When I try to visit the box in a browser: https://192.168.198.2
    I do not hit opencanary and get the Synology honeypot page when the OpenCanary service is running.

To Reproduce
Steps to reproduce the behavior:

  1. installed as follows:
    $ git clone https://github.com/thinkst/opencanary
    $ cd opencanary
    $ python setup.py sdist
    $ cd dist
    $ pip install opencanary-.tar.gz

I then experienced this issue:
ERROR: Could not find a version that satisfies the requirement Twisted==22.8.0 (from opencanary)
(from versions: 2.1.0, 9.0.0, 10.0.0, 10.1.0, 10.2.0, 11.0.0, 11.1.0, 12.0.0, 12.1.0, 12.2.0, 12.3.0,
13.0.0, 13.1.0, 13.2.0, 14.0.0, 14.0.1, 14.0.2, 15.0.0, 15.1.0, 15.2.0, 15.2.1, 15.3.0, 15.4.0, 15.5.0,
16.0.0, 16.1.0, 16.1.1, 16.2.0, 16.3.0, 16.3.1, 16.3.2, 16.4.0, 16.4.1, 16.5.0rc1, 16.5.0rc2, 16.5.0, 16.6.0rc1, 16.6.0,
16.7.0rc1, 16.7.0rc2, 17.1.0rc1, 17.1.0, 17.5.0, 17.9.0rc1, 17.9.0, 18.4.0rc1, 18.4.0, 18.7.0rc1, 18.7.0rc2, 18.7.0, 18.9.0rc1,
18.9.0, 19.2.0rc1, 19.2.0rc2, 19.2.0, 19.2.1, 19.7.0rc1, 19.7.0, 19.10.0rc1, 19.10.0, 20.3.0rc1, 20.3.0, 21.2.0rc1, 21.2.0, 21.7.0rc1,
21.7.0rc2, 21.7.0rc3, 21.7.0, 22.1.0rc1, 22.1.0, 22.2.0rc1, 22.2.0, 22.4.0rc1, 22.4.0)
ERROR: No matching distribution found for Twisted==22.8.0

#I believe I overcame this by, actaully going into my virtualenv, and making my virtualenv to use python3.8.

#I created a virtual env, with a specific name, and to use python3.8 specifically:
python3.8 -m venv

#to activate virtual env
source /bin/activate

#now Im in env environment, and checked which version of python .It should be python3.8
python --version

Expected behavior
To have OpenCanary to run, and to hit the default Synology Honeypot HomePage, FTP server Homepage

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: RHEL8
  • Browser: Chrome
  • Version: 8.10

Thank you soo much for helping!
When I ran this setup on Ubunut and working amazingly!
Wish to get this up and running RHEL soon!

@IkerUmba IkerUmba added the bug label Feb 5, 2025
@IkerUmba IkerUmba changed the title [BUG] Service failing on startup [BUG] Service failing on startup on RHEL8 Feb 5, 2025
@thinkst-nick
Copy link

Hi @IkerUmba,

Sorry to hear that you're running into some troubles.

I managed to get a very basic RHEL8 environment running in docker and was able to get a working opencanary setup, so I have hope that we can get you unstuck here.

Please can I confirm three things on your side:

  1. When you run opencanaryd --start, what does the output look like (please simply paste it)
  2. What is the output of grep -F "http." /etc/opencanaryd/opencanary.conf
  3. What is the output of curl -X GET http://localhost

If you can get me those three outputs, I can hopefully help you further.

Nick

@IkerUmba
Copy link
Author

IkerUmba commented Feb 6, 2025

1)When you run opencanaryd --start, what does the output look like (please simply paste it):
Here is the copy/paste output:

"(my_python38_env) [testuser@dns my_python38_env]$ opencanaryd --start
WARNING: OpenCanary will not drop root user or group privileges after launching. Set both --uid=nobody and --gid=nogroup (or another low privilege user/group) to silence this warning."

2)What is the output of grep -F "http." /etc/opencanaryd/opencanary.conf:

"[testuser@dns ~]$ sudo grep -F "http." /etc/opencanaryd/opencanary.conf:
[sudo] password for testuser:
grep: /etc/opencanaryd/opencanary.conf:: No such file or directory"
(I have tried "opencanaryd --copyconfig, and the command just hangs)

3)What is the output of curl -X GET http://localhost:

"[testuser@dns ~]$ curl -X GET http://localhost
curl: (7) Failed to connect to localhost port 80: Connection refused"

Thanks for the quick reply!

@thinkst-nick
Copy link

Hi @IkerUmba,

Thanks for the output. I've managed to reproduce the hanging of opencanaryd --copyconfig by switching to a low privilege user.

As a test, can I please ask you to try:

  1. Switch to root if possible sudo su
  2. Just in case, let's opencanaryd --stop
  3. Create the config opencanaryd --copyconfig
  4. Start opencanaryd (and drop root privs by specifying the uid/gid): opencanaryd --start --uid=nobody --gid=nobody
  5. Paste the output

Nick

@IkerUmba
Copy link
Author

Hello Nick

I am giving an update here, and testing out the configurations.
It is up and finally running!

Thank you soo much!
I am curious however, why the instance in RHEL is causing soo many crash issues/ high memory allocation.

Cheers!
Hope you had a great weekend!

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

No branches or pull requests

2 participants