digitalmethodsinitiative / zeeschuimer

A browser extension to collect social media data with.
Other
185 stars 14 forks source link

Port 5000 in result/dataset link #20

Closed 73616e646572 closed 9 months ago

73616e646572 commented 1 year ago

After gathering data with Zeeschuimer, a result link is generated combining the given 4CAT server URL with a public port number (inserting :5000).

image

On our servers the usage of port 5000 within the container is possible, but we cannot open this port publicly. As a result, this leads to a connection timeout error, as the server cannot be accessed through this port.

Would any of the following be possible?

  1. Making the public port number in result links optional.
  2. Making the public port setting adjustable, so that we could for example use port 443.
  3. Leaving the port number out the result links (resulting in: https://my-4cat.link/results/).
dale-wahl commented 1 year ago

I believe this was fixed, but ZeeSchuimer displays the URL received from 4CAT. What version of 4CAT are you using?

73616e646572 commented 1 year ago

One is still on 1.36, the rest is on 1.38. Zeeschuimer version 1.8.0.

stijn-uva commented 1 year ago

Does the value for 'Host name' in the 4CAT settings (Flask Settings -> Host name) include the :5000 port number?

73616e646572 commented 1 year ago

It was indeed included, although the port number had been removed from the host name before.

After removing the port number again and having a new dataset collected, it unfortunately still results in the same: image

stijn-uva commented 1 year ago

Since this is a Flask setting, it requires restarting the front-end for it to take effect everywhere. Note that I am not 100% sure this will help, but it seems worth trying...

dale-wahl commented 1 year ago

docker_setup.py runs every time the 4CAT backend container starts and it updates the flask.server_name setting by appending the PUBLIC_PORT from the .env file. That is why that value updates. This, so far as I can tell, should not affect what you are seeing here since flask.server_name is not passed to Flask in a Docker setup.

Flask might be getting your server name from the SERVER_NAME set in your .env file (as that value is written to the operating system environment by Docker). If you have my-4cat.link:5000 set in your .env file for SERVER_NAME that could explain this behavior. Otherwise, I do not know.

dale-wahl commented 1 year ago

this commit https://github.com/digitalmethodsinitiative/4cat/commit/0c179e9150a08810e914c166e2dd70472172fa8f will stop 4CAT from appending the port to your flask.server_name setting on startup. It will instead warn users and inform them how to update the setting if needed/desired. It may help with your situation though I still do not understand how Flask is retrieving that SERVER_NAME since we do not set it to the flask.server_name in Docker setups.

dale-wahl commented 9 months ago

Tested on some of our instances and this appears fixed. Please reopen if it still occurs (with 4CAT v1.39 or later).