|
Instructions
Instructions for compiling and running the EtherPad open source release
Welcome to open sourced EtherPad! This file contains instructions for compiling and running the etherpad open source release. The steps have been tested on MacOS X and Linux. Windows users will probably want to grab Cygwin. Requirements
EnvironmentVarious scripts make assumptions about environment variables:
For example, this sets up the environment on my machine: export JAVA_HOME="/usr/local/java/jdk1.6.0_10" export SCALA_HOME="/usr/local/scala/scala-2.7.4.final" export JAVA="$JAVA_HOME/bin/java" export SCALA="$SCALA_HOME/bin/scala" export PATH="$JAVA_HOME/bin:$SCALA_HOME/bin:/usr/local/mysql/bin:$PATH" export MYSQL_CONNECTOR_JAR="/Aaron/lib/mysql-connector-java-5.1.10-bin.jar" Database SetupThe scripts assume mysqld is running on localhost. Once mysqld is running, you can set up the etherpad database by running the following command inside ajcode/etherpad/. $ sudo bin/setup-mysql-db.sh This will create a database called "etherpad" with the password "password", and grant privileges to the user "etherpad". All the tables will be set up the first time etherpad is run. CompilingEtherPad compiles all its Java and Scala libraries into a single JAR. To build this jar, you can run the following command inside ajcode/etherpad/. $ bin/rebuildjar.sh If you modify anything in ajcode/infrastructure, you will most likely need to kill the server, rebuild the jar, and re-launch the server before your change takes effect. Code inside ajcode/etherpad/src can be modified while the server is running, and the changes will automatically get picked up. RunningTo run the etherpad web server, execute the following command inside ajcode/etherpad/. $ bin/run-local.sh The first time you run this, it should print out lots of messages about database migrations and finally print: HTTP server listening on http://localhost:9000/ At this point, you should be able to visit http://localhost:9000/ in your web browser and create a new pad. SupportPlease use this google group to ask questions about the code. You may also want to consult the KnownIssues. |
There are some minor spelling errors in the mysql shell script ("privilige" ln 27, "etherpad etherpad" ln 24).
Thanks for the straight forward and simple directions. I got my server up and running in about 10 minutes.
got this going on mac os x no problems. to get this going on external domain other than localhost you need to edit the globals.js as detailed here.
http://groups.google.com/group/etherpad-open-source-discuss/browse_thread/thread/aad77dd4c875402d
Works for me!
gonna give that a try
FYI:
If you're trying to get this running on a server with subdomains (foo.bar.example.com), you need to add your domain to the SUPERDOMAINS map in src/etherpad/globals.js
It Works!!
Got an error trying to install on Ubuntu Server 9.04:
building javascript classfiles... org.mozilla.javascript.EvaluatorException?: syntax error (cache_utils.js#17)
rebuildjar.sh failed:
you can do bash -x bin/rebuildjar.sh to see where it pukes. you most likely dont have SCALA_HOME set right.
I was able to get it working. I'm hosting it here: www.ietherpad.com
Cheers.
Any hint to get etherpad working with Ubuntu 8.04 or Debian 5? Same problem that practical.coder described ^^
Checked out, configured, built and tweaked global.js (SUPERDOMAINS) to allow sharing with friends in less than 30 minutes (OSX 10.6 + MacPorts?). Will digg deeper into the software in the next weeks, in the meantime thanks to the Etherpad team (and to Google) for open-sourcing the code. :-)
lkravovicz, thanks for the tip. kitesurfer1404 & practical.coder, that specific error you get when mysql-connector-java-5.1.10-bin.jar cannot be found, which means MYSQL_CONNECTOR_JAR is not set right, so it tries to execute something like cp lib/ which stops the compilation instead of cp mysql-connector-java-5.1.10-bin.jar lib/ Also for Ubuntu you can install scala with sudo apt-get install scala
Okay, switching to sun-java7-jdk, instead of openjdk, fixed part of my build problem. However, installing Scala from the Ubuntu repos puts the jars in /usr/share/java, but the script looks for them in $SCALA_HOME/lib/, so no value of SCALA_HOME will work, so I had to make the following change:
diff -r 81287c8af1ac trunk/infrastructure/bin/makejar.sh --- a/trunk/infrastructure/bin/makejar.sh Fri Dec 18 18:44:23 2009 +1100 +++ b/trunk/infrastructure/bin/makejar.sh Sat Dec 19 09:15:35 2009 -0500 @@ -32,11 +32,11 @@ TMPSTORE=/tmp/ajbuild-tmpstore-`date +%s` -JARFILES=`echo $SCALA_HOME/lib/scala-library.jar lib/*.jar lib/manifest` +JARFILES=`echo $SCALA_HOME/scala-library.jar lib/*.jar lib/manifest` function genjar { echo "unzipping JARs..." pushd $1 >> /dev/null - $JAR xf $SCALA_HOME/lib/scala-library.jar + $JAR xf $SCALA_HOME/scala-library.jar rm -rf META-INF for a in ../../lib/*.jar; do $JAR xf $aON Ubuntu, I installed libmysql-java, so for the MYSQL_CONNECTOR_JAR I put
This fixes the problem practical.coder had for me.
Well, worked good for me with manual downloading of scala and mysql-connector and the setting the SCALA and MYSQL... variables to the right paths. But now I have this problem while building:
I wish there was an easier way of installing this in a Wordpress-like fashion, i.e. with a form you just need to enter your MySQL data into, and the rest installing more or less without further steps... is there any chance of getting/setting up such a package? I'm particularly stuck with getting the Scala and environment variables requirements right on my (non-self-hosted!) environment...
I am getting the same error as @kitesurfer1404
/var/www/northisup/etherpad/trunk/infrastructure jar using JAR jar... lib/mysql-connector-java.jar has changed, rebuilding JAR unzipping JARs... making cached JAR.... compiling... compiling with 'fsc'... compiling common... Note: net.appjet.common/util/HttpServletRequestFactory.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: net.appjet.common/util/HttpServletRequestFactory.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. /var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:24 error: identifier expected but '_' found. var cls: Class[_] = obj.getClass; ^ /var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:24 error: ']' expected but ';' found. var cls: Class[_] = obj.getClass; ^ /var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:28 error: 'val' expected but identifier found. for(i <- 0 until Array.getLength(obj)) { ^ /var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:31 error: illegal start of simple pattern } ^ /var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:30 error: '<-' expected but '}' found. } ^ /var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:34 error: 'val' expected but identifier found. for (f <- cls.getDeclaredFields) { ^ /var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:43 error: illegal start of simple pattern } ^ /var/www/northisup/etherpad/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala:42 error: '<-' expected but '}' found. cls = cls.getSuperclass; ^ 8 errors found bin/rebuildjar.sh finishedHad to do this to get it working behind an Apache mod_proxy on port 80:
javy-labs trunk # nano etherpad/etc/etherpad.localdev-default.properties javy-labs trunk # javy-labs trunk # hg diff diff -r 81287c8af1ac trunk/etherpad/etc/etherpad.localdev-default.properties --- a/trunk/etherpad/etc/etherpad.localdev-default.properties Fri Dec 18 18:44:23 2009 +1100 +++ b/trunk/etherpad/etc/etherpad.localdev-default.properties Sun Dec 20 00:47:16 2009 +0200 @@ -5,10 +5,10 @@ etherpad.fakeProduction = false etherpad.isProduction = false etherpad.SQL_JDBC_DRIVER = com.mysql.jdbc.Driver -etherpad.SQL_JDBC_URL = jdbc:mysql://localhost:3306/etherpad +etherpad.SQL_JDBC_URL = jdbc:mysql://localhost:3307/etherpad etherpad.SQL_PASSWORD = password etherpad.SQL_USERNAME = etherpad -listen = 9000 +listen = pad.vytautas.jakutis.lt:9000 logDir = ./data/logs modulePath = ./src transportPrefix = /comet diff -r 81287c8af1ac trunk/etherpad/src/etherpad/globals.js --- a/trunk/etherpad/src/etherpad/globals.js Fri Dec 18 18:44:23 2009 +1100 +++ b/trunk/etherpad/src/etherpad/globals.js Sun Dec 20 00:47:16 2009 +0200 @@ -29,7 +29,7 @@ var SUPERDOMAINS = { 'localbox.info': true, 'localhost': true, - 'etherpad.com': true + 'pad.vytautas.jakutis.lt': true }; var PNE_RELEASE_VERSION = "1.1.3"; diff -r 81287c8af1ac trunk/etherpad/src/etherpad/helpers.js --- a/trunk/etherpad/src/etherpad/helpers.js Fri Dec 18 18:44:23 2009 +1100 +++ b/trunk/etherpad/src/etherpad/helpers.js Sun Dec 20 00:47:16 2009 +0200 @@ -146,7 +146,7 @@ } function baseHref() { - return request.scheme + "://"+ request.host + "/"; + return request.scheme + "://pad.vytautas.jakutis.lt/"; } function headExtra() { diff -r 81287c8af1ac trunk/etherpad/src/etherpad/pro/pro_utils.js --- a/trunk/etherpad/src/etherpad/pro/pro_utils.js Fri Dec 18 18:44:23 2009 +1100 +++ b/trunk/etherpad/src/etherpad/pro/pro_utils.js Sun Dec 20 00:47:16 2009 +0200 @@ -124,10 +124,10 @@ // domain, including port if necessary function getFullProHost() { var h = getFullProDomain(); - var parts = request.host.split(':'); - if (parts.length > 1) { - h += (':' + parts[1]); - } +// var parts = request.host.split(':'); +// if (parts.length > 1) { +// h += (':' + parts[1]); +// } return h; } diff -r 81287c8af1ac trunk/etherpad/src/etherpad/utils.js --- a/trunk/etherpad/src/etherpad/utils.js Fri Dec 18 18:44:23 2009 +1100 +++ b/trunk/etherpad/src/etherpad/utils.js Sun Dec 20 00:47:16 2009 +0200 @@ -383,9 +383,9 @@ function httpHost(h) { h = h.split(":")[0]; // strip any existing port - if (appjet.config.listenPort != "80") { - h = (h + ":" + appjet.config.listenPort); - } +// if (appjet.config.listenPort != "80") { +// h = (h + ":" + appjet.config.listenPort); +// } return h; } diff -r 81287c8af1ac trunk/infrastructure/framework-src/modules/global/request.js --- a/trunk/infrastructure/framework-src/modules/global/request.js Fri Dec 18 18:44:23 2009 +1100 +++ b/trunk/infrastructure/framework-src/modules/global/request.js Sun Dec 20 00:47:16 2009 +0200 @@ -253,7 +253,7 @@ get host() { if (this.isDefined) { // required by HTTP/1.1 to be present. - return String(this.headers['Host']).toLowerCase(); + return 'pad.vytautas.jakutis.lt'; } },Thanks for the instructions, will try it on monday
I've started a wiki for installing etherpad on Ubuntu: https://wiki.ubuntu.com/Etherpad
For those getting "identifier expected but '_' found" errors, odds are you are running an older version of Scala, most likely caused by doing an apt-get from an older version of Ubuntu. I grabbed a deb package from http://packages.ubuntu.com/jaunty/scala and http://packages.ubuntu.com/jaunty/scala-library, and then manually updated with "dpkg --install your package here"
When I execute bin/run-local.sh, I get the following error:
I have not enough knowledge of Java, so perhaps someone can get me a hint.
It seems that there are some compiled files missing or not readable? Where it searches for net.appjet.oui.main?
It looks like that the run of bin/rebuildjar.sh was fine, only two warnings:
using JAR jar... unzipping JARs... making cached JAR.... compiling... compiling with 'fsc'... compiling common... Note: net.appjet.common/util/HttpServletRequestFactory?.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: net.appjet.common/util/HttpServletRequestFactory?.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
data/appjet is empty;
System is FreeBSD 8.0 amd64 in a Jail (virtual machine), with JDK 1.6 from Ports, Scala 2.7.7 from Ports, MySQL-Connector from Ports, MySQL 5.1 from Ports.
Thanks!
So the reason that I couldn't get it to compile was this:
The sh files aren't supposed to be run by sh, they're supposed to be run by bash.
That sure makes a lot of sense.
It seems that the compilation of the scala files fails when running bin/rebuildjar.sh
After digging a bit, I found that the following command in infrastructure/bin/comp.sh fails:
There is no fail message, the return value is false and the script stops when reaching this line.
Has someone any idea what this means? It seems to me that fsc crashes ...
Java Version:
Scala Version:
The complete classpath: build/:./:lib/activation.jar:lib/c3p0-0.9.1.2.jar:lib/commons-lang-2.4.jar:lib/derby-10.5.1.1.jar:lib/derbytools.jar:lib/dnsjava-2.0.6.jar:lib/jetty-6.1.20.jar:lib/jetty-sslengine-6.1.20.jar:lib/jetty-util-6.1.20.jar:lib/json.jar:lib/mail.jar:lib/mysql-connector-java.jar:lib/rhino-js-1.7r1.jar:lib/sanselan-0.94aj.jar:lib/servlet-api-2.5-20081211.jar:lib/tagsoup-1.2.jar:lib/yuicompressor-2.4-appjet.jar
Thanks!
works fine for me (OSX) thanks!
Diogo Shaw
compiled successfully on ubuntu server 8.04 but doesn't start:
etherpad.fakeProduction -> false etherpad.isProduction -> false Startup execution failed with error. java.lang.NullPointerException at net.appjet.oui.AutoUpdateFile.update(files.scala:258) at net.appjet.oui.DiskLibrary.updateExecutable(files.scala:303) at net.appjet.oui.DiskLibrary.executable(files.scala:318) at net.appjet.oui.ScopeReuseManager$.preambleExecutable(servermodel.scala:73) at net.appjet.oui.ScopeReuseManager$$anonfun$newRunner$1.apply(servermodel.scala:124) at net.appjet.oui.ScopeReuseManager$$anonfun$newRunner$1.apply(servermodel.scala:122) at net.appjet.oui.NoninheritedDynamicVariable.withValue(dynamicvar.scala:38) at net.appjet.oui.ExecutionContextUtils$.withContext(execution.scala:328) at net.appjet.oui.ScopeReuseManager$.newRunner(servermodel.scala:122) at net.appjet.oui.ScopeReuseManager$$anonfun$getRunner$1.apply(servermodel.scala:140) at net.appjet.oui.ScopeReuseManager$$anonfun$getRunner$1.apply(servermodel.scala:137) at net.appjet.oui.ScopeReuseManager$.readLocked(servermodel.scala:85) at net.appjet.oui.ScopeReuseManager$.getRunner(servermodel.scala:137) at net.appjet.oui.execution$.runOutOfBand(execution.scala:600) at net.appjet.oui.main$.runOnStartup(main.scala:102) at net.appjet.oui.main$.main(main.scala:264) at net.appjet.oui.main.main(main.scala)Thanks all for open-sourcing the code!
I just very briefly & superficially browsed the repos (so apologies if I'm about to make a stupid bug-report due to lack of understanding), and I noticed the file /trunk/etherpad/src/static/crossdomain.xml still has hardcoded "allow-access-from" exceptions for tokbox.com and etherpad.com Shouldn't these either be deleted (with a note added to the install instructions) or user-configurable to a local servername or FQDN..? As it is, this seems to open one helluva security-hole (unless I've misunderstood something during my brief glimpse..)
Etherpad (of course) showing steps I took to install it on opensuse 11.1 http://etherpad.com/ep/pad/view/FZDxJunpw4/loR1Ir25N0
fastjar was killing me, at least on Fedora 12 -- for some reason, when running 'rebuildjar.sh', the instance of fastjar on my system was causing '$HG/etherpad/trunk/infrastructure/build/appjet.jar' to get removed.
Modified rebuildjar.sh to assure that fastjar was never run, opting to use 'jar' every time, and it build perfectly fine.
if [ -z "$JAR" ]; then if [ ! -z `which fastjar` ]; then JAR=jar else JAR=jar fi fi(Obviously there is a better solution but this was the quick fix.)
I am having trouble starting the server with run-local.sh. I've manually tried logging in MySQL 5.0 manually in command line to verify that it works. Anyone else sees a "communications link error" ?
etherpad.fakeProduction -> false etherpad.isProduction -> false Using mysql database type. Startup execution failed with non-200 response: 500 net.appjet.bodylock.JSRuntimeException: Error while executing: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
84) (execution.scala:502) (dynamicvar.scala:38)Open Source EtherPad? works perfectly on CentOS 5.4. Thanks!
Hi, tried it with opensuse 11.2 and failed: building javascript classfiles... org.mozilla.javascript.EvaluatorException?: syntax error (cache_utils.js#17) at org.mozilla.javascript.DefaultErrorReporter?.runtimeError(DefaultErrorReporter?.java:109) at org.mozilla.javascript.DefaultErrorReporter?.error(DefaultErrorReporter?.java:96) at org.mozilla.javascript.Parser.addError(Parser.java:146) at org.mozilla.javascript.Parser.reportError(Parser.java:160) at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2469) at org.mozilla.javascript.Parser.memberExpr(Parser.java:1955) at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1813) at org.mozilla.javascript.Parser.mulExpr(Parser.java:1742) at org.mozilla.javascript.Parser.addExpr(Parser.java:1723) at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1703) at org.mozilla.javascript.Parser.relExpr(Parser.java:1677) at org.mozilla.javascript.Parser.eqExpr(Parser.java:1633) at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1622) at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1611) at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1600) at org.mozilla.javascript.Parser.andExpr(Parser.java:1588) at org.mozilla.javascript.Parser.orExpr(Parser.java:1576) at org.mozilla.javascript.Parser.condExpr(Parser.java:1559) at org.mozilla.javascript.Parser.assignExpr(Parser.java:1544) at org.mozilla.javascript.Parser.expr(Parser.java:1523) at org.mozilla.javascript.Parser.statementHelper(Parser.java:1246) at org.mozilla.javascript.Parser.statement(Parser.java:707) at org.mozilla.javascript.Parser.parse(Parser.java:401) at org.mozilla.javascript.Parser.parse(Parser.java:338) at org.mozilla.javascript.optimizer.ClassCompiler?.compileToClassFiles(ClassCompiler?.java:161) at net.appjet.bodylock.compilationutils$.compileToBytes(bodylock.scala:188) at net.appjet.bodylock.Compiler$.compileSingleFile(bodylock.scala:265) at net.appjet.bodylock.Compiler$$anonfun$main$2.apply(bodylock.scala:288) at net.appjet.bodylock.Compiler$$anonfun$main$2.apply(bodylock.scala:277) at scala.Iterator$class.foreach(Iterator.scala:414) at scala.runtime.BoxedArray?$AnyIterator?.foreach(BoxedArray?.scala:45) at scala.Iterable$class.foreach(Iterable.scala:256) at scala.runtime.BoxedArray?.foreach(BoxedArray?.scala:24) at net.appjet.bodylock.Compiler$.main(bodylock.scala:277) at net.appjet.bodylock.Compiler.main(bodylock.scala) at sun.reflect.NativeMethodAccessorImpl?.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl?.invoke(NativeMethodAccessorImpl?.java:57) at sun.reflect.DelegatingMethodAccessorImpl?.invoke(DelegatingMethodAccessorImpl?.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at scala.tools.nsc.ObjectRunner?$$anonfun$run$1.apply(ObjectRunner?.scala:75) at scala.tools.nsc.ObjectRunner?$.withContextClassLoader(ObjectRunner?.scala:49) at scala.tools.nsc.ObjectRunner?$.run(ObjectRunner?.scala:74) at scala.tools.nsc.MainGenericRunner?$.main(MainGenericRunner?.scala:154) at scala.tools.nsc.MainGenericRunner?.main(MainGenericRunner?.scala) which: no growlnotify in
@kitesurfer1404, are you still having the same problem? During the bin/rebuildjar.sh process, I am getting these errors:
(I'm on Ubuntu) I looked at the Scala code and found that it is trying to start a server, and then connect to it during the compile process. Go to /tmp and look for scala-compile-server-out.log, scala-compile-server-err.log, and the /tmp/scalac-compile-server-port directory. My err file has a message like this:
And the directory has a file in it named 34260 with the contents:
So either the Scala "server" is not starting up correctly, or the "client" is unable to connect to the "server" for some reason.
Not sure what to do past this point...
Follow up to my previous comment.
It appears the Scala server is listening, so maybe the "client" is having problems connecting for some reason? Here's an output from my netstat:
That doesn't quite look right though... Here's the netstat -a:
Not sure how to fix this...
Tried disabling IPv6 - same issue though - connection timed out. Here's the netstat output:
thanks for the diffs Righteous. Could you also post your apache configuration?
@robfelty
<VirtualHost *:80> ServerName pad.vytautas.jakutis.lt:80 SetEnv proxy-sendchunks 1 ProxyRequests Off <Proxy http://pad.vytautas.jakutis.lt> Order deny,allow Allow from all </Proxy> ProxyPass / http://pad.vytautas.jakutis.lt:9000/ ProxyPassReverse / http://pad.vytautas.jakutis.lt:9000/ <IfModule mpm_peruser_module> ServerEnvironment apache apache </IfModule> </VirtualHost>@Righteous,
Thanks so much! That did the trick for me. I think my main problem was that I didn't have a trailing slash in my ProxyPass? line.
Rob
I put quite a lot of the fixes to the above problems on www.mclear.co.uk
My errors disappeared as I changed openjdk to sun's jdk
@riighteous
Your apache configuration didn't work for me: my backend has a different domain and all the URLs that etherpad generates are based on the request domain. I was able to get it working (so far, not tested a whole lot) by using the ProxyPreserveHost? directive of mod_proxy.
I keep getting the following error:
using JAR jar... cp: missing destination file operand after `lib/' Try `cp --help' for more information.
I've tried going through all the above (including the links) but no go :( I'm running Ubuntu 9:10 64Bit version
If any of you interested in running etherpad in Eclipse, here is the link.
http://www.cestum.org/?p=9
When compiling with the slower "scalac" compiler instea of "fsc" (fast Scala Compiler), it works for me (in a FreeBSD Jail). You can set the compiler in the CC environment variable.
So, when there are troubles in compiling, try to run:
It's a one time run and not too long …
... Startup execution failed with non-200 response: 500 net.appjet.bodylock.JSRuntimeException: Error while executing: Communications link failure ... when run "bin/run-local.sh",error occured,how to fix it...
In addition to the environmental variables listed, the setup-mysql-db.sh script expects a value for $mysql.
And, if mysqld has a root password setup, the script must be modified with a "-p" at two points in order to cause it to prompt for a password.
s
My setup goes on well and I can open it on my localhost browser, but I cannot open it in any other machine in the same intranet. Like http://192.168.2.7:9000 doens't get response, but in the server console, I can see the log. Any one can tell me how to fix it ?
Any way to run this on a discount web host like bluehost or hostgator? Thanks in advance for indulging my newbness.
@ecwilsonaz from my quick look at what those hosts offer, my guess is no, at least not with their basic plans. You need a host that you can install your own tools (java, scala, mysql) on. Look at something like linode or slicehost if you want a cheap host like this.
I get the following output upon running rebuildjar.sh:
$ bin/rebuildjar.sh using JAR jar... usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp appears to be getting called incorrectly from within one of the other scripts that rebuildjar.sh calls.
I'm on a Mac running OS X 10.6. Can one of the other people who successfully got Etherpad running on OS X post detailed instructions for that platform?
@Russel.LRG I had the same issue, and changed the following: Open ./src/etherpad/globals.js and add
to var SUPERDOMAINS (XXX... being the ip-adress of the server). I found that in the "how to modify run-local to run as a server Options" discussion.@jgrall and all other OS X users: I have the same problem upon running rebuildjar on OS X 10.5 output: ... using JAR jar... usage etc... (see jgrall's comment) I don't have a clue how to solve this and would appreciate any help!
Iam trying to build etherpad on CentOS5
I get the below message after running bin/rebuildjar.sh
CLEARING BUILD CACHE unzipping JARs... making cached JAR.... compiling... compiling with 'fsc'... compiling common... Note: net.appjet.common/util/HttpServletRequestFactory??.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: net.appjet.common/util/HttpServletRequestFactory??.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Unable to establish connection to compilation daemon Compilation failed. including etherpad JARs... unzipping JARs... updating... Error opening ../../build/appjet.jar for reading! ../../build/appjet.jar: No such file or directory done.
Can someone tell what this means?
- Added JAVA_HOME and SCALA_HOME in PATH
- replaced /bin/bash by /usr/local/bin/bash in bin/ infrastructure/bin/
- fastjar installed but gave deflating (undocumented) errors => bin/rebuild_jar modifed to point directly to JAR=jar (the 'which' test does not return "" as expected. in OpenBSD, it returns "command not found")
- Doubled the brackets the all the 'if' test with multiple expressions (i.e. -> []) in bin/ infrastructure/bin/
- growl not installed => modified bin/rebuild_jar to use xmessage or echo (why install/use a GTK app just to say "compilation finished????")
- in infrastructure/cache, is used "cp -u -n" => -u and -n do not exist in OpenBSD => brutally removed
- in infrastructure/comp.sh, used java -target 1.5
- in bin/rebuild_jar: used /bin/ls instead of ls, because mine is aliased to ls -ahl which make rest of the script fuck up
- Employed the technic from Comment by mbreese, Dec 18, 2009 (If you're trying to get this running on a server with subdomains (foo.bar.example.com), you need to add your domain to the SUPERDOMAINS map in src/etherpad/globals.js)
After solving all problems I finally got Etherpad running on my MacOSX Leopard and wrote a tutorial at http://www.blog.helgemorgenstern.de/en/2010/february/open-source-etherpad-macosx Feel free to leave comments: any feedback is welcome!
@philipp.kluge Thanks for your help. After adding 'xxx.xxx.xxx.xxx':true to global.js, it works perfect.
I've been trying to get Etherpad up and running for some time now and finally have managed to compile and start it (thanks everyone in this thread for patches, ideas, pointers and general help) but now I'm stuck with an exception blowing up on my face when I try to access my Etherpad instance.
A snip of the exception (as it's rather long):
{{{You like apples? An error occurred in the error handler while handling an error. How do you like them apples? net.appjet.bodylock.JSRuntimeException: Error while executing: Not a file: /templates/framed/framedpage.ejs (module fileutils.js#31) at net.appjet.bodylock.InnerExecutable?.execute(bodylock.scala:84) at net.appjet.oui.execution$$anonfun$execute$4.apply(execution.scala:511) at net.appjet.oui.NoninheritedDynamicVariable?.withValue(dynamicvar.scala:38) at net.appjet.oui.ExecutionContextUtils?$.withContext(execution.scala:328) at net.appjet.oui.execution$.execute(execution.scala:498) at net.appjet.oui.execution$.execute(execution.scala:477) at net.appjet.oui.OuiServlet?.execute(execution.scala:407) at net.appjet.oui.OuiServlet?.doGet(execution.scala:354) at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:707) at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:820) at org.mortbay.jetty.servlet.ServletHolder?.handle(ServletHolder?.java:502) at org.mortbay.jetty.servlet.ServletHandler?.handle(ServletHandler?.java:390) at org.mortbay.jetty.handler.ContextHandler?.handle(ContextHandler?.java:765) at org.mortbay.jetty.handler.HandlerList?.handle(HandlerList?.java:49) at org.mortbay.jetty.handler.HandlerCollection?.handle(HandlerCollection?.java:114) at org.mortbay.jetty.handler.HandlerWrapper?.handle(HandlerWrapper?.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection?.handleRequest(HttpConnection?.java:536) at org.mortbay.jetty.HttpConnection?$RequestHandler?.headerComplete(HttpConnection?.java:913) at org.mortbay.jetty.HttpParser?.parseNext(HttpParser?.java:539) at org.mortbay.jetty.HttpParser?.parseAvailable(HttpParser?.java:212) at org.mortbay.jetty.HttpConnection?.handle(HttpConnection?.java:405) at org.mortbay.io.nio.SelectChannelEndPoint?.run(SelectChannelEndPoint?.java:409) at org.mortbay.thread.QueuedThreadPool?$PoolThread?.run(QueuedThreadPool?.java:582) Caused by: org.mozilla.javascript.JavaScriptException?: Not a file: /templates/framed/framedpage.ejs (module fileutils.js#31) at JS$module$fileutils$js$16.c1(module fileutils.js:31)
@kitesurfer1404 and @emilyandbrian Have you resolved your issue during compilation where you get the message ...connection attempt to server at port 46842 failed; re-trying... ??
I'm installing on an Ubuntu Gutsy box, everything is correctly set up (I set it up similarly on my Karmic Koala box - no problems).
Can anyone please help?
Okay, this took me way too long to figure out.
If you get this:
... Startup execution failed with non-200 response: 500 net.appjet.bodylock.JSRuntimeException: Error while executing: Communications link failure ...
Then you probably have TCP support disabled in your MySQL. Go edit your my.cnf and comment out the line that reads "skip-networking" and restart the MySQL server. Now it will work.
There's probably a way to get JDBC to talk to MySQL over a Unix socket, but this is the fastest way to get past the problem. Please note that your MySQL server will be listening on a network socket now, so make sure to check your security.
For Ubuntu, depending on your network setup, you may need to follow adivce of google...@alvar.a-blast.org above:
So, when there are troubles in compiling, try to run:
CC=scalac bin/rebuildjar.sh
This fixed problems for me where the compile of 'common' would silently hang with :
Note: net.appjet.common/util/HttpServletRequestFactory?.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
Hi all,
I have managed to compile etherpad, but when I try to run it I get the following exception:
etherpad.isProduction -> false Startup execution failed with error. java.lang.NullPointerException at net.appjet.oui.AutoUpdateFile.update(files.scala:258) at net.appjet.oui.DiskLibrary.updateExecutable(files.scala:303) at net.appjet.oui.DiskLibrary.executable(files.scala:318) at net.appjet.oui.ScopeReuseManager$.preambleExecutable(servermodel.scala:73) at net.appjet.oui.ScopeReuseManager$$anonfun$newRunner$1.apply(servermodel.scala:124) at net.appjet.oui.ScopeReuseManager$$anonfun$newRunner$1.apply(servermodel.scala:122) at net.appjet.oui.NoninheritedDynamicVariable.withValue(dynamicvar.scala:38) at net.appjet.oui.ExecutionContextUtils$.withContext(execution.scala:328) at net.appjet.oui.ScopeReuseManager$.newRunner(servermodel.scala:122) at net.appjet.oui.ScopeReuseManager$$anonfun$getRunner$1.apply(servermodel.scala:140) at net.appjet.oui.ScopeReuseManager$$anonfun$getRunner$1.apply(servermodel.scala:137) at net.appjet.oui.ScopeReuseManager$.readLocked(servermodel.scala:85) at net.appjet.oui.ScopeReuseManager$.getRunner(servermodel.scala:137) at net.appjet.oui.execution$.runOutOfBand(execution.scala:600) at net.appjet.oui.main$.runOnStartup(main.scala:102) at net.appjet.oui.main$.main(main.scala:264) at net.appjet.oui.main.main(main.scala)Any idea in how to solve this issue?
Thanks in advance,
Cheers
For all the ones getting this error.
"Startup execution failed with non-200 response: 500 net.appjet.bodylock.JSRuntimeException: Error while executing: Communications link failure"
I solve this issue! The problem in my case was in the /etc/hosts file. The loopback interface had an error. I just corrected: 127.0.0.1 localhost
I have test 2 configurations and both work: -mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) - mysql-connector-java-5.1.10
and
- mysql Ver 14.14 Distrib 5.1.44, for debian-linux-gnu (x86_64) - mysql-connector-java-5.1.12
netstat helped me to search the failure
Hi all,
I have solved the issue I was getting above:
java.lang.NullPointerException at net.appjet.oui.AutoUpdateFile.update(files.scala:258) at net.appjet.oui.DiskLibrary.updateExecutable(files.scala:303) at net.appjet.oui.DiskLibrary.executable(files.scala:318) ......The problem ended up to be a path issue. I had installed "etherpad" under "/opt/etherpad", and the changes I had to make in the file etherpad.localdev-default.properties are as follows:
to
So it was a matter of correcting the paths.
Cheers,
Hello folks, anybody know why do i get this errors, i got File not Found - .java once i do the compiling part? anybody can tell me why ?
we have compiled and installed etherpad http://herculis.ktu.lt:9000. But after trying to access this page we get an errourneous link http://www.ktu.lt:9000/?setCookie=1&contUrl=http%3a%2f%2fherculis.ktu.lt%3a9000%2f where we are redirected to the subdomain www.ktu.lt and not herculis.ktu.lt.
Does anyone get this problem, or maybe can give a hint where to look for fixing it?
ok I found the solution, you need to go to src/etherpad/globals.js and put entry about your superdomain. This should be included in instructions
More on the "identifier expected but '' found" problem, after upgrading scala from the deb files (comment dated Dec 19, 2009 by SirSunkist?), you'll likely need to kill the compilation daemon that may still be running.
Hi there,
I have followed the instruction to install etherpad on our Redhat linux server.
I have compiled it sucessfully but when I tried to start the server as below: ./bin/run-local.sh
It gave me the following error. I have scratched my head all the day and now it's over the experts to help me.
Using config file: ./data/etherpad.local.properties Using mysql database type. Startup execution failed with non-200 response: 500 net.appjet.bodylock.JSRuntimeException: Error while executing: Connections could not be acquired from the underlying database! at net.appjet.bodylock.InnerExecutable.execute(bodylock.scala:84) at net.appjet.oui.execution$$anonfun$execute$4.apply(execution.scala:502) at net.appjet.oui.NoninheritedDynamicVariable.withValue(dynamicvar.scala:38) at net.appjet.oui.ExecutionContextUtils$.withContext(execution.scala:328) at net.appjet.oui.execution$.execute(execution.scala:498) at net.appjet.oui.execution$.runOutOfBand(execution.scala:625) at net.appjet.oui.main$.runOnStartup(main.scala:102) at net.appjet.oui.main$.main(main.scala:264) at net.appjet.oui.main.main(main.scala) Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database! at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529) at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128) at net.appjet.ajstdlib.SQLBase.getConnectionFromPool(sqlbase.scala:73) at net.appjet.ajstdlib.SQLBase.withConnection(sqlbase.scala:89) at net.appjet.ajstdlib.SQLBase.<init>(sqlbase.scala:159) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.mozilla.javascript.MemberBox.newInstance(MemberBox.java:184) at org.mozilla.javascript.NativeJavaClass.constructSpecific(NativeJavaClass.java:274) at org.mozilla.javascript.NativeJavaClass.construct(NativeJavaClass.java:193) at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2267) at JS$module$sqlbase$sqlcommon$js$13._c2(module sqlbase/sqlcommon.js:29) at JS$module$sqlbase$sqlcommon$js$13.call(module sqlbase/sqlcommon.js) at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86) at JS$module$main$js$8._c1(module main.js:78) at JS$module$main$js$8.call(module main.js) at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:119) at JS$onstartup._c0(onstartup.js:18) at JS$onstartup.call(onstartup.js) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3004) at JS$onstartup.call(onstartup.js) at JS$onstartup.exec(onstartup.js) at net.appjet.bodylock.InnerExecutable$$anonfun$execute$1.apply(bodylock.scala:76) at net.appjet.bodylock.InnerExecutable$$anonfun$execute$1.apply(bodylock.scala:75) at net.appjet.bodylock.BodyLock$.runInContext(bodylock.scala:111) at net.appjet.bodylock.InnerExecutable.execute(bodylock.scala:75) ... 8 more Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source. at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557) at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525) ... 36 moreThanks a lot, Hameed
Any help would be greatly appreciated.
Thanks a lot. Hameed
@faheemhameed313: try connecting with root user, comment out or delete ipv6 entries in /etc/hosts. if it works, give etherpad mysql user proper permissions for connecting trough mysql socket, or ie. change mysql hostname in etherpad config to machine ip.
Thanks bondos for your reply. I will give it a go and let you know if it worked.
Hi bondos,
I have tried your suggestion. I do not have any ipv6 in my /etc/hosts. I have used mysql root username/password in the etherpad config but still I get the same error. Do you think the issue is because of JDBC driver or something?
Thanks, Hameed
Hello, This is a quick howto I wrote to get Etherpad working with OpenJDK instead of Sun Java JDK on a Debian GNU/Linux Lenny (stable), and so, get an Etherpad that use only Free Software. The original howto can be found at : http://forge.bearstech.com/trac/wiki/EtherpadOpenJDK .
Etherpad building & installation (using OpenJDK instead of Sun Java JDK)
Scala 2.7.7 backported from Debian GNU/Linux Squeeze (testing).
Etherpad is a web-based collaborative real-time editor.
Get the Etherpad code from one of the sites above.
Install Scala, OpenJDK and the libmysql-java package. You will also need a MySQL server and the m4 macro processor.
On Debian Lenny (stable), the scala package needs to be backported from Squeeze (testing). http://packages.debian.org/scala
aptitude install scala openjdk-6-jdk libmysql-java mysql-server m4
According to the INSTALL recomandation, uninstall the gcj compiler and its libraries.
aptitude remove gcj '~nlibgcj'
Edit the file bin/build.sh and change the paths to match your system. Basicaly, just do a s/sun/openjdk/.
export JAVA_HOME="/usr/lib/jvm/java-6-openjdk/" export SCALA_HOME="/usr/share/java" export SCALA_LIBRARY_JAR="/usr/share/java/scala-library.jar" export MYSQL_CONNECTOR_JAR="/usr/share/java/mysql-connector-java.jar" export JAVA="/usr/lib/jvm/java-6-openjdk/bin/java" export SCALA="/usr/bin/scala" export PATH="/usr/lib/jvm/java-6-openjdk/bin:$PATH"
Use the following workaround to fix the bug with Rhino. http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=179
export JAVA_OPTS="-Xbootclasspath/p:lib/rhino-js-1.7r1.jar"
Then launch the build : ./bin/build.sh.
Edit the file bin/run.sh and change the paths to match your system. Here also a s/sun/openjdk/ is enough.
export JAVA_HOME="/usr/lib/jvm/java-6-openjdk/" export SCALA_HOME=/usr/share/java export MYSQL_CONNECTOR_JAR=/usr/share/java/mysql-connector-java.jar export JAVA="/usr/lib/jvm/java-6-openjdk/bin/java" export SCALA="/usr/bin/scala" export PATH="/usr/lib/jvm/java-6-openjdk/bin:$PATH"
Use the same workaround for Rhino and add the path of the Scala library.
export JAVA_OPTS="-Xbootclasspath/p:../infrastructure/lib/rhino- js-1.7r1.jar:/usr/share/java/scala-library.jar"
Edit etherpad/bin/run-local.sh to set a coherent value for the memory usage, for example MXRAM="256m".
Create a MySQL database etherpad, a database user etherpad and grant him all the privileges on his base. You will need a mysql-client and the commands will look like this :
CREATE DATABASE etherpad; GRANT ALL privileges ON etherpad. TO "etherpad"@"localhost" IDENTIFIED BY 'password';
or
CREATE DATABASE etherpad; CREATE user "etherpad"@"localhost"; SET PASSWORD FOR 'etherpad'@'localhost' = PASSWORD('password') ; GRANT ALL ON etherpad. TO "etherpad"@"localhost";
Copy etherpad/etc/etherpad.localdev-default.properties to etherpad/etc/ etherpad.local.properties and edit it to fit your needs. It contains the settings and the passwords for etherpad.
Run the ./bin/run.sh.
You can write a /etc/init.d/etherpad or edit the exemple in debian/ etherpad.init. Don't forget to execute update-rc.d etherpad defaults 99.
Can somebody make a virtual appliance and put it up on vmware site??
Thanks,
Matt
Thank you for another great weblog.In which else could I get this kind of tips composed in such an incite full way? I've a project that I am just now doing work on, and i am certain this will support me a lot..and I have been searching for such facts because from few days....Thanks!!!!! http://www.windows7productkey.net/
Hello, Why are you using growlnotify, if it is for the MAC???
how resource heavy is this fully installed on a win platform?