"Steve Brewin" <[email protected]> ha scritto nel messaggio news:[email protected]... > news [mailto:[email protected]] On Behalf Of ally wrote on: 11 May 2009 > 23:53 > > My responses below. > > Cheers > -- Steve > >> "Steve Brewin" <[email protected]> ha scritto nel messaggio >> news:[email protected]... >> > The logged >>java.lang.OutOfMemoryError: Java heap space<< >> exception is >> > saying that there isn't enough heap space allocated. >> > >> > While some might question if email is the correct medium to >> transfer 30MB >> > of >> > files, if you want to do so you need to increase your >> heapsize from the >> > default. >> >> >> Well, I can instead use an USB disk and my feet :), mail is >> an asynchronous >> method of information exchange I use on my LAN not internet. >> This is not a >> duty, it is a convenience for Windows users with zero cygwin >> sshd knowledge >> and with netbios disabled, I am the unique user with ssh execution >> permission (and knowledge), but zero java knowledge and few >> unix knowledge. > > There are many ways to crack this problem, though I guess if it is felt > neccesary to disable netbios, perhaps for security reasons, most of them > would also fall at this hurdle? But then both the feet solution and the > email solution are equal, or greater security risks. Or maybe you are > dealing with latency and/or bandwidth issues? The feet solution has much > greater latency.
Yes, for security reasons and to avoid LAN WAN traffic but HTTP, SMTP and FTP. The difference from feet and email is that if user A want to send a file to user B but user B is out and his/her machine is off, user A send an email to user B, or user A make a copy of the file on a USB disk (or a CD) and leave it on the user B desk (feet). If you know a better solution I adopt it for the future, the most important thing is that each Windows client machine must have only one user account and there is no DNS server (hosts files). Often, there are external users that come with own laptop and connect on my LAN, I create an intranet mail account (or use an existing one as dummy) and give it to them to exchange files. Anyways this is not per se a matter. >> >> > The invocation of the Java which launches James should specify >> > an -mx???m argument where ??? is the number of megabytes to >> allocate. >> >> > If you are using the standard run.bat/run.sh scripts, then >> the environment >> > variable PHOENIX_JVM_OPTS can be used to specify this. >> >> > Experimentation is required to find the exact value that >> suits your needs, >> > environment and workload. >> > >> > Use the SizeIsGreaterThan matcher - >> > >> http://james.apache.org/mailet/standard/mailet-report.html#Siz >> eGreaterThan >> > - >> > to keep a cap on things. >> >> >> I not found a good method to start James at system start-up. FreeBSD >> services start-up method use the /etc/rc.d and /usr/local/etc/rc.d >> directories to run services, but James fail to start. It run >> by hand if I >> type in console >> >> #/usr/local/etc/rc.d/james start >> >> This is a mistery, one year ago I succesfully set-up the >> system (FreeBSD >> 7.0) to run James at start-up but I do not remember how and >> cannot reproduce >> that situation, also after subsequent intstallation of >> FreeBSD 7.0 and >> finally 7.1 I failed to reproduce that functionality. If I >> remember, the env >> var JAVA_HOME must be defined, I created a >> /usr/local/etc/rc.d/java shell >> executable file with only the env var definition, but no more >> work. Not a >> matter I run it by hand till I live. > > Well, as you said earlier, you have "zero java knowledge and few unix > knowledge". If you post a message to this list asking how to start James > on > boot up in un*x like systems, I'm sure you will get help on how to invoke > James' run.sh from a runlevel. We don't have anything recorded for > FreeBSD; > maybe you can adapt the Linux instructions from the wiki - > http://wiki.apache.org/james/RunAsService? >> >> The James port installation create a shell executabe file in >> the rc.d called >> 'james', in it there are these lines as a header comment: >> >> # >> # Configuration settings for geronimo%%GERONIMO_VERSION%% in >> /etc/rc.conf: >> # >> # james231_enable (bool): >> # Set to "NO" by default. >> # Set it to "YES" to enable james231 >> # >> # >> # james231_home (str) >> # Set to "/usr/local/james2.3.1" by default. >> # Set the JAMES_HOME variable for the James process >> # >> # james231_base (str) >> # Set to "/usr/local/james2.3.1" by default. >> # Set the JAMES_BASE variable for the James process >> # >> # james231_tmpdir (str) >> # Set to "/tmp" by default. >> # >> # geronimo%%GERONIMO_VERSION%%_stop_timeout (num) >> # Set to "10" by default. >> # Sets the timeout in seconds to allow geronimo to shutdown. >> # After the timeout has elapsed, geronimo will be killed. >> # >> # james231_java_home (str): >> # james231_java_vendor (str): >> # james231_java_version (str): >> # james231_java_os (str): >> # Specify the requirements of the Java VM to use. See javavm(1). >> # >> # james231_classpath (str): >> # Set to "" by default. >> # Addtional classes to add to the CLASSPATH >> # >> # james231_java_opts (str): >> # Set to "" by default. >> # Java VM args to use. >> # >> >> >> these options may be inserted in /etc/rc.conf, the FreeBSD >> start-up options >> file. My settings are: >> >> >> # Apache James server ------------------ >> james231_enable="YES" >> james231_java_home="/usr/local/diablo-jdk1.6.0" >> #james231_classpath="/usr/local/diablo-jdk1.6.0/jre/lib" >> sendmail_enable="NO" >> sendmail_submit_enable="NO" >> sendmail_outbound_enable="NO" >> sendmail_msp_queue_enable="NO" >> >> >> at first sight I added the line >> >> james231_java_opts=" -mx64m" >> >> to increase java heap size as you suggested, but it do not work > > This is an Apache Geronimo script, which unless you are trying to embed > James in the Geronimo JEE server, is only going to complicate matters. And > embedding is a complicated matter in itself, best avoided unless there is > a > compelling need. You are best to get James running as you wish in > standalone > mode before such an adventure. This is what the James package porter made to run it on FreeBSD, the script is created when you type # cd /.../james # make install ; make clean The first time I ran James was on Windows machine to test it, I read the wiki about quick start, in partcular the page which help me was http://wiki.apache.org/james/JamesQuickstart and a windows service that run "C:\...\James-2.3.1\bin\wrapper.exe" -s "C:\...\James-2.3.1\conf\wrapper.conf" It works fine, actually I still have james installed on my Windows machine but disabled. You can think 'ally is a stupid windows user', yes you are right, this is the reason why I said 'zero java and few unix knowledge', I love FreeBSD and use it from about 2 years, it is a good OS, but I have no much time to spend on it. What I know, less or more, is what is written on the FreeBSD handbook. I think my problem with James is due to java installation/configuration on FreeBSD. In the same way, to install it I executed 'make install ; make clean' in the ports directory, after downloading by hand the distribution package from Sun (license reasons) in the dist directory. There is no startup shell files nor instructions to set JAVA_HOME and CLASSPATH env var, initially I set these variables in /etc/csh.login, ~/.login, in /rc.d/java but things not change, yes if I log in and type setenv the vars are defined, but I do not know if during boot/startup. Another important thing is that I have recompiled the kernel, only some changes to set graphic screen to increase the row/col in console mode to use local shell on server, and to exclude some modules for drivers, firmware that use devices I do not have. > > In any event, -mx64m is a very low memory maximum memory limit. A single > 30MB message is going to consume almost half of this, so you are asking > James core to run in 34MB, which it can't! Try -mx256m and see how you get > on. >> >> The system is a PII (or PIII I do not remember) 460MHz 512MB RAM > > Antique anyway. With 512MB of RAM and a slooow processor don't expect to > run > much more than FreeBSD and James if you want to process 30MB messages! > Yes, it's an ancient machine but this is what I have, with web, db, mail, ssh servers and mc, no other needs. It works fine with about 15 intranet clients (e-mail and web) and 5-10 internet external web users (it is not a space shuttle, but works, with patience), the mail server, James, only serve the web mail (not webmail, the mails associated with internet website) and the intranet mail, but the internet mail traffic is most incoming, local clients use their own mail address and internet ISP mx server not James, each user has its own mail address at gmail, yahoo, or whatsoever and a intranet mail address to exchange files with other clients on LAN, with these addresses cannot send a mail outside intranet, James block it, I hope, no, really, it works :) >> > Cheers >> > --Steve >> >> >> many thanks for your help, I work on to try a diffrent >> solution and come >> back with a feedback if any or not >> >> c ya >> >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> Finally, I set '-mx256m' but do not solved the problem. I sent 3 files of 10MB each (w/o mx parameter) in same mail and works, only do not work with 1 file of 30MB. I do not know if the mx parameter is really used set where FreeBSD port documentation say, but if I run 'top' with mx256m I see 277MB free, with no mx parameter 316MB free (tested twice). To test this I closed access to internet and intranet clients but me (send mail from me1 to me2, on same machine). In future I can try to download the original James package from apache website, compile it and istall as described in the page you provided, but for me this is a very big work and most probably I must close WAN/LAN access for days (from test to test), now I cannot do that, 2nd I prefer to use FreeBSD automatism to install port to avoid to remember all the actions I made to compile, install and setup James by hand, yes, I am a dirty windows user, don't blame me :) Many thanks for your time to help me solving this issue, that is not an usal case, many times the attachments are few MB or can be subdivided in n separate zip files. James is a very good mail server and not so hard to setup. Probably java is not well configured on my system or the port for that os have some bugs or inefficience. Thanks one more time, bye --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
