zoukankan      html  css  js  c++  java
  • WebSphere 更新应用后请求静态资源出现 503 错误

    系统环境:WebSphere 6.1.0.25 Network Deployment, 有集群,前端用IBM Http Server Plugin
     
    事情是这样的,由于本集群上有多个应用,所以在更新应用时不可以重启App Server。同时,在集群环境中,如果直接更新应用,会自动触发WAS集群中的App Server重启。所以我们更新应用的习惯是,先停止应用,再卸载,然后再部署新的版本。
     
    在这样的应用更新实施之后,出现过两次这样的情况:部署后的新应用,功能都正常,就是样式全丢了。使用Firefox的Firebug跟踪一下,发现是在请求style.css时,服务器给了503 Service Unavailable的响应。检查服务器上应用部署目录,物理文件都在,访问权限也正常,但是就是无法正确请求到这个文件。
     
    搜索了很多文档,终于找到了这个问题的原因,属于WAS的Bug:
     
    PK80333: CANNOT DISPLAY A CERTAIN GIF FILE
     
    大意是说:当应用正在停止的时候,在某个很短的时间段内,如果服务器接收到一个静态资源(css, js, html, 图片等)的请求,此时,这个静态资源会被服务器标识为永久性不可用。即使应用再次启动,访问这个静态资源,服务器也会给出503 Service Unavailable的响应。但是对于动态资源,例如JSP和Servlet就不存在这个问题。
     
    这个问题在6.0.1.27修复。
     
     
     
    或者,重新启动App Server,也会恢复。
     
    并且,在发生故障的场景中,应用启动之后,如果换一个域名访问此静态资源,就是正常的。
     
    比如说:http://xx.com/styles/style.css 请求正好在应用停止的那个片刻到达服务器,那么后续所有的对于http://xx.com/styles/style.css的请求都会收到503的响应。但是如果换一个指向同一地址的http://xx1.com/styles/style.css请求,则是正常的。
     
    以下是原文:
     
     
     
    Problem summary
    ****************************************************************
    * USERS AFFECTED:  IBM WebSphere Application Server Version 6.1*
    *                  and Version 7.0 users.                      *
    ****************************************************************
    * PROBLEM DESCRIPTION: All requests for a static file result   *
    *                      in a                                    *
    *                      Servlet.has.become.temporarily.unavaila *
    *                      ble.for.service exception.              *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When an application is being stopped a small timing window
    exists during which, if a request for a static file is
    received, the static file will become permanently unavailable
    even after the application has been restarted. Once the static
    file has become permanently unavailable all requests for the
    file will result in a
    Servlet.has.become.temporarily.unavailable.for.service
    exception. The problem will persist until the server on which
    the application is running is restarted.
     
    Note the problem  occurs for static files only and not, for
    example, for servlets and JavaServer Pages (JSPs).
    Problem conclusion
    The WebContainer has been modified to remove the timing window
    so that a request for a static file during application stop
    cannot cause the static file to become permanently unavailable.
     
    The fix for this APAR is currently targeted for inclusion in
    fix packs 6.1.0.27 and 7.0.0.5. 
  • 相关阅读:
    python中Cmap的用法
    Js中 关于top、clientTop、scrollTop、offsetTop
    通过ByteArray来播放MP3
    JS中的call()和apply()方法
    flash 屏幕更新 Essential.ActionScript
    Aptana Studio 3 如何汉化,实现简体中文版
    Flash Builder更新Flash player版本
    随机不重复
    Aptana :调试 javascript 图解
    获取两个数组的相同元素或不相同的元素
  • 原文地址:https://www.cnblogs.com/mayt-/p/4128506.html
Copyright © 2011-2022 走看看