Skip to content

Conversation

faux-eccles
Copy link

@faux-eccles faux-eccles commented Aug 8, 2025

Fix connection issue when intelowl is on nonstandard port

image

Description

Change the way the websocket address are built to ensure the hosts ports are being referenced. #2952.

image

Type of change

Please delete options that are not relevant.

  • [X ] Bug fix (non-breaking change which fixes an issue).

Checklist

  • [X ] I have read and understood the rules about how to Contribute to this project
  • [X ] The pull request is for the branch develop
  • A new plugin (analyzer, connector, visualizer, playbook, pivot or ingestor) was added or changed, in which case:
    • I strictly followed the documentation "How to create a Plugin"
    • Usage file was updated. A link to the PR to the docs repo has been added as a comment here.
    • Advanced-Usage was updated (in case the plugin provides additional optional configuration). A link to the PR to the docs repo has been added as a comment here.
    • I have dumped the configuration from Django Admin using the dumpplugin command and added it in the project as a data migration. ("How to share a plugin with the community")
    • If a File analyzer was added and it supports a mimetype which is not already supported, you added a sample of that type inside the archive test_files.zip and you added the default tests for that mimetype in test_classes.py.
    • If you created a new analyzer and it is free (does not require any API key), please add it in the FREE_TO_USE_ANALYZERS playbook by following this guide.
    • Check if it could make sense to add that analyzer/connector to other freely available playbooks.
    • I have provided the resulting raw JSON of a finished analysis and a screenshot of the results.
    • If the plugin interacts with an external service, I have created an attribute called precisely url that contains this information. This is required for Health Checks (HEAD HTTP requests).
    • If the plugin requires mocked testing, _monkeypatch() was used in its class to apply the necessary decorators.
    • I have added that raw JSON sample to the MockUpResponse of the _monkeypatch() method. This serves us to provide a valid sample for testing.
    • I have created the corresponding DataModel for the new analyzer following the documentation
  • I have inserted the copyright banner at the start of the file: # This file is a part of IntelOwl https://github.com/intelowlproject/IntelOwl # See the file 'LICENSE' for copying permission.
  • Please avoid adding new libraries as requirements whenever it is possible. Use new libraries only if strictly needed to solve the issue you are working for. In case of doubt, ask a maintainer permission to use a specific library.
  • If external libraries/packages with restrictive licenses were added, they were added in the Legal Notice section.
  • Linters (Black, Flake, Isort) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.
  • I have added tests for the feature/bug I solved (see tests folder). All the tests (new and old ones) gave 0 errors.
  • If the GUI has been modified:
    • I have a provided a screenshot of the result in the PR.
    • I have created new frontend tests for the new component or updated existing ones.
  • After you had submitted the PR, if DeepSource, Django Doctors or other third-party linters have triggered any alerts during the CI checks, I have solved those alerts.

Important Rules

  • If you miss to compile the Checklist properly, your PR won't be reviewed by the maintainers.
  • Everytime you make changes to the PR and you think the work is done, you should explicitly ask for a review by using GitHub's reviewing system detailed here.

drosetti and others added 2 commits May 20, 2025 14:33
Fix connection issue when intelowl is on nonstandard port
@faux-eccles faux-eccles changed the title [2952] Fix websocket building on non standard ports Fix websocket building on non standard ports - closes #2952 Aug 8, 2025
@drosetti
Copy link
Contributor

Hi @faux-eccles, thanks for your contribution! Next time request a review to me, in this way i'll be notified about your pr.

I tried it on my pc, but I can see in the network tab the ws request is stucked in pending status with you change

@faux-eccles
Copy link
Author

faux-eccles commented Aug 13, 2025

@drosetti Ah my bad, the screenshot was of the issue not the fix. Should have put it only on the issue ticket, and only had the fix in the PR.
screenshot-2025-08-12-21:23:42

@drosetti
Copy link
Contributor

Don't worry about the screenshot, it's not a big deal. Even if it's correct the problem remains: in my env the websocket cannot connect from the frontend to the backend. Maybe I have to change ports in the container ?

@faux-eccles
Copy link
Author

My change should be connecting to the same port that the page is serving from so if you can load the page it should connect. That being said in my environment the ports are changed in the container, I've shared a screenshot of my setup in the linked issue

Copy link

github-actions bot commented Sep 1, 2025

This pull request has been marked as stale because it has had no activity for 10 days. If you are still working on this, please provide some updates or it will be closed in 5 days.

@github-actions github-actions bot added the stale label Sep 1, 2025
@drosetti
Copy link
Contributor

drosetti commented Sep 1, 2025

@faux-eccles Ok I changed the port on docker and it worked on standard port (80), but there is another problem: the UI environment is on port 3001, if you want to work on frontend this changes makes the websocket fail. I'd like to discuss with you a possible solution for this problem. I prefer to avoid to edit the docker conf because some contributors work quite often on the frontend and change it every time is quite annoying imho.

@github-actions github-actions bot removed the stale label Sep 3, 2025
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

Successfully merging this pull request may close these issues.

2 participants