Introduced
Memcached-session-manager is the session in Tomcat, hosted into the Memcache management, to achieve the stateless application of Tomcat.
But in the author's experience, we generally do not use this technique when developing. Instead, you use the session in an existing project and quickly upgrade to a state
implementing your own Tomcat Session Manager (Java) with Redis
Recently the business expanded to several Tomcat, the front end using the Nginx,rewrite rule set to Ip_hash, but so if there is a tomcat hung, then the user will be landing again, could have endured, but this is always a problem, So I decided to implement a session
This is a creation in
Article, where the information may have evolved or changed.
Managersessionthe processing request is through _Dispatcher_Session_Handler this function ( ./api/dispatcher.pb.go ):
func _Dispatcher_Session_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(SessionRequest) if err := stream.RecvMsg(m); err != nil { return err } return srv.(DispatcherServer).Session(m, dispatcherSessionServer{stream}
1. Build the Environment192.168.29.128 (luxh-01.com) installation Nginx, reference http://www.cnblogs.com/luxh/p/4067038.html192.168.29.129 (luxh-02.com) installs Tomcat and memcached192.168.29.130 (luxh-03.com) installs Tomcat and memcached2, installation memcached1) install directly with Yum[Email protected]yuminstall memcached2) Start memcached, the default boot port is 11211[Email protected] ~]# memcached-u memcached-U Specify user3) test whether the start is successful[Email protected]127.0
The original in this, is not a faithful translation, is to follow their own understanding of the recordThe first step is to download the required jar packageDownload Memcached-session-manager-x.y.z.jar, Memcached-session-manager-tc6-x.y.z.jar. Download the catalog. If it's tomcat7, use TC7.Download Spymemcached-x.y.z.j
")) { $strDirName =$_session["Currdir"]; $strDirName =rtrim ($strDirName, "/"); $listDir =explode ("/", $strDirName); $nBackLength = strlen (End ($listDir)); $strDirName =substr ($strDirName, 0,0-$ Nbacklength); if ($strDirName == ") $strDirName ="/home "; } else $strDirName = "/Home"; BreakThe last-level directory name is obtained by parsing the string and is limited to/home.In addition, the front end can be implemented by jquery to preload the first folder content when the Web page ope
After su to root was used, the command gedit found an error: ** (gedit: 2976): WARNING **: the connection is closed (gedit: 2976 ): eggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported ** (gedit: 2976): WARNING **: cocould not connect to session bus www.2cto.com: su can only switch to the a
After Su to root was used just now, an error occurred when running the command gedit:
(Gedit: 7932): eggsmclient-warning **: failed to connect to the Session Manager: none of the authentication protocols specified are supported
**Glib-gio: Error: gdbusconnection. C: 2270: initable_init: assertion failed: (connection-> initialization_error = NULL)
Abandoned (core dumped)
The reason is:
Su Can only switc
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.