Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
kiesa viciius
User Monitoring / User status (Online / Offline)
May 8, 2012 11:46 PM
Answer

kiesa viciius

Rank: Junior Member

Posts: 28

Join Date: August 22, 2011

Recent Posts

Hey ,

I have tried to enable the Liferay Monitoring tool to track current online users . I have enabled live users and some other stuff :

1
2live.users.enabled=true
3session.tracker.persistence.enabled=true
4session.tracker.friendly.paths.enabled=true


after that I have restarted the server and logged in with Bruno (Firefox) Richard (Chrome) and Test (Opera) , the Monitoring tool wasn't showing any users Online I only saw the message "There are no live sessions. " although I'm logged in with 3 users.

Is this because of the Bug : http://issues.liferay.com/browse/LPS-24822 or am I doing it wrong ?

I'm working with Liferay 6.1.0 CE-GA1
Florencia Gadea
RE: User Monitoring / User status (Online / Offline)
June 7, 2012 8:21 AM
Answer

Florencia Gadea

Rank: Regular Member

Posts: 146

Join Date: March 27, 2012

Recent Posts

I have the same problem, even loggin in with different machines.

Has anyone been able to make this work?
Joe D
RE: User Monitoring / User status (Online / Offline)
June 13, 2012 8:02 PM
Answer

Joe D

Rank: New Member

Posts: 12

Join Date: April 19, 2012

Recent Posts

Hi,

I got the same issue.

live.users.enabled=true
session.tracker.memory.enabled=true

I saw this error when the user login and fixed it but it does not help.

18:57:37,564 INFO (ajp--10.218.103.201-8009-6) com.liferay.portal.kernel.events.ActionException: java.lang.NullPointerException
18:57:37,564 INFO (ajp--10.218.103.201-8009-6) at com.liferay.portal.events.LoginPostAction.run(LoginPostAction.java:103)
Julien Ripault
RE: User Monitoring / User status (Online / Offline)
July 19, 2012 6:36 AM
Answer

Julien Ripault

Rank: New Member

Posts: 15

Join Date: March 19, 2012

Recent Posts

Hi,

got the same issue. I dig a bit in the Liferay code and I stumble upon that method :
getLocalClusterNode() in the CLusterExecutorUtil. The NPE comes from here where _clusterExecutor seems not to be instanciated.
I tried to go further but I found nothing

Any help will be appreciated

Thanks
Joe D
RE: User Monitoring / User status (Online / Offline)
July 23, 2012 1:59 PM
Answer

Joe D

Rank: New Member

Posts: 12

Join Date: April 19, 2012

Recent Posts

I hope this might help someone

There is a bug in LoginPostAction.java. You need to fix this in EXT plug in (or ext environment)


if (PropsValues.LIVE_USERS_ENABLED) {
JSONObject jsonObject = JSONFactoryUtil.createJSONObject();

String clusterNodeId = "0";

ClusterNode clusterNode = ClusterExecutorUtil.getLocalClusterNode();
if (clusterNode != null){
clusterNodeId = clusterNode.getClusterNodeId();
}

jsonObject.put("clusterNodeId", clusterNodeId);
jsonObject.put("command", "signIn");
jsonObject.put("companyId", companyId);
jsonObject.put("remoteAddr", request.getRemoteAddr());
jsonObject.put("remoteHost", request.getRemoteHost());
jsonObject.put("sessionId", session.getId());

String userAgent = request.getHeader(HttpHeaders.USER_AGENT);

jsonObject.put("userAgent", userAgent);

userId = PortalUtil.getUserId(request);

jsonObject.put("userId", userId);

MessageBusUtil.sendMessage(
DestinationNames.LIVE_USERS, jsonObject.toString());
}
Lazuardi Hilmil Muttaqien
RE: User Monitoring / User status (Online / Offline)
December 10, 2012 11:58 PM
Answer

Lazuardi Hilmil Muttaqien

Rank: New Member

Posts: 2

Join Date: August 23, 2012

Recent Posts

Dear Joe

I found 5 LoginPostAction.java when i search.

/opt/liferay-6.1.0-1/apache-tomcat/webapps/mail-portlet/WEB-INF/src/com/liferay/mail/hook/events/LoginPostAction.java
/opt/liferay-6.1.0-1/apache-tomcat/webapps/chat-portlet/WEB-INF/src/com/liferay/chat/hook/events/LoginPostAction.java
/opt/liferay-6.1.0-1/apache-tomcat/temp/9-chat-portlet/WEB-INF/src/com/liferay/chat/hook/events/LoginPostAction.java
/opt/liferay-6.1.0-1/apache-tomcat/temp/6-mail-portlet/WEB-INF/src/com/liferay/mail/hook/events/LoginPostAction.java
/opt/liferay-6.1.0-1/apache-tomcat/temp/8-chat-portlet/WEB-INF/src/com/liferay/chat/hook/events/LoginPostAction.java

Which should I update the script?
Luis Mas
RE: User Monitoring / User status (Online / Offline)
December 11, 2012 1:59 AM
Answer

Luis Mas

Rank: Regular Member

Posts: 146

Join Date: May 18, 2009

Recent Posts

None of them, you should look at source code: portal-impl\src\com\liferay\portal\events/LoginPostAction.java.

For that you should develop a Hook or Ext:
http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/overriding-a-portal-servi-4
http://www.liferay.com/es/community/forums/-/message_boards/message/14696867