[RUBY] [Error] The app is not displayed in the production environment

Overview

I followed the steps to deploy, but I don't see it in production: sob: As a result of trial and error for nearly an hour, I will leave it as a memorandum for my commandment because it was a simple answer: bow_tone1:

Event

Even if I enter ** http: // : 3000 / ** in the browser, it is not displayed: sob: スクリーンショット 2020-06-04 16.08.27.png

Something wrong? ?? I thought, and as a result of continued loading even after reloading, it did not change. ..

Verification

① Check the error on the terminal (EC server)

Repository name(EC server)


$ less log/unicorn.stderr.log

The following error is displayed as a result of entering the above command スクリーンショット 2020-06-04 16.14.18.png

What you should check is ** (Mysql2 :: Error :: ConnectionError) ** on the third line. Does Mysql start? ??

② Check the status of Mysql

Repository name(EC server)


$ sudo service mysqld status

#After entering the command, if the following is displayed, it is running
mysqld (pid  8621) is running...

Alright! no problem. .. Then why? ??

③ Check the port on AWS

スクリーンショット 2020-06-04 16.28.29.png

Port range input omission: tired_face:

Cause

There was an input omission when setting the port of the security group in AWS. You need to enter the following contents when adding an inbound rule.

** [Type] ** Custom TCP rules ** [Protocol] ** TCP ** [Port range] ** 3000 ← I forgot: expressionless: ** [Source] ** Custom 0.0.0.0/0

The screen is displayed in the browser safely: sparkles:

reference

Command collection at the time of production environment deployment https://qiita.com/15grmr/items/7ad36caa82a0fa27c4bd

Errors that faced during deployment and their countermeasures https://qiita.com/sho012b/items/54fcd932ff8c76cdcd05

Recommended Posts

[Error] The app is not displayed in the production environment
[Rails] About the error that the image is not displayed in the production environment
Image is not displayed in production environment
Error in production environment (The asset "~" is not present in the asset pipeline.)
The devise error message is not displayed properly.
When the project is not displayed in eclipse
I get Mysql2 :: Error :: ConnectionError in the production environment
The repository ... is not signed error in docker build apt-get update
[Rails] Reset the database in the production environment
Display the background image in the production environment
"" Application.js "is not present in the asset pipeline" error in Ruby on Rails
[Cloud9] Yay! You ’re on Rails! Is not displayed in the rails tutorial
GoogleMap is not displayed until the browser is reloaded
500 Internal Server Error occurs in Rails production environment
[Java] Something is displayed as "-0.0" in the output
Ebean.update () is not executed in the inherited model.
Possibility when deploying to EC2 but nothing is displayed in the error log
(Capistrano) After deploying, I get a We're sorry… error in the production environment.
The list of installed apps is not displayed in getPackageManager (Android11 ​​/ API level 30)
"tx" is not bound error
[Rails] fields_for is not displayed
A solution to an error that makes you angry that you are not following the MySQL default setting ONLY_FULL_GROUP_BY in a production environment and it is not unique.
Launch the Rails app locally in production mode (API Server)
The idea of cutting off when the error is not resolved
When [command not found: composer] is displayed when [composer install] is displayed in Laravel
Line breaks in the entered text are not displayed in view
[Java] final override error is not displayed at compile time
About the problem that the image is not displayed after AWS deployment
Create a database in a production environment
I want to display the images under assets/images in the production environment
Error in ./gradlew: Symbol not found
Data is not registered in Rails.
[Rails] How to reset the database in production environment (Capistrano version)
ERROR: In file ./.env: environment variable name'THOR_SILENCE_DEPRECATION' may not contain whitespace.
Puma --Nignx is an escape route when rails s -e production -d doesn't work in the environment
What to do if Operation not permitted is displayed when you execute a command in the terminal
What to do if the prefix c is not bound in JSP
catch (Exception e) or catch (IOException e) is not required in the try-with-resources syntax
If rbenv install is not successful, try using the environment variable "RUBY_BUILD_CURL_OPTS".
Spring Autowired is written in the constructor
How to reflect seeds.rb in production environment
must not return in the for statement
How the website is displayed on the screen
What is the main method in Java?
MySQL is not running stably ... Rails app is not running.
Creating a Servlet in the Liberty environment
When UITextView is not displayed (Swift, Xcode)
Add if not in Set, error message if
[Rails] What to do when the Refile image is not displayed when writing the processing at the time of Routing Error
If the JDK version is correct in Eclipse but an error occurs or the compiler does not work properly
How to resolve the error'ActionView :: Template :: Error (The asset "application.css" is not present in the asset pipeline.'" When precompiling Rails assets
[Swift] What to do if the app icon is set but not reflected
When nginx conf is not reflected well in AWS Elastic Beanstalk + Rails environment
[Ruby On Rails] Error in test using RSpec MySQL client is not connected
How to set when "The constructor Empty () is not visible" occurs in junit
Is it mainstream not to write the closing tag of <P> tag in Javadoc?
What is Pullback doing in The Composable Architecture
Common part css is not applied in thymeleaf
The ruby version is managed in the .rbenv / version file
The intersection type introduced in Java 10 is amazing (?)
rails tutorial About account activation in production environment