hoangduit / openmeetings

Automatically exported from code.google.com/p/openmeetings
0 stars 0 forks source link

make GMail Server work with mail configuration [WAS:When sending an invitation i get a null pointer exception.] #572

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When sending an invitation i get a null pointer exception.
The postfix mailer runs correctly.

What I can do ?

Which version of OpenMeetings are you running?
1.5.2 R1593 red5 0.6.3-1 (downgraded from 0.7 since I saw a prb of null
pointer in 0.7) but this is always the same pb.

What's your operating system on client and server side?
server : Ubuntu 8.10 clinet ubuntu or windows, firefox
Is it a problem related to the client/usability or server-side?

Did you have any trace/debug output?
To get the debug output of the client run the software in debug-modus
Debug modus of the client:
http://$RED5-HOME:$RED5-HTTPPORT/xmlcrm/maindebug.lzx.lzr=swf8.swf

for example for your local copy:
http://localhost:5080/xmlcrm/maindebug.lzx.lzr=swf8.swf

or see live example:
http://inno02.fh-pforzheim.de:8080/xmlcrm/maindebug.lzx.lzr=swf8.swf

erreur 404...

Server side loging:
browser your Red5-Home directory. There's a log-file directory. On linux
boxes you can run red5 using:
nohup ./red5.sh &
and debug output will be written to nohup.out

please attach any debug output to get a patch on time

Original issue reported on code.google.com by jf.vib...@gmail.com on 17 Dec 2008 at 6:39

GoogleCodeExporter commented 9 years ago
I switch back to red5.0.7. No change...

Original comment by jf.vib...@gmail.com on 19 Dec 2008 at 11:25

GoogleCodeExporter commented 9 years ago
I checked Locally => no problem
I guess your EMail-Settings in the Configuration is invalid.

Original comment by seba.wag...@gmail.com on 22 Dec 2008 at 10:20

GoogleCodeExporter commented 9 years ago
Where I can found the EMail-Settings in the Configuration ? What is the file I 
have
to check ?

here attached is what I get in the debug file :

Original comment by jf.vib...@gmail.com on 22 Dec 2008 at 12:09

Attachments:

GoogleCodeExporter commented 9 years ago
I have to check in the openmeeting config files, where ?.
Or in the red5 (in what file ?) or postfix (it works to send regular mail from 
mail
command), or apache ?

Thank you for your attention and answer
JFV

Original comment by jf.vib...@gmail.com on 22 Dec 2008 at 12:13

GoogleCodeExporter commented 9 years ago
inside OpenMeetings:
Login as Administrator => goto the Administration => goto Configuration

Now there are several configuration_keys in the Config.
THe interesting values for the Mail-Settings are:
smtp_server
smtp_port
system_email_addr
email_username
email_password

You find some notes about each Key in the Comment field.
You only need to save these values in the configuration, then they are *LIVE*. 
No
need to restart the server or similar.

if you do no specify a email_username, the application tries a 
NON-Authenification
connection to the Mail-Server, if specified it tries to auth.

Original comment by seba.wag...@gmail.com on 22 Dec 2008 at 12:36

GoogleCodeExporter commented 9 years ago
All these parameters are entered and OK... but I have still the same message !

DEBUG 12-22 14:07:45.106  ? 851882721 ? org.openmeetings.app.remote.Application
[btpool0-39] - ##### setRoomValues : openm 122
DEBUG 12-22 14:07:45.106  ? 851882721 ? org.openmeetings.app.remote.Application
[btpool0-39] - #+#+#+#+##+## logicalRoomEnter ClientList key: 1 1
DEBUG 12-22 14:07:45.106  ? 851882721 ? org.openmeetings.app.remote.Application
[btpool0-39] - Room is empty so set this user to be moderation role
DEBUG 12-22 14:07:46.167  ? 851883782 ? org.openmeetings.app.remote.Application
[btpool0-39] - *..*getCurrentModerator id:
DEBUG 12-22 14:07:46.168  ? 851883783 ? org.openmeetings.app.remote.Application
[btpool0-39] - *..*unsetModerator ClientList key: 122
DEBUG 12-22 14:07:46.168  ? 851883783 ? org.openmeetings.app.remote.Application
[btpool0-39] - found client who is the Moderator:
org.openmeetings.app.conference.videobeans.RoomClient@15db3d0
DEBUG 12-22 14:07:46.168  ? 851883783 ? org.openmeetings.app.remote.Application
[btpool0-39] - Who is this
moderatororg.openmeetings.app.conference.videobeans.RoomClient@15db3d0
DEBUG 12-22 14:07:46.225  StreamService.java 851883840 700
org.openmeetings.app.remote.StreamService [btpool0-39] - cons Host: 
RTMPTConnection
from 134.157.220.19:39226 to 134.157.214.165 (in: 6153, out: 47880)
DEBUG 12-22 14:07:46.225  ChatService.java 851883840 161
org.openmeetings.app.remote.ChatService [btpool0-39] - GET CHATROOM: 1
DEBUG 12-22 14:07:47.083  WhiteBoardService.java 851884698 51
org.openmeetings.app.remote.WhiteBoardService [btpool0-39] - getRoomItems: 1
DEBUG 12-22 14:07:52.891  ? 851890506 ? org.openmeetings.app.remote.Application
[btpool0-39] - xmlcrm setUserObjectOneFour: openm
DEBUG 12-22 14:07:52.934  ? 851890549 ? org.openmeetings.app.remote.Application
[btpool0-39] - setUserObjectOneFour Found Client to RTMPTConnection from
134.157.220.19:39344 to 134.157.214.165 (in: 6372, out: 48035)
DEBUG 12-22 14:07:52.935  ? 851890550 ? org.openmeetings.app.remote.Application
[btpool0-39] - setUserObjectOneFour Found Client to Client: 122
DEBUG 12-22 14:07:52.936  ? 851890551 ? org.openmeetings.app.remote.Application
[btpool0-39] - sending setUserObjectNewOneFour to RTMPTConnection from
134.157.220.19:39344 to 134.157.214.165 (in: 6372, out: 48035)
DEBUG 12-22 14:07:53.106  ? 851890721 ? org.openmeetings.app.remote.Application
[btpool0-39] - Received result null for sendVarsToMessageWithClient
DEBUG 12-22 14:07:54.328  ? 851891943 ? org.openmeetings.app.remote.Application
[btpool0-39] - start streamPublishStart broadcast start: 29CONN RTMPTConnection 
from
134.157.220.19:39365 to 134.157.214.165 (in: 6482, out: 49507)
DEBUG 12-22 14:07:54.329  ? 851891944 ? org.openmeetings.app.remote.Application
[btpool0-39] - ### streamBroadcastStart Name: 
b0b33b2c-b82b-4006-bf6a-e512e0b72560
 INFO 12-22 14:07:54.642  VideoCodecFactory.java 851892257 78
org.red5.server.stream.VideoCodecFactory [btpool0-39] - Trying codec
org.red5.server.stream.codec.ScreenVideo@1c95903
DEBUG 12-22 14:08:23.718  InvitationService.java 851921333 49
org.openmeetings.app.remote.InvitationService [btpool0-40] - sendInvitationHash:
 INFO 12-22 14:08:23.719  InvitationService.java 851921334 57
org.openmeetings.app.remote.InvitationService [btpool0-40] - validFromHour: 14
 INFO 12-22 14:08:23.719  InvitationService.java 851921334 58
org.openmeetings.app.remote.InvitationService [btpool0-40] - validFromMinute: 8
 INFO 12-22 14:08:23.719  InvitationService.java 851921334 77
org.openmeetings.app.remote.InvitationService [btpool0-40] - validFromDate:
22.12.2008 14:08:00
 INFO 12-22 14:08:23.720  InvitationService.java 851921335 78
org.openmeetings.app.remote.InvitationService [btpool0-40] - validToDate: 
23.12.2008
01:00:00
ERROR 12-22 14:08:23.742  MailHandler.java 851921357 52
org.openmeetings.utils.mail.MailHandler [btpool0-40] - [sendMail]
java.lang.NullPointerException
      at org.openmeetings.utils.mail.MailHandler.sendMail(MailHandler.java:38)
      at
org.openmeetings.app.data.conference.Invitationmanagement.sendInvitionLink(Invit
ationmanagement.java:124)
      at
org.openmeetings.app.data.conference.Invitationmanagement.addInvitationLink(Invi
tationmanagement.java:100)
      at
org.openmeetings.app.remote.InvitationService.sendInvitationHash(InvitationServi
ce.java:83)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.red5.server.service.ServiceInvoker.invoke(ServiceInvoker.java:217)
      at org.red5.server.service.ServiceInvoker.invoke(ServiceInvoker.java:123)
      at org.red5.server.net.rtmp.RTMPHandler.invokeCall(RTMPHandler.java:163)
      at org.red5.server.net.rtmp.RTMPHandler.onInvoke(RTMPHandler.java:435)
      at
org.red5.server.net.rtmp.BaseRTMPHandler.messageReceived(BaseRTMPHandler.java:14
3)
      at org.red5.server.net.rtmpt.RTMPTHandler.messageReceived(RTMPTHandler.java:117)
      at org.red5.server.net.rtmpt.RTMPTServlet.handleSend(RTMPTServlet.java:387)
      at org.red5.server.net.rtmpt.RTMPTServlet.service(RTMPTServlet.java:471)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
      at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollecti
on.java:211)
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      at org.mortbay.jetty.Server.handle(Server.java:313)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
      at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
root@ticemed:/usr/lib/red5#

Original comment by jf.vib...@gmail.com on 22 Dec 2008 at 1:10

GoogleCodeExporter commented 9 years ago
you have a NUllPointer exception in this Line
String smtpServer = Configurationmanagement.getInstance().getConfKey(3,
"smtp_server").getConf_value();

=> that means you did either delete or duplicate the value of the config_key
*smtp_server*

Original comment by seba.wag...@gmail.com on 22 Dec 2008 at 1:21

GoogleCodeExporter commented 9 years ago
or you did not run the installer and the values in the configuration tables are
missing (or duplicated because you run the installer twice in the same 
database).

Original comment by seba.wag...@gmail.com on 22 Dec 2008 at 1:29

GoogleCodeExporter commented 9 years ago
This was effectively the smtp_server absent.
I recreated it... it still not working, but with another message :

ErrorJavqLang.SecurityException: Access to default session denied.

 INFO 12-22 14:52:36.071  VideoCodecFactory.java 854573686 78
org.red5.server.stream.VideoCodecFactory [pool-3-thread-15] - Trying codec
org.red5.server.stream.codec.ScreenVideo@1514933
DEBUG 12-22 14:52:58.854  InvitationService.java 854596469 49
org.openmeetings.app.remote.InvitationService [pool-3-thread-14] - 
sendInvitationHash:
 INFO 12-22 14:52:58.855  InvitationService.java 854596470 57
org.openmeetings.app.remote.InvitationService [pool-3-thread-14] - 
validFromHour: 14
 INFO 12-22 14:52:58.855  InvitationService.java 854596470 58
org.openmeetings.app.remote.InvitationService [pool-3-thread-14] - 
validFromMinute: 53
 INFO 12-22 14:52:58.855  InvitationService.java 854596470 77
org.openmeetings.app.remote.InvitationService [pool-3-thread-14] - 
validFromDate:
22.12.2008 14:53:00
 INFO 12-22 14:52:58.855  InvitationService.java 854596470 78
org.openmeetings.app.remote.InvitationService [pool-3-thread-14] - validToDate:
23.12.2008 01:00:00
DEBUG 12-22 14:52:58.887  MailHandler.java 854596502 134
org.openmeetings.utils.mail.MailHandler [pool-3-thread-14] - Message sending in 
progress
ERROR 12-22 14:52:58.887  MailHandler.java 854596502 184
org.openmeetings.utils.mail.MailHandler [pool-3-thread-14] - [mail send]
java.lang.SecurityException: Access to default session denied
      at javax.mail.Session.getDefaultInstance(Session.java:311)
      at org.openmeetings.utils.mail.MailHandler.send(MailHandler.java:148)
      at org.openmeetings.utils.mail.MailHandler.sendMail(MailHandler.java:50)
      at
org.openmeetings.app.data.conference.Invitationmanagement.sendInvitionLink(Invit
ationmanagement.java:124)
      at
org.openmeetings.app.data.conference.Invitationmanagement.addInvitationLink(Invi
tationmanagement.java:100)
      at
org.openmeetings.app.remote.InvitationService.sendInvitationHash(InvitationServi
ce.java:83)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.red5.server.service.ServiceInvoker.invoke(ServiceInvoker.java:217)
      at org.red5.server.service.ServiceInvoker.invoke(ServiceInvoker.java:123)
      at org.red5.server.net.rtmp.RTMPHandler.invokeCall(RTMPHandler.java:163)
      at org.red5.server.net.rtmp.RTMPHandler.onInvoke(RTMPHandler.java:435)
      at
org.red5.server.net.rtmp.BaseRTMPHandler.messageReceived(BaseRTMPHandler.java:14
3)
      at
org.red5.server.net.rtmp.RTMPMinaIoHandler.messageReceived(RTMPMinaIoHandler.jav
a:120)
      at
org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(
AbstractIoFilterChain.java:570)
      at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Abs
tractIoFilterChain.java:299)
      at
org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilte
rChain.java:53)
      at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived
(AbstractIoFilterChain.java:648)
      at
org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:
220)
      at
org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Executo
rFilter.java:264)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:636)
root@ticemed:/usr/lib/red5#

Original comment by jf.vib...@gmail.com on 22 Dec 2008 at 2:00

GoogleCodeExporter commented 9 years ago
this is a problem with your mail-server and maybe also with the way that server
accepts mails,
see for example:
http://forums.sun.com/thread.jspa?threadID=668779

Original comment by seba.wag...@gmail.com on 22 Dec 2008 at 4:37

GoogleCodeExporter commented 9 years ago
I am sorry, but I tried several smtp servers (among them smtp.gmail.com) but I 
get
always the same message : java.lang.SecurityException: Access to default 
session denied

while both user name an pasword on the corresponding smtp servers are correct. 
Or I
did not understand what is "System auth email username" and "System auth email
password". For me it is the name I am registered for exemple in gmail (and the
corresponding password). May be I am wrong.

Thak you for answering 

Original comment by jf.vib...@gmail.com on 23 Dec 2008 at 10:28

GoogleCodeExporter commented 9 years ago
no thats right, but if you read through that:
http://forums.sun.com/thread.jspa?threadID=668779
=> gmail somehow is different from normal Mail Servers ...

You can rename this Issue in *make GMail Server work with mail configuration 
and I
will add a patch to the SVN that will enable / use that code from the example. 
But
out of the box you have to use a somehow *normal* smtp-server to process your 
mails.

Original comment by seba.wag...@gmail.com on 23 Dec 2008 at 10:34

GoogleCodeExporter commented 9 years ago
Thank you for your answer.

I on't know how to rename this Issue in *make GMail Server work with mail 
configuration*

I still try to make my normal smtp server working, but I have still the same 
message :
java.lang.SecurityException: Access to default session denied

Original comment by jf.vib...@gmail.com on 24 Dec 2008 at 12:29

GoogleCodeExporter commented 9 years ago
Renamed Issue.

Original comment by seba.wag...@gmail.com on 24 Dec 2008 at 12:32

GoogleCodeExporter commented 9 years ago
Still no answer to the question.  What configuration file holds the smtp 
settings? 
It appears you cannot get into openmeetings without the values being set?  And 
you
can't set them if you cannot get into openmeetings?

Original comment by tpat...@gmail.com on 10 Jun 2009 at 3:56

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
AFAIK, adding the following line to the MailHandler.java solves GMail security 
problem:

>   props.put("mail.smtp.starttls.enable","true");

Maybe this should be propagated to the configuration along with the default 
usage of
GMail SMTP.

Original comment by alexei.f...@gmail.com on 10 Jun 2009 at 4:57

GoogleCodeExporter commented 9 years ago
Alexei,

Could you recommend where (which line) in MailHandler.java to include this line?

Many thanks,

Cleiber

Original comment by Clb...@gmail.com on 27 Dec 2009 at 8:02

GoogleCodeExporter commented 9 years ago
The problem was rsolved a long time ago.
In fact the mail server entry was lacking from the configuration table in the 
mysql 
database (I don't know why...). the smtp_port key in conf_key entry must be 
present.

Hope this helps.

JFV 

Original comment by jf.vib...@gmail.com on 2 Jan 2010 at 3:08

GoogleCodeExporter commented 9 years ago
seems to work as expected

Original comment by solomax...@gmail.com on 9 Dec 2011 at 12:33