Page 1 of 1

problem with sending mail

Posted: 28 Nov 2006, 12:01
by Billyboy
I try to send mail by _server.sendMail function.

I set these properties in config.xml :

<Mailer>
<MailHost>server_ip</MailHost>
<MailUser>local_user</MailUser>
<MailPass></MailPass>
</Mailer>

where server_ip is the same as SFS ip, local_user was set to
a local user name or complete e-mail address, pass is empty
as sendmail does no validation. The server runs RedHat Linux and sendmail as
smtp server. Version of SFS is 1.4.0 and try at 1.4.2.

The same code works when I test it on my desktop and send mail
thru smtp on another local pc.

Whow do I configure SFS config.xml for sending mails?

jvm 1 | Exception in thread "ExtensionHandler-1" java.lang.NoClassDefFoundError: javax /activation/DataSource
jvm 1 | at it.gotoandplay.smartfoxserver.lib.MailManager.sendMail(MailManager.jav a:78)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
jvm 1 | at java.lang.reflect.Method.invoke(Unknown Source)
jvm 1 | at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:142)
jvm 1 | at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:201 )
jvm 1 | at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:84)
jvm 1 | at org.mozilla.javascript.gen.c1._c40(DExt.as:724)
jvm 1 | at org.mozilla.javascript.gen.c1.call(DExt.as)
jvm 1 | at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:84)
jvm 1 | at org.mozilla.javascript.gen.c1._c65(DExt.as:1407)
jvm 1 | at org.mozilla.javascript.gen.c1._c55(DExt.as:1161)
jvm 1 | at org.mozilla.javascript.gen.c1._c41(DExt.as:736)
jvm 1 | at org.mozilla.javascript.gen.c1.call(DExt.as)
jvm 1 | at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:33 7)
jvm 1 | at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755 )
jvm 1 | at org.mozilla.javascript.gen.c1.call(DExt.as)
jvm 1 | at it.gotoandplay.smartfoxserver.extensions.JavascriptExtension.callJavaS criptFunction(JavascriptExtension.java:424)
jvm 1 | at it.gotoandplay.smartfoxserver.extensions.JavascriptExtension.handleReq uest(JavascriptExtension.java:209)
jvm 1 | at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.processEven t(ExtensionHandler.java:511)
jvm 1 | at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.run(Extensi onHandler.java:357)
jvm 1 | at java.lang.Thread.run(Unknown Source)

By the way, when SFS is run by 'sfs start', no errors appear in log. I have to
run it in foregroung with 'sfs console' to see any debug info.

Posted: 28 Nov 2006, 16:16
by Lapo
there seem to be a wrong reference in the classpath in the wrapper.conf file.

Open it from the runAsService/conf folder and look for the following line:

Code: Select all

wrapper.java.classpath.10=__INSTALL_PATH__/Server/lib/javamail/activation.jar
change the

Code: Select all

Server/lib/javamail/activation.jar
to

Code: Select all

Server/lib/activation.jar
save and stop/start the server.

Hope it helps

Posted: 29 Nov 2006, 08:43
by Billyboy
Lapo wrote:there seem to be a wrong reference in the classpath in the wrapper.conf file.

Open it from the runAsService/conf folder and look for the following line:

Code: Select all

wrapper.java.classpath.10=__INSTALL_PATH__/Server/lib/javamail/activation.jar
change the

Code: Select all

Server/lib/javamail/activation.jar
to

Code: Select all

Server/lib/activation.jar
save and stop/start the server.

Hope it helps
All ok! thank you very much :)

So how about log files?

Posted: 29 Nov 2006, 09:02
by Lapo
from what you have written it seems you're running the server under linux. Is this correct? If so you can find the logs in the runAsService/wrapper.log file

Posted: 01 Dec 2006, 12:41
by Billyboy
Lapo wrote:from what you have written it seems you're running the server under linux. Is this correct? If so you can find the logs in the runAsService/wrapper.log file
I find in this file just one line for week sfs working!!! May be problem in config?

<FileLoggingLevel>CONFIG</FileLoggingLevel>
<ConsoleLoggingLevel>INFO</ConsoleLoggingLevel>

Posted: 01 Dec 2006, 15:04
by Lapo
Try this:

1. change your settings to:

Code: Select all

 <FileLoggingLevel>FINE</FileLoggingLevel>
<ConsoleLoggingLevel>FINE</ConsoleLoggingLevel>
2. stop the server
3. delete the wrapper.log file
4. start the server

check your wrapper.log file after the server started, you should see a long list of messages, including server version, system info, zone setup etc...

Posted: 05 Dec 2006, 10:43
by Billyboy
Lapo wrote:Try this:

1. change your settings to:

Code: Select all

 <FileLoggingLevel>FINE</FileLoggingLevel>
<ConsoleLoggingLevel>FINE</ConsoleLoggingLevel>
2. stop the server
3. delete the wrapper.log file
4. start the server

check your wrapper.log file after the server started, you should see a long list of messages, including server version, system info, zone setup etc...

there are two wrapper.log files

./Server/logs/wrapper.log
./Server/runAsService/wrapper.log

the one in log/ is never written to
will it break anything if we symlink it to the other one?

Posted: 06 Dec 2006, 17:02
by Lapo
As I mentioned above the file is -> runAsService/wrapper.log
will it break anything if we symlink it to the other one?
I don't think so, but I am not 100% sure :)

Posted: 15 Dec 2006, 08:24
by Billyboy
One more question about sfs and linux: does sfs have possibility of launching after reboot of computer? We can create launch script, but maybe there is some algorithm? Should sfs start by root priveleges or not?

Posted: 15 Dec 2006, 09:14
by Lapo
Yes,
check chapter 1.3 of our documentation --> http://www.smartfoxserver.com/docs/
under the Linux installation