Foren

User Monitoring / User status (Online / Offline)

kiesa viciius, geändert vor 11 Jahren.

User Monitoring / User status (Online / Offline)

Junior Member Beiträge: 28 Beitrittsdatum: 22.08.11 Neueste Beiträge
Hey ,

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


live.users.enabled=true
session.tracker.persistence.enabled=true
session.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
thumbnail
Florencia Hernández, geändert vor 11 Jahren.

RE: User Monitoring / User status (Online / Offline)

Regular Member Beiträge: 146 Beitrittsdatum: 27.03.12 Neueste Beiträge
I have the same problem, even loggin in with different machines.

Has anyone been able to make this work?
Joe D, geändert vor 11 Jahren.

RE: User Monitoring / User status (Online / Offline)

New Member Beiträge: 12 Beitrittsdatum: 19.04.12 Neueste Beiträge
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 [stdout] (ajp--10.218.103.201-8009-6) com.liferay.portal.kernel.events.ActionException: java.lang.NullPointerException
18:57:37,564 INFO [stdout] (ajp--10.218.103.201-8009-6) at com.liferay.portal.events.LoginPostAction.run(LoginPostAction.java:103)
Julien Ripault, geändert vor 11 Jahren.

RE: User Monitoring / User status (Online / Offline)

New Member Beiträge: 15 Beitrittsdatum: 19.03.12 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: User Monitoring / User status (Online / Offline)

New Member Beiträge: 12 Beitrittsdatum: 19.04.12 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: User Monitoring / User status (Online / Offline)

New Member Beiträge: 2 Beitrittsdatum: 24.08.12 Neueste Beiträge
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?
thumbnail
Luis Mas, geändert vor 11 Jahren.

RE: User Monitoring / User status (Online / Offline)

Regular Member Beiträge: 146 Beitrittsdatum: 18.05.09 Neueste Beiträge
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