커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
배포에서 에러
undefined주차
북마크
김*흰
댓글
71
추천
0
조회수
62
조회수
62
답변 완료

* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.

* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.



severe 가 뜨면서 안 됩니다



보고 계신 화면 전체를 캡처해 주시면, 튜터님들이 빠르게 상황을 이해할 수

스파르타 즉문즉답

있어요.




from flask import Flask, render_template, request, jsonify
application = app = Flask(__name__)


from pymongo import MongoClient
import certifi
ca = certifi.where()
client = MongoClient('mongodb+srv://sparta:test@cluster0.90gybmt.mongodb.net/?retryWrites=true&w=majority', tlsCAFile = ca)
db = client.dbsparta


@app.route('/')
def home():
   return render_template('index.html')


@app.route("/guestbook", methods=["POST"])
def guestbook_post():
    name_receive = request.form['name_give']
    comment_receive = request.form['comment_give']


    doc = {
        'name':name_receive,
        'comment':comment_receive
    }


    db.fan.insert_one(doc)
    return jsonify({'msg': '저장완료!'})


@app.route("/guestbook", methods=["GET"])
def guestbook_get():
    all_comments = list(db.fan.find({},{'_id':False}))
    return jsonify({'result': all_comments})


if __name__ == '__main__':
   app.run()
(venv) gimdahuinui-MacBook-Pro:05.fan kimdaheen$ eb create myweb
Creating application version archive "app-230505_031758343683".
Uploading: [--------------------------------------------------Uploading: [########------------------------------------------Uploading: [#################---------------------------------Uploading: [#########################-------------------------Uploading: [#################################-----------------Uploading: [##########################################--------Uploading: [##################################################] 100% Done...
Environment details for: myweb
  Application name: 05.fan
  Region: ap-northeast-2
  Deployed Version: app-230505_031758343683
  Environment ID: e-9ktannrdzi
  Platform: arn:aws:elasticbeanstalk:ap-northeast-2::platform/Python 3.8 running on 64bit Amazon Linux 2/3.5.2
  Tier: WebServer-Standard-1.0
  CNAME: UNKNOWN
  Updated: 2023-05-04 18:18:11.319000+00:00
Printing Status:
2023-05-04 18:18:09    INFO    createEnvironment is starting.
2023-05-04 18:18:11    INFO    Using elasticbeanstalk-ap-northeast-2-077891342081 as Amazon S3 storage bucket for environment data.
2023-05-04 18:18:38    INFO    Created security group named: sg-0391d629bb1889b3e
2023-05-04 18:18:53    INFO    Created security group named: awseb-e-9ktannrdzi-stack-AWSEBSecurityGroup-1ETTBPCGAUZA
2023-05-04 18:18:53    INFO    Created target group named: arn:aws:elasticloadbalancing:ap-northeast-2:077891342081:targetgroup/awseb-AWSEB-YUTY1H4A8HAY/8cb98566667a513a
2023-05-04 18:18:53    INFO    Created Auto Scaling launch configuration named: awseb-e-9ktannrdzi-stack-AWSEBAutoScalingLaunchConfiguration-hDdKoqR03oVX
2023-05-04 18:19:55    INFO    Created Auto Scaling group named: awseb-e-9ktannrdzi-stack-AWSEBAutoScalingGroup-10WKF28IG6898
2023-05-04 18:19:55    INFO    Waiting for EC2 instances to launch. This may take a few minutes.
2023-05-04 18:19:55    INFO    Created Auto Scaling group policy named: arn:aws:autoscaling:ap-northeast-2:077891342081:scalingPolicy:f00180ea-f175-4b2d-aa2f-ddf5d278da0e:autoScalingGroupName/awseb-e-9ktannrdzi-stack-AWSEBAutoScalingGroup-10WKF28IG6898:policyName/awseb-e-9ktannrdzi-stack-AWSEBAutoScalingScaleDownPolicy-hozhVQInD7mT
2023-05-04 18:19:55    INFO    Created Auto Scaling group policy named: arn:aws:autoscaling:ap-northeast-2:077891342081:scalingPolicy:a573e44d-f24c-44ec-982d-eb54ade242d5:autoScalingGroupName/awseb-e-9ktannrdzi-stack-AWSEBAutoScalingGroup-10WKF28IG6898:policyName/awseb-e-9ktannrdzi-stack-AWSEBAutoScalingScaleUpPolicy-rljbdZQUqrPr
2023-05-04 18:20:10    INFO    Created CloudWatch alarm named: awseb-e-9ktannrdzi-stack-AWSEBCloudwatchAlarmLow-1LG1K01WUJRYK
2023-05-04 18:20:10    INFO    Created CloudWatch alarm named: awseb-e-9ktannrdzi-stack-AWSEBCloudwatchAlarmHigh-8NV7OVEC2U5B
2023-05-04 18:20:13    INFO    Created load balancer named: arn:aws:elasticloadbalancing:ap-northeast-2:077891342081:loadbalancer/app/awseb-AWSEB-1GOLJ4L4T8ZTB/5607a7dcdcb71242
2023-05-04 18:20:30    INFO    Created Load Balancer listener named: arn:aws:elasticloadbalancing:ap-northeast-2:077891342081:listener/app/awseb-AWSEB-1GOLJ4L4T8ZTB/5607a7dcdcb71242/7d07ee7170b3e710
2023-05-04 18:20:34    ERROR   Instance deployment failed. For details, see 'eb-engine.log'.
2023-05-04 18:20:36    ERROR   [Instance: i-0c50cd8a164651b13] Command failed on instance. Return code: 1 Output: Engine execution has encountered an error..
2023-05-04 18:20:36    INFO    Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2023-05-04 18:21:39    ERROR   Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.
                                
ERROR: ServiceError - Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.
취소
 공유
취소
댓글 0
댓글 알림
나의얼굴