게시판

bbgo 관련 요청이나 문의 사항을 자유롭게 적어주세요. 뒤로가기
도움 요청 드립니다.
새부리
352 0
2018-11-13 14:52:32
https://gencode.me/25/
220.121.*.*

---------------------------------------아파치 에러 로그-----------------------------------------------------------------

\[Tue Nov 13 14:40:13.059705 2018] [mpm_event:info] [pid 13353:tid 140546139826048] AH00490: Server built: Apr 18 2018 15:36:26

[Tue Nov 13 14:40:13.059720 2018] [core:notice] [pid 13353:tid 140546139826048] AH00094: Command line: '/usr/sbin/apache2'

[Tue Nov 13 14:40:13.059706 2018] [:info] [pid 13358:tid 140546139826048] mod_wsgi (pid=13358): Initializing Python.

[Tue Nov 13 14:40:13.060021 2018] [:info] [pid 13359:tid 140546139826048] mod_wsgi (pid=13359): Initializing Python.

ImportError: No module named site

[Tue Nov 13 14:40:13.068889 2018] [:info] [pid 13358:tid 140546139826048] mod_wsgi (pid=13358): Attach interpreter ''.

[Tue Nov 13 14:40:13.073451 2018] [:info] [pid 13359:tid 140546139826048] mod_wsgi (pid=13359): Attach interpreter ''.

[Tue Nov 13 14:40:14.060794 2018] [:info] [pid 13353:tid 140546139826048] mod_wsgi (pid=13357): Process 'bbgo' has died, restarting.

[Tue Nov 13 14:40:14.061373 2018] [:info] [pid 13417:tid 140546139826048] mod_wsgi (pid=13417): Starting process 'bbgo' with uid=33, gid=33 and threads=15.

[Tue Nov 13 14:40:14.061666 2018] [:info] [pid 13417:tid 140546139826048] mod_wsgi (pid=13417): Python home /home/geo/.pyenv/versions/2.7.13/envs/bbgo/lib/python2.7/site-packagaes.

[Tue Nov 13 14:40:14.061680 2018] [:info] [pid 13417:tid 140546139826048] mod_wsgi (pid=13417): Initializing Python.

ImportError: No module named site

[Tue Nov 13 14:40:15.062284 2018] [:info] [pid 13353:tid 140546139826048] mod_wsgi (pid=13417): Process 'bbgo' has died, restarting.

[Tue Nov 13 14:40:15.062784 2018] [:info] [pid 13491:tid 140546139826048] mod_wsgi (pid=13491): Starting process 'bbgo' with uid=33, gid=33 and threads=15.

[Tue Nov 13 14:40:15.063052 2018] [:info] [pid 13491:tid 140546139826048] mod_wsgi (pid=13491): Python home /home/geo/.pyenv/versions/2.7.13/envs/bbgo/lib/python2.7/site-packagaes.

[Tue Nov 13 14:40:15.063065 2018] [:info] [pid 13491:tid 140546139826048] mod_wsgi (pid=13491): Initializing Python.

ImportError: No module named site

[Tue Nov 13 14:40:16.063667 2018] [:info] [pid 13353:tid 140546139826048] mod_wsgi (pid=13491): Process 'bbgo' has died, restarting.

[Tue Nov 13 14:40:16.064159 2018] [:info] [pid 13494:tid 140546139826048] mod_wsgi (pid=13494): Starting process 'bbgo' with uid=33, gid=33 and threads=15.

[Tue Nov 13 14:40:16.064443 2018] [:info] [pid 13494:tid 140546139826048] mod_wsgi (pid=13494): Python home /home/geo/.pyenv/versions/2.7.13/envs/bbgo/lib/python2.7/site-packagaes.

[Tue Nov 13 14:40:16.064457 2018] [:info] [pid 13494:tid 140546139826048] mod_wsgi (pid=13494): Initializing Python.

ImportError: No module named site

[Tue Nov 13 14:40:17.065018 2018] [:info] [pid 13353:tid 140546139826048] mod_wsgi (pid=13494): Process 'bbgo' has died, restarting.

[Tue Nov 13 14:40:17.065478 2018] [:info] [pid 13495:tid 140546139826048] mod_wsgi (pid=13495): Starting process 'bbgo' with uid=33, gid=33 and threads=15.

[Tue Nov 13 14:40:17.065753 2018] [:info] [pid 13495:tid 140546139826048] mod_wsgi (pid=13495): Python home /home/geo/.pyenv/versions/2.7.13/envs/bbgo/lib/python2.7/site-packagaes.

[Tue Nov 13 14:40:17.065766 2018] [:info] [pid 13495:tid 140546139826048] mod_wsgi (pid=13495): Initializing Python.

ImportError: No module named site

[Tue Nov 13 14:40:18.066376 2018] [:info] [pid 13353:tid 140546139826048] mod_wsgi (pid=13495): Process 'bbgo' has died, restarting.

[Tue Nov 13 14:40:18.066849 2018] [:info] [pid 13536:tid 140546139826048] mod_wsgi (pid=13536): Starting process 'bbgo' with uid=33, gid=33 and threads=15.

[Tue Nov 13 14:40:18.067107 2018] [:info] [pid 13536:tid 140546139826048] mod_wsgi (pid=13536): Python home /home/geo/.pyenv/versions/2.7.13/envs/bbgo/lib/python2.7/site-packagaes.

[Tue Nov 13 14:40:18.067120 2018] [:info] [pid 13536:tid 140546139826048] mod_wsgi (pid=13536): Initializing Python.

ImportError: No module named site

[Tue Nov 13 14:40:19.067744 2018] [:info] [pid 13353:tid 140546139826048] mod_wsgi (pid=13536): Process 'bbgo' has died, restarting.

[Tue Nov 13 14:40:19.068214 2018] [:info] [pid 13539:tid 140546139826048] mod_wsgi (pid=13539): Starting process 'bbgo' with uid=33, gid=33 and threads=15.

[Tue Nov 13 14:40:19.068503 2018] [:info] [pid 13539:tid 140546139826048] mod_wsgi (pid=13539): Python home /home/geo/.pyenv/versions/2.7.13/envs/bbgo/lib/python2.7/site-packagaes.

[Tue Nov 13 14:40:19.068517 2018] [:info] [pid 13539:tid 140546139826048] mod_wsgi (pid=13539): Initializing Python.

ImportError: No module named site

[Tue Nov 13 14:40:20.069129 2018] [:info] [pid 13353:tid 140546139826048] mod_wsgi (pid=13539): Process 'bbgo' has died, restarting.

[Tue Nov 13 14:40:20.069622 2018] [:info] [pid 13541:tid 140546139826048] mod_wsgi (pid=13541): Starting process 'bbgo' with uid=33, gid=33 and threads=15.

[Tue Nov 13 14:40:20.069911 2018] [:info] [pid 13541:tid 140546139826048] mod_wsgi (pid=13541): Python home /home/geo/.pyenv/versions/2.7.13/envs/bbgo/lib/python2.7/site-packagaes.

[Tue Nov 13 14:40:20.069925 2018] [:info] [pid 13541:tid 140546139826048] mod_wsgi (pid=13541): Initializing Python.

ImportError: No module named site

---------------------------------------000-default.conf----------------------------------------

<VirtualHost *:80>
#       DocumentRoot /bbgo
        ServerName ubuntu
#        WSGIDaemonProcess bbgo python-home=/home/geo/.pyenv/versions/bbgo/lib/python2.7/site-packagaes python-path=/bbgo/bbgo/
        WSGIDaemonProcess bbgo python-home=/home/geo/.pyenv/versions/2.7.13/envs/bbgo/lib/python2.7/site-packagaes
#       WSGIPythonHome  /home/geo/.pyenv/versions/bbgo/
#       WSGIPythonPath  /bbgo
        WSGIProcessGroup bbgo
        WSGIScriptAlias / /bbgo/bbgo/apache/wsgi.py

        <Directory "/bbgo/bbgo/apache/">
                <Files wsgi.py>
                Require all granted
                </Files>
        </Directory>

        Alias /static/admin /home/geo/.pyenv/versions/2.7.13/envs/bbgo/lib/python2.7/site-packages/django/contrib/admin/static/admin/
        <Directory "/home/geo/.pyenv/versions/2.7.13/envs/bbgo/lib/python2.7/site-packages/django/contrib/admin/static/admin/">
                Require all granted
        </Directory>
        Alias /static/summernote /home/geo/.pyenv/versions/2.7.13/envs/bbgo/lib/python2.7/site-packages/django_summernote/static/summernote/
        <Directory "/home/geo/.pyenv/versions/2.7.13/envs/bbgo/lib/python2.7/site-packages/django_summernote/static/summernote/">
                Require all granted
        </Directory>
        Alias /static/ /bbgo/static/
        <Directory "/bbgo/static/">
                Require all granted
        </Directory>
        Alias /upload/ /bbgo/upload/
        <Directory "/bbgo/upload/">
                Require all granted

----------------------------------------------wsgi.py-----------------------------------------------------

"""
WSGI config for bbgo project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""

import os,sys
#sys.path.append('/home/geo/.pyenv/versions/bbgo/lib/python2.7/site-packages')
#sys.path.append('/home/geo/.pyenv/versions/2.7.13')
#path = '/bbgo/bbgo/'
from django.core.wsgi import get_wsgi_application
#BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
#sys.path.append(BASE_DIR)
#path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
path = '/bbgo/bbgo/'
if path not in sys.path:
sys.path.append(path)
#from django.core.wsgi import get_wsgi_application
#os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bbgo.settings")
os.environ['DJANGO_SETTINGS_MODULE'] = 'bbgo.settings'
#from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

----------------------------------path정보-------------------------------------------
===== sys.path / PYTHONPATH =====
DISPLAY                        localhost:10.0
HOME                           /home/geo
LANG                           ko_KR.UTF-8
LESSCLOSE                      /usr/bin/lesspipe %s %s
LESSOPEN                       | /usr/bin/lesspipe %s
LOGNAME                        geo
LS_COLORS                      rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd
MAIL                           /var/mail/geo
PATH                           /home/geo/.pyenv/versions/bbgo/bin:/home/geo/.pyenv/libexec:/home/geo/
PWD                            /bbgo/bbgo
PYENV_ACTIVATE_SHELL           1
PYENV_DIR                      /bbgo/bbgo
PYENV_HOOK_PATH                /home/geo/.pyenv/pyenv.d:/usr/local/etc/pyenv.d:/etc/pyenv.d:/usr/lib/
PYENV_ROOT                     /home/geo/.pyenv
PYENV_SHELL                    bash
PYENV_VERSION                  bbgo
PYENV_VIRTUALENV_INIT          1
PYENV_VIRTUAL_ENV              /home/geo/.pyenv/versions/2.7.13/envs/bbgo
SHELL                          /bin/bash
SHLVL                          1
SSH_CLIENT                     172.16.10.234 50860 22
SSH_CONNECTION                 172.16.10.234 50860 172.16.10.242 22
SSH_TTY                        /dev/pts/0
TERM                           xterm
USER                           geo
VIRTUAL_ENV                    /home/geo/.pyenv/versions/2.7.13/envs/bbgo
XDG_RUNTIME_DIR                /run/user/1000
XDG_SESSION_ID                 1
_OLD_VIRTUAL_PS1               \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$



아무리 공부를  하고 구글링을해도 ImportError: No module named site 에러가 나오는 이유를 모르겠습니다.

해결방안 알려주시면 정말 감사하겠습니다..


비추 공유
댓글 [ 6 ]
genonfire 11-13
직접 시스템을 보지 않고 로그만으로 문제점을 확인하기는 어렵습니다.

제가 보기엔 apache + wsgi 연동 이슈 같은데 bbgo 가 아닌 다른 Django 앱이나 기본 Django 서버로도 동일한 에러가 나는지 혹은 잘 동작하는지 부터 확인 후 디버깅을 시작해 보시는 게 좋을 것 같습니다.
프로버그래머 11-14
삭제된 댓글입니다.
프로버그래머 11-14
잘못된 내용을 달아서 삭제하였습니다.

이쪽을 참고해보세요
https://stackoverflow.com/a/41006418
새부리 11-14
우분투 14.04 버전에서 16.04으로 업그레이드 하고 Django 앱이나 기본 Django서버로 아파치 연동하는거 성공해서
bbgo 설치해서 연동했는데..오류 한번 봐주시면 감사하겠습니다.

딱히 에러는 안나오는데 사이트 연결이 안됩니다..
genonfire 11-14
virtualenv 설정 이슈일 수도 있겠네요. virtualenv 를 쓰지 말고 해보시죠.
borring 11-14
genonfire
genonfire님도 pyenv쓰셨나요?