dev-lu / osint_toolkit

A full stack web application that combines many tools and services for security analysts into a single tool.
MIT License
479 stars 81 forks source link

Somehow I am still receiving Network Error #16

Closed Blason closed 11 months ago

Blason commented 11 months ago

Hi,

It worked perfectly fine for me and then I tried deploying in my cloud which has a one Public NIC and other is private NIC. I changed it to Private NIC and docker came up appropriately. Now I am trying to access using Private IP and it gives me same netork error.. Uncaught runtime errors: × ERROR Network Error ERROR Network Error ERROR Network Error logs.txt

ERROR Network Error

And here are the logs

dev-lu commented 11 months ago

Can you reach the private IP from your browser? Please check if you can access the backend on port 8000 in your browser.

Blason commented 11 months ago

ok let me check and quickly revert

Blason commented 11 months ago

I now changed the yml fle like this and testing version: "3.3" services: backend: build: ./backend container_name: backend ports:

And when access port 8000 here is the response {"detail":"Not Found"}

Blason commented 11 months ago

One things I noticed when I checked the logs is - the applicaiton is trying to listen on docker interface

Compiled successfully!

You can now view osint-toolkit in the browser.

Local: http://localhost:3000 On Your Network: http://172.18.0.3:3000

Note that the development build is not optimized. To create a production b

uild, use npm run build.

webpack compiled successfully

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES af5cbc333f28 osint_toolkit_backend "uvicorn main:app --…" 6 hours ago Up 6 minutes 0.0.0.0:8000->8000/tcp, :::8000->8000/tcp backend 9408de9ec84e osint_toolkit_frontend "docker-entrypoint.s…" 6 hours ago Up 6 minutes 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp frontend

dev-lu commented 11 months ago

This is normal behaviour of the React development server and can be ignored. Important is where your frontend tries to connect to. The configuration you posted before is not correct. 0.0.0.0:8000 is not a valid endpoint for the frontend to connect to. BACKEND_URL must be an endpoint, that you can reach through your browser. Keep in mind that you should not deploy the application to the public, as there is no authentication in place.

Blason commented 11 months ago

In that case local host should be fine right instead of any ip address since it's a internal communication?

And again I m hiding it behind nginx with authelia as mfa for better security

On Wed, Aug 2, 2023, 20:35 dev-lu @.***> wrote:

This is normal behaviour of the React development server and can be ignored. Important is where your frontend tries to connect to. The configuration you posted before is not correct. 0.0.0.0:8000 is not a valid endpoint for the frontend to connect to. BACKEND_URL must be an endpoint, that you can reach through your browser. Keep in mind that you should not deploy the application to the public, as there is no authentication in place.

— Reply to this email directly, view it on GitHub https://github.com/dev-lu/osint_toolkit/issues/16#issuecomment-1662380802, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJVOLYOWAKS5OUQSTCB6XTXTJUCPANCNFSM6AAAAAA3AZKRIQ . You are receiving this because you authored the thread.Message ID: @.***>

dev-lu commented 11 months ago

No, it is not internal communication. It is a web application with a frontend that runs in your browser. This means your browser needs to communicate with the backend. The backend URL argument tells your browser where to send the requests to. If your backend is located on a remote machine and "localhost" is configured as the backend URL, then your browser sends the requests to your local machine and not to the remote host. As stated in the readme file, this project is still a prototype at a very early stage and is currently not suitable for deployment on remote machines.

Blason commented 11 months ago

I see that means my machine needs to communicate with server on port 3000 as well as 8000?

dev-lu commented 11 months ago

Yes this is right.