尝试了多个论坛来到这个底部。 我希望我能在这里得到一些方向: 这里是我正在使用的堆栈:红帽企业Linux服务器版本5.6(Tikanga)Glassfish 3.0.1上的Liferay 6.0.6 MySQL 5.0.77 Apache 2.2.3 Liferay门户为最终用户提供了各种portlet。 静态内容(网页),静态资源(主要是1MB-80MB大小的pdf和mp3文件),file upload和下载function(主要是40-60mb mp3文件)以及这些MP3文件的在线stream式传输。 以下是最终用户的奇怪体验:在正常的负载下:(20-30)用户上传,下载或stream媒体文件和20-30访问静态内容(一些下载),我们看到以下内容: 1)点击一个链接触发一部分MP3的下载(该部分是几秒钟)。 2)点击一个链接,会触发页面内容的下载而不是渲染。 3)点击链接会导致页面将二进制数据转储到最终用户而不是预期的内容。 4)点击一个链接返回一个javascript文件的文本,而不是渲染页面。 每个事件都是完全随机的(或者是如此)。 有时候是有效的,有时却不行。 这似乎与浏览器或客户端操作系统没有关系。 当使用SSL连接而不是普通的http时,奇怪的事件似乎更频繁地发生。 Apache仅作为代理服务器(反向)。 它基本上将所有请求传递给Glassfish。 没有任何Apache服务的静态内容代理。 我们从头开始重新构build整个堆栈,并重新部署portlet战争,但仍然有相同的问题。 Liferay作为单个服务器运行(不是群集的)。 我们在Apache中禁用了mod_cache。 随着服务器负载的增长,问题会更加频繁。 今天早上的负载非常轻,我们看到的问题很less,但是网站的使用将会增长,尤其是在今天晚上9点左右到周三早上的CST。 您可以在这段时间尝试网站( http://preview.bsfinternational.org ),我期望您随时随地点击网站上的链接(仅在login时调用https),您可能会体验到其中的一种奇怪现象。 同样,https似乎加剧了这个问题。 这看起来像是一个caching问题,但我不知道在堆栈中的哪个位置开始剥洋葱。 Apache的? Liferay的? Glassfish的? MySQL的? 甚至可能是Redhat? 我们很难过,我们发布的大多数论坛(LifeRay和Glassfish)都没有提出什么build议。 我只需要从哪里开始寻找的想法。 我明白,我们可以有一个portlet 编辑:打开一个hex编辑器中的文件,似乎是下载,而不是渲染的页面,我们看到,前4000个字符是“垃圾”,然后看到“HTTP / 1.1 ….”“正常”标题。 所以有些东西是倾倒混乱的字符来抵消4000(当在hex编辑器中查看时)。 也许是一个线索? 编辑2:4000h抵消是16k(16384)。 我认为这是一个caching问题,但不知道在哪里寻找这种大小的caching设置。 我在Apache中看到对16k LRUcaching缓冲区的引用,但是我知道Glassfish(或者Liferay)使用ehcache。 这是否引发任何人的想法? 想法?
对不起,如果我不够精通,有些人会希望在这里。 我已经在VPS上成功地获得了Apache mod_proxy_ajp和Glassfish 3.1.2的配合。 然而,它是一个Apache httpd服务器通过端口8009连接到Glassfish服务器上的单个域(看起来相当标准)。 我想尝试添加另一个域到Glassfish服务器,稍微不同的代码库支持不同的Apache虚拟服务器,都在同一台机器上。 这是可能的,有人可以给我一些提示或指示,从哪里开始或做什么。 我学会了如何让自己的连接器设置为一个站点,但无法find如何做到这一点。 顺便说一下,这是在VPS上运行。
使用该答案: 如何将端口80上的stream量redirect到Tomcat端口8080,同时仍允许服务器在端口80上发送/接收 我已经configuration我的apache2服务器redirect一些请求8080上的glassfish: <VirtualHost *:80> (…) ProxyPass /tomcat/ http://localhost:8080/ ProxyPassReverse /tomcat/ http://localhost:8080/ ProxyPass /tomcat-admin/ http://localhost:4848/ ProxyPassReverse /tomcat-admin/ http://localhost:4848/ </VirtualHost> 在http://my.server.org/tomcat/上 ,我可以清楚地看到: GlassFish Server 3.1.2 Your server is now running 但http://my.server.org/tomcat-admin/返回一个空白的屏幕,但我可以看到pipe理页面的HTML源,所以我想有些资源不能加载。 我应该如何解决这个问题? 另一个问题:如果我的Java Web应用程序使用httpS ,我应该只是添加: ProxyPass /tomcat-secure/ http://localhost:8443/ ProxyPassReverse /tomcat-secure/ http://localhost:8443/ </VirtualHost> ?
我能够自动启动Glassfish域,换句话说,我可以使用“asadmin create-service”作为服务来运行它。 当机器重新启动时,域名正在自动启动。 我想要启动一个域的集群的所有实例类似的事情。 自从机器重新启动后,域将自动运行,但是本机中的实例仍然停机。 是否有可能自动启动群集? 平台:Ubuntu 12.04 AS = Glassfish 3.1
我可能会丢失一些东西,但是我在DAS上创build了一个JDBC连接池,然后创build了一个资源,并在不同主机上的两个实例上启用了该资源。 我没有看到连接被添加到MySQL服务器,并没有抛出任何错误,除了在空的JSF页面的结果集。 我没有其他错误。 我也删除了连接池和资源,并使用asadmin添加。 Asadmin说,它安装在两个客户端,但没有连接。 我还将mysql连接器jar添加到了domain1 / lib,并在lib下的节点上看到它。
我当前的设置有两个virtual-server , my-server使用www.redirect到域www. 字首。 <virtual-server network-listeners="my-nlistener" id="my-server" sso-cookie-http-only="false" hosts="mydomain.com"> <property name="redirect_1" value="from=/my-page.jsp url-prefix=http://www.mydomain.com/my-page.jsp"/> <property name="redirect_2" value="from=/about.jsp url-prefix=http://www.mydomain.com/about.jsp"/> </virtual-server> <virtual-server network-listeners="my-nlistener" id="my-new-server" sso-cookie-http-only="false" hosts="www.mydomain.com"> </virtual-server> 不幸的是,对于SEO合规性,我需要做301redirect而不是302 GlassFish中如何强制301redirect? 或者,更好的做法是只保留一个virtual-server并拥有多个主机: <virtual-server id="my-new-server" hosts="www.mydomain.com, domain.com"> 。 我很想避免创build一个Spring应用程序来执行指定页面的301 redirects 。
我有一个有两个节点的Glassfish(2.0)群集。 我想仅将一些额外的JVM设置传递给单个节点。 这是可configuration的吗? 至less从控制台,我看到,这种select性的configuration只适用于系统属性,但不适用于JVM设置。
我只是下载安装程序,并运行glassFish 3.1的典型,但是我已经尝试了2次,现在已经有两次相同的错误,现在任何帮助将不胜感激(我已经在网上search,我发现的一切是安装此版本的Java(所有不同),并没有帮助) 错误是 PERFORMING THE REQUIRED CONFIGURATIONS ______________________________________ CREATING DOMAIN _______________ Executing command :C:\glassfish3\glassfish\bin\asadmin.bat –user admin –passwordfile C:\Users\cirrus\AppData\Local\Temp\2\glassfish-3.1-windows.exe5\asadminTmp4333077090323830119.tmp create-domain –savelogin –checkports=false –adminport 4848 –instanceport 8080 –domainproperties=jms.port=7676:domain.jmxPort=8686:orb.listener.port=3700:http.ssl.port=8181:orb.ssl.port=3820:orb.mutualauth.port=3920 domain1 C:\glassfish3\glassfish\bin\asadmin.bat –user admin –passwordfile C:\Users\cirrus\AppData\Local\Temp\2\glassfish-3.1-windows.exe5\asadminTmp2688890700362893572.tmp create-domain –savelogin –checkports=false –adminport 4848 –instanceport 8080 –domainproperties=jms.port=7676:domain.jmxPort=8686:orb.listener.port=3700:http.ssl.port=8181:orb.ssl.port=3820:orb.mutualauth.port=3920 domain1The system cannot find the path specified. 上面的错误消息是 The configuration has failed. Please see the […]
我已经从4.0升级到GlassFish 4.1,现在我无法从JConsole和VisualVM访问它(但是我曾经)。 JConsole在input用户名/密码之前输出: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: non-JRMP server at remote endpoint] at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:369) at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:268) at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:357) at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:313) at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:292) Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: non-JRMP server at remote endpoint] at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:118) at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:203) at javax.naming.InitialContext.lookup(InitialContext.java:411) at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1936) at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1903) at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:286) … 4 […]
我正在使用Glassfish 3.1.2.2。 我已经部署Glassfish到本地主机。 我启用了监视服务,并将所有组件的日志级别设置为“高”。 根据官方文档 ,我应该可以使用http://host:port/management/domain/view-log中的REST端点查看服务器日志,但是我得到了一个通用响应: $ curl -H "Accept: application/json" http://localhost:4848/monitoring/domain/view-log {"message":"","command":"Monitoring Data","exit_code":"SUCCESS"} 我在这个地址得到了正确的答复,所以我认为我的configuration大部分是正确的: $ curl -H "Accept: application/json" http://localhost:4848/monitoring/domain/ { "message":"", "command":"Monitoring Data", "exit_code":"SUCCESS", "extraProperties":{ "entity":{ }, "childResources":{ "server":"http:\/\/localhost:4848\/monitoring\/domain\/server" } } } 请注意,我收到的通用响应是针对domain下的任何无效端点发送的: $ curl -H "Accept: application/json" http://localhost:4848/monitoring/domain/jklnjkn {"message":"","command":"Monitoring Data","exit_code":"SUCCESS"} 如何使用监视REST端点访问Glassfish 3.1.2.2服务器日志?