Giter Site home page Giter Site logo

Unknown Error about fireshare HOT 6 CLOSED

li-ruida avatar li-ruida commented on July 18, 2024
Unknown Error

from fireshare.

Comments (6)

ShaneIsrael avatar ShaneIsrael commented on July 18, 2024 2

Ah I know whats happening. It's because you are accessing it via "localhost". The frontend does a url check and if it sees that the url is localhost it will use port 5000 for the api requests. This is so that you don't have to do anything special to develop on fireshare when running it locally outside of docker.

Thus why it works correctly when you change the port to 5000 in the dockerfile.

If you left the port at 8080 or something else but instead accessed it via 127.0.0.1 or from a domain name it would work as expected.

from fireshare.

li-ruida avatar li-ruida commented on July 18, 2024

I figured out what was causing the error in a new attempt.
When I try to load into the main screen or the login screen,the request url is http://localhost:5000/api/config
but port 5000 is not the local port set
So I made a new deployment and set the port to 5000:

services:
  fireshare:
    container_name: fireshare
    image: shaneisrael/fireshare 
    ports:
      - "5000:80"        
    volumes:
      - ./data:/data        
      - ./processed:/processed 
      - ./videos:/videos  
    environment:
    - ADMIN_PASSWORD=admin

The service is running normally.
I think it is a misconfiguration of nginx, which caused the default port of flask to be requested.

from fireshare.

ShaneIsrael avatar ShaneIsrael commented on July 18, 2024

Changing that port shouldn't matter. You could have it be anything, it doesn't need to be 5000 or 8080 which is the default so long as it maps to port 80 in the container.

Port 5000 in the log is referencing the internal fireshare server that runs inside the container which does use port 5000 which is what nginx proxies the api requests too.

I'm not sure what was causing your problem or why it got fixed after changing that port unless that port was in use by some other service on your machine. However, I am certain that changing it was not what fixed the issue.

You can change it to port 5010 for example and it would still work correctly.

from fireshare.

li-ruida avatar li-ruida commented on July 18, 2024

I am sure that in the windows environment, if the port is not changed to 5000, there will be a bug, and there is no port conflict. I can enter the web interface, but part of the service request port of the web interface is 5000.
I just tested everything working fine in a linux environment.
In the chrome developer tool, you can see the project deployed in the windows environment, but the following request cannot be requested
img

loggedin config public?sort=updated_at+desc

Request URL: http://localhost:5000/api/config
Referrer Policy: strict-origin-when-cross-origin
Provisional headers are shown
Learn more
Accept: application/json, text/plain, */*
Referer: http://localhost:8887/
sec-ch-ua: "Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109"
sec-ch-ua-mobile: ?1
sec-ch-ua-platform: "Android"
User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36

But in linux environment:
img
The request port is all right.

from fireshare.

li-ruida avatar li-ruida commented on July 18, 2024

I have tried other containers in windows environment and did not produce similar problems.

from fireshare.

li-ruida avatar li-ruida commented on July 18, 2024

Problem solved, thanks

from fireshare.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.