2014-07-09 4 views
0

Heroku에 응용 프로그램을 배포했지만 실행되지 않았습니다! 내 Procfile의Heroku로 푸시 한 후 응용 프로그램이 작동하지 않음

-----> Python app detected 
-----> Using Python runtime (python-2.7.8) 
-----> Installing dependencies using Pip (1.5.6) 
     Cleaning up... 
-----> Discovering process types 
     Procfile declares types -> web 

-----> Compressing... done, 37.6MB 
-----> Launching... done, v5 
     http://xxxxx.herokuapp.com/ deployed to Heroku 

To [email protected]:xxxxx.git 
    46ff457..1712c4b master -> master 

내용 :

web: python main.py 

내 main.py :

import bottle 
import os 

@bottle.route("/request") 
def tryquestion(): 
return ''' 
    <form action="/request" method="post"> 
     Enter you request: <input name="request" type="text" size="65" /> 
     <input value="Search" type="submit" /> 
    </form> 
    ''' 

@bottle.route("/request", method="POST") 
def answerq(): 
    q = request.forms.get('request') 

    ##### my code ##### 


bottle.run(host="0.0.0.0", port=int(os.environ.get("PORT", 5000))) 

로그인

은 "자식 푸시 Heroku가 마스터"명령의 출력 파일 :

2014-07-15T16:24:45.361567+00:00 app[web.1]: Traceback (most recent call last): 
2014-07-15T16:24:45.361592+00:00 app[web.1]:  from umbc2 import sss 
2014-07-15T16:24:45.361599+00:00 app[web.1]:  from requests import get 
2014-07-15T16:24:45.361641+00:00 app[web.1]: ImportError: No module named reques 
ts 
2014-07-15T16:24:46.801880+00:00 heroku[web.1]: State changed from starting to c 
rashed 
2014-07-15T16:24:46.791054+00:00 heroku[web.1]: Process exited with status 1 
2014-07-15T19:32:07.105615+00:00 heroku[router]: at=error code=H10 desc="App cra 
shed" method=GET path="/" host=xxxx.herokuapp.com request_id=d9d90a2b-8367 
-4b3d-94b8-aecf5c2700a8 fwd="99.231.120.219" dyno= connect= service= status=503 
bytes= 
2014-07-15T19:32:07.254940+00:00 heroku[router]: at=error code=H10 desc="App cra 
shed" method=GET path="/favicon.ico" host=xxxx.herokuapp.com request_id=f3 
0601cc-9703-494e-83ff-7ea3b95aea81 fwd="99.231.120.219" dyno= connect= service= 
status=503 bytes= 
2014-07-15T19:32:07.304050+00:00 heroku[router]: at=error code=H10 desc="App cra 
shed" method=GET path="/favicon.ico" host=xxxx.herokuapp.com request_id=cd 
1ff90b-6644-4f79-b0fc-745f0480c3b7 fwd="99.231.120.219" dyno= connect= service= 
status=503 bytes= 
2014-07-15T19:32:26.459193+00:00 heroku[router]: at=error code=H10 desc="App cra 
shed" method=GET path="/result" host=xxxx.herokuapp.com request_id=93a8d94 
9-8f1b-4f1b-ad00-a1cbf8167bef fwd="99.231.120.219" dyno= connect= service= statu 
s=503 bytes= 

로그를 확인한 후 요청을 가져올 때 오류가 발생합니다. 요구 사항 파일에 요청을 추가하고 응용 프로그램이 실행 중입니다.

덕분에 모두에게 Heroku에 대한 병 응용 프로그램을 실행

+0

출력 내용에 명백한 오류가 표시되지 않습니다. 그러나 프레임 워크를 시작하는 대신 임의의 스크립트를 실행하는 Procfile은 매우 드문 경우입니다. 'main.py'가 무엇을해야하는지, 왜 그것이 작동하지 않는다고 생각하는지 설명 할 수 있습니까? –

+0

내 main.py는 내 로컬에서 작동하지만 heroku에 응용 프로그램을 배포하면 웹 사이트가 실행되고 있지 않습니다. – Faa

+1

"실행되지 않음"이란 무엇을 의미합니까? 사이트를 탐색하면 어떻게됩니까? HTTP 500? 로그에서 봤어? – Chris

답변

0

도와 주셔서은

첫 procfile이

web: python ./main.py $PORT

을 추가하고 요구 사항 파일이 병을 추가 가지고 있는지 확인이 사양이 필요합니다.

+0

당신이 제안한대로 Procfile을 변경했지만 요구 사항 파일에 병이 있지만 변경된 사항이 없습니다. 응용 프로그램을 실행할 때 응용 프로그램 오류가 발생합니다 – Faa

+0

heroku 로그 표시 –

+0

로그를 확인한 후 요청을 가져올 때 오류가 발생합니다 . 요구 사항 파일에 요청을 추가하고 응용 프로그램이 실행 중입니다. 안내 주셔서 감사합니다. – Faa

관련 문제