tweet-sense icon indicating copy to clipboard operation
tweet-sense copied to clipboard

server not working

Open murtazaali1999 opened this issue 3 years ago • 4 comments

I'm trying to hit localhost 8000 but it doesn't seem to respond. See if you can spot the error in the media ? The server doesn't seem to be running after the docker image is made . Need help ASAP

I followed these steps

Running the application

  1. Download the trained model and put into the server/main folder
    (Note: This is the CNN model. if you want use the LSTM model, you'll need to follow the training steps below and put the saved model in server/main. Also, don't forget to change the loaded model name in server/main/init.py )

  2. Get your Twitter API credentials through Keys and Tokens tab under the Twitter Developer Portal Projects & Apps page and add them to the /server/main/config.py file.

  3. Run docker-compose up --build in the terminal from the root folder
    (Note: Ensure that you have Docker installed)

  4. Open http://localhost:5000 in your browser to access the app

port dep1 ev11

murtazaali1999 avatar Sep 21 '22 07:09 murtazaali1999

Did you enter valid Twitter API credentials into the server config file?

Also, Please send the error message in the server logs

agrawal-rohit avatar Oct 11 '22 05:10 agrawal-rohit

I did try to update the compose yaml file to uncomment the Server section code and it worked for me.

version: "2"

services:
    server:
      build: ./server/
      command: >
        gunicorn -b 0.0.0.0:8000 --access-logfile - --reload "main:app"
      volumes:
        - ./server:/app
      ports:
        - 8000:8000

    client:
      build: ./client/
      command: npm run start
      volumes:
        - ./client:/app
        - /app/node_modules
      ports:
        - 3000:3000

shivams07 avatar Oct 14 '22 08:10 shivams07

The issue seems to be an issue in gunicorn and the docker server, I don't know the conflict its causing, gunicorn -b 0.0.0.0:8000 --access-logfile - --reload "main:app"

Another question, after the --access-logfile do I have to specify the gunicorn file directory

The image is the problem that is being caused by gunicorn:

[image: WhatsApp Image 2022-10-12 at 2.19.32 PM.jpeg]

On Fri, Oct 14, 2022 at 1:06 PM Shivam Singh @.***> wrote:

I did try to update the compose yaml file to uncomment the Server section code and it worked for me.

version: "2"

services: server: build: ./server/ command: > gunicorn -b 0.0.0.0:8000 --access-logfile - --reload "main:app" volumes:

  • ./server:/app ports:
  • 8000:8000

client: build: ./client/ command: npm run start volumes: - ./client:/app - /app/node_modules ports: - 3000:3000

— Reply to this email directly, view it on GitHub https://github.com/agrawal-rohit/twitter-sentiment-analysis-web-app/issues/25#issuecomment-1278640475, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOT5GSG2VGETQS6FLKWUZDDWDEH7JANCNFSM6AAAAAAQRYLDWI . You are receiving this because you authored the thread.Message ID: <agrawal-rohit/twitter-sentiment-analysis-web-app/issues/25/1278640475@ github.com>

murtazaali1999 avatar Oct 15 '22 10:10 murtazaali1999

I have changed the compose yaml file as @shivams07 said but got this error

Attaching to twitter-sentiment-analysis-client-1, twitter-sentiment-analysis-server-1 Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "gunicorn": executable file not found in $PATH: unknown

zubairfazalkhan avatar Oct 17 '22 06:10 zubairfazalkhan

@murtazaali1999 Could you attach the image again? I can't seem to view it.

@zubairfazalkhan I haven't encountered this error before, even when working with a different OS (Mac or Windows). Did you try to google this error?

agrawal-rohit avatar Oct 28 '22 10:10 agrawal-rohit

191437496-9d63f36d-46ee-4d46-b63f-e70ac76fba91 191437502-f3369aec-0889-4bbf-960d-0148d23bb1c2 191437504-3652916a-ba22-493b-8cdb-e6cbff782281

@agrawal-rohit Re-Uploaded

murtazaali1999 avatar Oct 28 '22 15:10 murtazaali1999

I am having the same error that the server not working...

ghodkeyashraj30 avatar Dec 05 '22 05:12 ghodkeyashraj30

Screenshot (112)

ghodkeyashraj30 avatar Dec 05 '22 05:12 ghodkeyashraj30

I've fixed the issues regarding the docker containers, python dependencies, and the deprecated Twitter API. The project should work correctly through docker now, Please refer to the README for the updated steps to spin up the project 😇

agrawal-rohit avatar Dec 07 '22 08:12 agrawal-rohit

when we are running the project with CNN Model...then how can we run the CNN model along with that code ?....can you please help me

On Wed, Dec 7, 2022 at 2:23 PM Rohit Agrawal @.***> wrote:

Closed #25 https://github.com/agrawal-rohit/twitter-sentiment-analysis-web-app/issues/25 as completed.

— Reply to this email directly, view it on GitHub https://github.com/agrawal-rohit/twitter-sentiment-analysis-web-app/issues/25#event-7975382976, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASVAQJXJV5ZV237LGEN2MSLWMBGADANCNFSM6AAAAAAQRYLDWI . You are receiving this because you commented.Message ID: <agrawal-rohit/twitter-sentiment-analysis-web-app/issue/25/issue_event/7975382976 @github.com>

ghodkeyashraj30 avatar Dec 07 '22 09:12 ghodkeyashraj30

@agrawal-rohit I am still getting error, client site and server site both are working now but when i give the text i got this Screenshot 2023-01-01 at 23 07 52

zubairfazalkhan avatar Jan 01 '23 18:01 zubairfazalkhan