Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
kiesa viciius
User Monitoring / User status (Online / Offline)
8. Mai 2012 23:46
Antwort

kiesa viciius

Rang: Junior Member

Nachrichten: 28

Eintrittsdatum: 22. August 2011

Neue 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 :

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)
7. Juni 2012 08:21
Antwort

Florencia Gadea

Rang: Regular Member

Nachrichten: 146

Eintrittsdatum: 27. März 2012

Neue Beiträge

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)
13. Juni 2012 20:02
Antwort

Joe D

Rang: New Member

Nachrichten: 12

Eintrittsdatum: 19. April 2012

Neue 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 (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)
19. Juli 2012 06:36
Antwort

Julien Ripault

Rang: New Member

Nachrichten: 15

Eintrittsdatum: 19. März 2012

Neue 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
RE: User Monitoring / User status (Online / Offline)
23. Juli 2012 13:59
Antwort

Joe D

Rang: New Member

Nachrichten: 12

Eintrittsdatum: 19. April 2012

Neue 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
RE: User Monitoring / User status (Online / Offline)
10. Dezember 2012 23:58
Antwort

Lazuardi Hilmil Muttaqien

Rang: New Member

Nachrichten: 2

Eintrittsdatum: 23. August 2012

Neue 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?
Luis Mas
RE: User Monitoring / User status (Online / Offline)
11. Dezember 2012 01:59
Antwort

Luis Mas

Rang: Regular Member

Nachrichten: 146

Eintrittsdatum: 18. Mai 2009

Neue 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