[Clustering/JBoss] - Re: Jboss 4.2.1 web session problem
by vkviswanadh
Hi , I reinstalled Apache 2.2.6 and configured with mod_jk-apache-2.2.4.
Then I tested , it was not throwing any error.
I thing it is configured properly.
(1) mod-jk.conf
| # Load mod_jk module
| # Specify the filename of the mod_jk lib
| LoadModule jk_module modules/mod_jk.so
|
| # Where to find workers.properties
| JkWorkersFile conf/workers.properties
|
| # Where to put jk logs
| JkLogFile logs/mod_jk.log
|
| # Set the jk log level [debug/error/info]
| JkLogLevel info
|
| # Select the log format
| JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
|
| # JkOptions indicates to send SSK KEY SIZE
| # Note: Changed from +ForwardURICompat.
| # See http://tomcat.apache.org/security-jk.html
| JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories
|
| # JkRequestLogFormat
| JkRequestLogFormat "%w %V %T"
|
| # Mount your applications
| JkMount /__application__/* loadbalancer
|
| # You can use external file for mount points.
| # It will be checked for updates each 60 seconds.
| # The format of the file is: /url=worker
| # /examples/*=loadbalancer
| JkMountFile conf/uriworkermap.properties
|
| # Add shared memory.
| # This directive is present with 1.2.10 and
| # later versions of mod_jk, and is needed for
| # for load balancing to work properly
| # Note: Replaced JkShmFile logs/jk.shm due to SELinux issues. Refer to
| # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225452
| JkShmFile run/jk.shm
|
| # Add jkstatus for managing runtime data
| <Location /jkstatus/>
| JkMount status
| Order deny,allow
| Deny from all
| Allow from all
| </Location>
|
(2)workers.properties
| # Define list of workers that will be used
| # for mapping requests
| # The configuration directives are valid
| # for the mod_jk version 1.2.18 and later
| #
| worker.list=loadbalancer,status
|
| # Define Node1
| # modify the host as your host IP or DNS name.
| worker.node1.port=8009
| worker.node1.host=166.35.136.77
| worker.node1.type=ajp13
| worker.node1.lbfactor=1
| # worker.node1.connection_pool_size=10 (1)
|
| # Define Node2
| # modify the host as your host IP or DNS name.
| worker.node2.port=8009
| worker.node2.host=166.35.136.77
| worker.node2.type=ajp13
| worker.node2.lbfactor=1
| # worker.node1.connection_pool_size=10 (1)
|
| # Load-balancing behaviour
| worker.loadbalancer.type=lb
| worker.loadbalancer.balance_workers=node1,node2
|
| # Status worker for managing load balancer
| worker.status.type=status
|
(3)uriworkermap.properties
| # Simple worker configuration file
| #
|
| # Mount the Servlet context to the ajp13 worker
| /jmx-console=loadbalancer
| /jmx-console/*=loadbalancer
| /web-console=loadbalancer
| /web-console/*=loadbalancer
|
|
these are the configurations which made in apache side.
and at JBoss 4.2.1 side at the file
<JBOSS_HOME>\server\node1\deploy\jboss-web.deployer\server.xml
|
| <!-- Define an AJP 1.3 Connector on port 8009 -->
| <Connector port="8009" address="${jboss.bind.address}" protocol="AJP/1.3"
| emptySessionPath="true" enableLookups="false" redirectPort="8443" />
|
| <Engine name="jboss.web" defaultHost="localhost" jvmRoute="node1">
|
|
and also at <JBOSS_HOME>\server\node1\deploy\jboss-web.deployer\META-INF\jboss-service.xml
I changed as
| <attribute name="UseJK">true</attribute>
|
Same as for node2 also.
Then I started apache first ,
next I started node1 with the following command
| run.bat -b 166.35.136.77 -c node1
|
Next I started node2 as same as above.
I tryed to run at brower by giving the URL as
http://166.35.136.77/Counter/index.jsp
it was throwing error.
| Not Found
|
| The requested URL /Counter was not found on this server
|
http://166.35.136.77:8009/Counter/index.jsp
throwing that the unable to connect
I checked in the mod_jk.log file ..It is saying that
|
| [Fri Oct 26 13:00:24 2007][1860:2896] [info] mod_jk.c (2277): Service error=0 for worker=loadbalancer
| [Fri Oct 26 13:00:30 2007][1860:2896] [info] jk_lb_worker.c (1167): Forcing recovery once for 2 workers
| [Fri Oct 26 13:00:31 2007][1860:2896] [info] jk_connect.c (473): connect to 166.35.136.77:8009 failed (errno=61)
| [Fri Oct 26 13:00:31 2007][1860:2896] [info] jk_ajp_common.c (891): Failed opening socket to (166.35.136.77:8009) (errno=61)
| [Fri Oct 26 13:00:31 2007][1860:2896] [info] jk_ajp_common.c (1311): (node1) error connecting to the backend server (errno=61)
| [Fri Oct 26 13:00:31 2007][1860:2896] [info] jk_ajp_common.c (2085): (node1) sending request to tomcat failed, recoverable operation attempt=1
| [Fri Oct 26 13:00:32 2007][1860:2896] [info] jk_connect.c (473): connect to 166.35.136.77:8009 failed (errno=61)
| [Fri Oct 26 13:00:32 2007][1860:2896] [info] jk_ajp_common.c (891): Failed opening socket to (166.35.136.77:8009) (errno=61)
| [Fri Oct 26 13:00:32 2007][1860:2896] [info] jk_ajp_common.c (1311): (node1) error connecting to the backend server (errno=61)
| [Fri Oct 26 13:00:32 2007][1860:2896] [info] jk_ajp_common.c (2085): (node1) sending request to tomcat failed, recoverable operation attempt=2
| [Fri Oct 26 13:00:32 2007][1860:2896] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
|
Can any body help me what went wrong.
Thanks!
VVK
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099505#4099505
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099505
18Â years, 6Â months
[JBoss Seam] - Re: selectItems - Is it possible?
by IGx89
How's this look?
@Name("org.jboss.seam.ui.ObjectConverter")
| @Scope(PAGE)
| @Install
| @Converter(forClass=Object.class)
| @BypassInterceptors
| public class ObjectConverter implements javax.faces.convert.Converter, Serializable {
|
| private Map<String, Object> objects;
|
| @Create
| public void create() {
| objects = new HashMap<String, Object>();
| }
|
| public String getAsString(FacesContext facesContext, UIComponent cmp, Object value) throws ConverterException {
| if(value == null)
| return null;
|
| for(Map.Entry<String,Object> entry: objects.entrySet())
| if(entry.getValue() == value)
| return entry.getKey();
|
| if(facesContext.getApplication().getStateManager().isSavingStateInClient(facesContext)
| && Seam.isEntityClass(value.getClass()))
| throw new ConverterException("ObjectConverter is unable to handle entity classes when client-side " +
| "state saving is enabled. Please use EntityConverter instead, or enable server-side state saving");
|
| String key = new UID().toString();
| objects.put(key, value);
|
| return key;
| }
|
| public Object getAsObject(FacesContext facesContext, UIComponent cmp, String key) throws ConverterException {
| if (key == null)
| return null;
|
| return objects.get(key);
| }
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099497#4099497
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099497
18Â years, 6Â months