如何解决“DeprecationWarning:'GLOBAL'已弃用,请在使用passenger + nginx

时间:2016-11-24 16:11:14

标签: nginx deployment passenger

  1. 我处于开发模式时,我的节点应用程序可以正常运行。只需使用“npm start”即可运行它,我可以通过“http://localhost:3000
  2. 访问我的应用
  3. 但是当我使用nginx + passenger部署我的节点应用程序时,我遇到了这个错误,详细信息列表如下。
  4. 我注意到关键信息必须是:

      

    “DeprecationWarning:'GLOBAL'已被弃用,请使用'global'”

    但我不知道它是指什么,因为我在代码文件中找不到'GLOBAL';

  5. 我确信乘客已成功安装并正常工作,因为我可以通过它运行其他简单的节点应用程序而不是我的应用程序,我不知道为什么......
  6. 我已经为这些问题奋斗了好几个小时,并搜索了谷歌的答案,希望你能给我一些有用的信息。
  7. the error info

    信息

      

    无法启动Web应用程序     启动Web应用程序时发生错误:它没有及时写入启动响应。有关此问题的详细信息,请阅读此文章。

    Raw process output:
    
    (node:12671) DeprecationWarning: 'GLOBAL' is deprecated, use 'global'
    Error ID
    ef585c1b
    Application root
    /var/www/microblog/myblog
    Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV, NODE_ENV and PASSENGER_APP_ENV)
    development
    User and groups
    uid=0(root) gid=0(root) groups=0(root)
    Environment variables
    XDG_SESSION_ID=55
    COMP_WORDBREAKS=    
    "'><;|&(:
    TERM=xterm-256color
    SHELL=/bin/bash
    SSH_CLIENT=27.46.7.216 5816 22
    SSH_TTY=/dev/pts/3
    USER=root
    
         

    LS_COLORS = RS = 0:二= 01; 34:LN = 01; 36:MH = 00:PI = 40; 33:SO = 01; 35:做= 01; 35:BD = 40; 33; 01 :CD = 40; 33; 01:或= 40; 31; 01:SU = 37; 41:SG = 30; 43:CA = 30; 41:TW = 30; 42:流量= 34; 42:ST = 37 ; 44:前= 01; 32:的.tar = 01; 31: .tgz的= 01; 31: .ARJ = 01; 31: .taz = 01; 31 : .LZH = 01; 31: .lzma = 01; 31: .tlz = 01; 31: .txz = 01; 31:的.zip = 01 ; 31: .Z = 01; 31: .Z = 01; 31: .dz = 01; 31:。广州= 01; 31:。 LZ = 01; 31: .xz = 01; 31:操作.bz2 = 01; 31: .BZ = 01; 31: .tbz格式= 01; 31: .tbz2 = 01; 31: .tz = 01; 31:的.deb = 01; 31:的.rpm = 01; 31:的.jar = 01; 31: 的.war = 01; 31:的.ear = 01; 31:的.sar = 01; 31: .rar程序= 01; 31: = .ace的01 ; 31: .zoo = 01; 31: .cpio = 01; 31: .7z压缩= 01; 31: .rz = 01; 31: .JPG = 01; 35: .JPEG = 01; 35: .gif注意= 01; 35: .BMP = 01; 35: .pbm = 01; 35: .PGM = 01; 35: .ppm格式= 01; 35:的.tga = 01; 35: .xbm = 01; 35: .xpm = 01; 35: .TIF = 01; 35: .TIFF = 01; 35: .PNG = 01; 35: .SVG = 01; 35:名.svgz = 01; 35: .mng = 01; 35: .PCX = 01; 35: .MOV = 01; 35: .MPG = 01; 35:文件.mpeg = 01; 35: .m2v = 01; 35: .MKV = 01; 35: .webm = 01; 35: .ogm = 01; 35:的.mp4 = 01; 35:的.m4v = 01; 35: .mp4v = 01; 35: .VOB = 01; 35: .QT = 01; 35: .NUV = 01; 35:的.wmv = 01; 35:的.asf = 01; 35:。室= 01; 35: .rmvb = 01; 35: .FLC = 01; 35:的.avi = 01; 35: .FLI = 01; 35: FLV的= 01; 35: .gl = 01; 35: .dl = 01; 35: .xcf = 01; 35:< /em>.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01; 35: .anx = 01; 35:的.ogv = 01; 35: .ogx = 01; 35: .AAC = 00; 36: .AU = 00; 36: .FLAC = 00; 36: .MID = 00; 36: .midi = 00; 36: .mka = 00; 36: .MP3 = 00; 36: .mpc = 00; 36: .OGG = 00; 36: .RA = 00; 36:的.wav = 00; 36:< EM> .axa = 00; 36: .oga = 00; 36: .SPX = 00; 36: .xspf = 00; 36:       MAIL =的/ var /邮件/根      PATH =在/ usr / local / sbin中:在/ usr / local / bin目录:/ usr / sbin目录:在/ usr / bin中:/ sbin目录:/ bin中:在/ usr /游戏:在/ usr /本地/游戏       PWD = /无功/网络/微博/ myblog       LANG =的en_US.UTF-8       NODE_PATH =的/ usr /共享/乘客/节点       SHLVL = 1       HOME = /根       LANGUAGE = EN_US:       LOGNAME =根       SSH_CONNECTION = 27.46.7.216 5816 123.57.243.29 22       LESSOPEN = | / usr / bin / lesspipe%s       XDG_RUNTIME_DIR = /运行/用户/ 0       LESSCLOSE = / usr / bin / lesspipe%s%s       _ =的/ usr /斌/乘客       OLDPWD = /无功/网络/微博      PASSENGER_LOCATION_CONFIGURATION_FILE = / usr / lib中/红宝石/ vendor_ruby / phusion_passenger / locations.ini       PASSENGER_USE_FEEDBACK_FD =真       UID = 0       SERVER_SOFTWARE = nginx / 1.10.1 Phusion_Passenger / 5.0.30       PASSENGER_DEBUG_DIR = / TMP / passenger.spawn-debug.XXXXu3bFF4       IN_PASSENGER = 1       PYTHONUNBUFFERED = 1       RAILS_ENV =发展       RACK_ENV =发展       WSGI_ENV =发展       NODE_ENV =发展       PASSENGER_APP_ENV =发展       Ulimits       未知

    System metrics
    ------------- General -------------
    Kernel version    : 3.13.0-86-generic
    Uptime            : 1d 13h 59m 14s
    Load averages     : 0.07%, 0.07%, 0.06%
    Fork rate         : unknown
    
    ------------- CPU -------------
    Number of CPUs    :    1
    Average CPU usage :   0%  --   0% user,   0% nice,   0% system, 100% idle
      CPU 1           :   0%  --   0% user,   0% nice,   0% system, 100% idle
    I/O pressure      :   0%
      CPU 1           :   0%
    Interference from other VMs:   0%
      CPU 1                    :   0%
    
    ------------- Memory -------------
    RAM total         :    992 MB
    RAM used          :    224 MB (23%)
    RAM free          :    767 MB
    Swap total        :      0 MB
    Swap used         :      0 MB (-nan%)
    Swap free         :      0 MB
    Swap in           : unknown
    Swap out          : unknown
    ------------------------------------------------------------------------
    

1 个答案:

答案 0 :(得分:0)

啊~~~~~~我发布的话题是错误的,“GLOBAL”只是警告!真正重要的是:

  • “启动Web应用程序时出错:它没有 及时写下启动回复​​。“

这意味着我的应用程序没有快速启动甚至根本没有启动。所以问题出在我的/ etc / nginx / sites-enabled .conf文件中!因为我使用express + node模式:

  1. 我犯的错误是仅适用于节点应用程序的启动文件:passenger_startup_file app.js;
  2. 并且它应该是:passenger_startup_file bin/www