tumblr / collins

groovy kind of love
tumblr.github.com/collins
Apache License 2.0
573 stars 99 forks source link

migrationsError when installing on Ubuntu 18.04 #589

Closed mahomedh closed 5 years ago

mahomedh commented 5 years ago

Hi

Could anyone please help or point me in the right direction of installing Collins on Ubuntu 18.04?

When I run sudo -u nobody /usr/local/collins/scripts/collins.sh initdb collins_db_uname collins_db_password it fails with the error:

Running migrationsError: Could not find or load main class collins.DbUtil

I have tried searching for this and only found two posts but they are quite old and the info in them have not help.

I am trying to install from the zip 2.2.0 from http://tumblr.github.io/collins/downloads.html and following the instructions https://tumblr.github.io/collins/index.html#quickstart

uname -a
Linux collins 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

root@collins:/usr/local/collins/scripts# java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

root@collins:/usr/local/collins/scripts# javac -version
javac 1.8.0_181

root@collins:/usr/local/collins/scripts# update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                         Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java   1101      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java   1101      manual mode
* 2            /usr/lib/jvm/java-8-oracle/jre/bin/java       1081      manual mode

root@collins:/usr/local/collins/scripts# update-alternatives --config javac
There are 2 choices for the alternative javac (providing /usr/bin/javac).

  Selection    Path                                          Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/javac   1101      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/javac   1101      manual mode
* 2            /usr/lib/jvm/java-8-oracle/bin/javac           1081      manual mode

root@collins:/usr/local/collins/scripts# echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle/jre/

root@collins:/usr/local/collins/scripts# cat /etc/sysconfig/collins/sysconfig-1538384514-52389
APP_HOME=/usr/local/collins
LISTEN_PORT=8080
COLLINS_USER=nobody

Please let me know if you need any other info (or what I am doing wrong :) ) Thanks in advance for any help.

mahomedh commented 5 years ago

I have managed to progress the install by installing collins-v2.2.0-jdk8.zip instead of collins-v2.2.0.zip but now I get the following error when I try to start the service.

administrator@collins:/usr/local/collins/scripts$ sudo /usr/local/collins/scripts/collins.sh start
/usr/local/collins/scripts/collins.sh: line 122: [: /usr/local/collins/lib/collins.collins-2.0-SNAPSHOT-assets.jar: binary operator expected
Starting collins...  *

I have found this issue but the suggested fix does not work.

Is anyone able to help please? The freenode chat is dead and it doesn't look like anyone is on the group anymore.

roymarantz commented 5 years ago

We don't use Ubuntu. I'd suggest you use the Docker method for installation not only since that is the most popular, but it is probably the only one exercised recently.

mr-ransel commented 5 years ago

@mahomedh You should take a look at what else is in that folder and you can adjust your regex accordingly. Specifically it's complaining because there are multiple matches to the file globbing that occurs at that file path, so either delete the other files that match the given file glob, or tweak the glob to be more specific

mahomedh commented 5 years ago

@mr-ransel Thanks, though I am not sure what regex you are talking about who what folder for that matter. All moot though as I've given up on this and moved on.