Code Monkey home page Code Monkey logo

Comments (8)

mreferre avatar mreferre commented on July 1, 2024

Which of the two CFN templates are you using (standalone or distributed)? And what is the command you are launching to restart the app server?

from yelb.

sushreeswetanjali99 avatar sushreeswetanjali99 commented on July 1, 2024

Which of the two CFN templates are you using (standalone or distributed)? And what is the command you are launching to restart the app server?

I am using distributes cfn templates.
"ruby yelb-appserver.rb -o 0.0.0.0 & " this command I have used to restart the server.

from yelb.

mreferre avatar mreferre commented on July 1, 2024

You need to export the redis and postgres endpoints before you restart the yelb-appserver. This is how the launch of the appserver works in the CFN template.

You don't need to launch the startup script necessarily because that only tries to set the SEARCH_DOMAIN variable (that is used for other type of deployments) BUT you need to set the YELB_DB_SERVER_ENDPOINT and REDIS_SERVER_ENDPOINT variables.

from yelb.

sushreeswetanjali99 avatar sushreeswetanjali99 commented on July 1, 2024

I have run the two export commands from the command line,

export REDIS_SERVER_ENDPOINT=ip-172-x-x-x.ec2.internal
export YELB_DB_SERVER_ENDPOINT=ip-172-x-x-x.ec2.internal

and then executed the ruby script

ruby yelb-appserver.rb -o 0.0.0.0 &

But the app server still tries to connect to the Redis cache over 127.0.0.1:6379. It specifically fails for the api/getstats, api/pageviews, api/getvotes, etc.

Is there any specific configuration file to be updated? And, also where is the ruby log file located on the linux system?

Thanks in advance!

from yelb.

mreferre avatar mreferre commented on July 1, 2024

Ouch. My bad. The CFN template does NOT call the setup.sh script in the yelb-appserver folder. It calls another script (yelb-appserver.sh) in the Linux deployment folder. This script actually setup the app server on Linux.

You do NOT need to re-run the entire script because the code is already installed but you are probably only missing the setting of the RACK_ENV variable that is set to custom in that script (here).

This tells ruby to start the code and look for the variables you are exporting (here). Long story short, if you run these commands it should work:

export REDIS_SERVER_ENDPOINT=ip-172-x-x-x.ec2.internal
export YELB_DB_SERVER_ENDPOINT=ip-172-x-x-x.ec2.internal
export RACK_ENV="custom"
ruby /yelb-setup/yelb/yelb-appserver/yelb-appserver.rb -o 0.0.0.0 &

Can you try?

from yelb.

sushreeswetanjali99 avatar sushreeswetanjali99 commented on July 1, 2024

image
image
Hey, Thanks for inputs, we fixed that error.
But, We are still having an issue in connecting to Redis. It throws an Internal Server Error. Please find the screen capture of the issue that we have encountered.

from yelb.

sushreeswetanjali99 avatar sushreeswetanjali99 commented on July 1, 2024

Actually it worked now, we executed the commands in order and the app server is able to connect to Redis.

Thanks a lot for your assistance. It was of great help.

image

from yelb.

mreferre avatar mreferre commented on July 1, 2024

Excellent. Thanks for your patience!

from yelb.

Related Issues (15)

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.