0

Unfortunately, JetBrains does not have a place to report issues with License Server, so I'm having to ask here as a last resort. Hopefully someone can help me!

I am trying to get JetBrains License Server installed on Ubuntu 14.04. The instructions I've been following are here. So far, I've successfully:

  • Installed Oracle Java 8 from webupd8team using apt
  • Installed Apache Tomcat 7 using apt
  • Configured the JAVA_HOME environment variable by creating /usr/share/tomcat7/bin/setenv.sh as recommended by the Tomcat documentation
  • Ran sudo chmod +x setenv.sh to ensure the script is executable
  • Deployed licenseServer.war to /var/lib/tomcat7/webapps
  • Verified that the war file was unpacked correctly when Tomcat starts

However, when I look at Tomcat's logs, I see lots of Java exceptions that appear to be permissions-related but I have no idea how to resolve them. Here is a sampling of exceptions that appear in catalina.out:

ERROR PluginManagerImpl - Error while configuring logging
java.io.FileNotFoundException: /usr/share/tomcat7/logs/jetbrains-license-server/cfc7082d-ae43-4978-a2a2-46feb1679405.log (No such
file or directory)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
        at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
        at org.apache.log4j.FileAppender.<init>(FileAppender.java:108)
...

ERROR XBM0H: Directory /usr/share/tomcat7/db cannot be created.
        at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
        at org.apache.derby.impl.services.monitor.StorageFactoryService$9.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.derby.impl.services.monitor.StorageFactoryService.createServiceRoot(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
        at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(Unknown Source)
...

Unfortunately, JetBrains' documentation is extremely sparse for this application and I don't have much experience with Tomcat. Can anyone out there help?

Dylan Corriveau
  • 2,561
  • 4
  • 29
  • 36
NathanAldenSr
  • 7,841
  • 4
  • 40
  • 51

1 Answers1

0

Your problem is a permissions issue with the tomcat7 directory located here: /usr/share/tomcat7. Tomcat needs write permission to this directory in order to create a folder named db. Tomcat also needs write permission to the log directory in /var/lib/tomcat7/webapps.

After much time troubleshooting this problem and contacting JetBrains regarding the problem. I wrote up the following documentation in order to keep track of what I did to get it working. I do give credit to JetBrains Tech support for helping to point me in the right direction for resolving my permissions issue as well.

JetBrains License Server (Linux Installation)

  • Install Ubuntu 14.04 LTS x86_64

    apt-get update && apt-get upgrade -y

Install JAVA SE Development Kit 8

cd /etc wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u51-b16/jdk-8u51-linux-x64.tar.gz (thanks to stackoverflow)

tar xzvf jdk-8u51-linux-x64.tar.gz

  • Change java_home location by typing: export JAVA_HOME=/etc/jdk1.8.0_51

  • Verify java home location by typing: echo $JAVA_HOME outputs: /etc/jdk1.8.0_51

Install TOMCAT7

apt-get install tomcat7 tomcat7-admin

Below the commented line stating: #JAVA_HOME=/usr/lib/jvm/openjdk-6-jdk-8u51-linux-x64 Type in the following: JAVA_HOME=/etc/jdk1.8.0_51

  • Next setup a user for tomcat7 in:
    vim /etc/tomcat7/tomcat-users.xml

    By entering the following between the (remove single quotes) <'tomcat-users'> <'/tomcat-users'> tags <'role rolename="manager-gui"/'> <'user username="<username>" password="<password>" roles="manager-gui">

  • You can now manage tomcat by opening up a web browser to http://ServerName.example.com:8080/manager and entering in the username/password that is in the tomcat-users tags.

Install JetBrains License Server Note: License Server does require a specific license key to work with it. Contact JetBrains Sales team regarding license key for use with license server.

cd /var/lib/tomcat7/webapps/ wget http://download.jetbrains.com/lcsrv/licenseServer-tomcat-402-x64.zip unzip licenseServer-tomcat-402-x64.zip mv ./apache-tomcat-7.0.52-x64/webapps/licenseServer.war . cd /usr/share chgrp -R tomcat7 tomcat7 chmod 775 tomcat7 service tomcat7 restart

Open up a web browser to http://ServerName.example.com:8080/licenseServer. Proceed with setting up your License Server, per JetBrains documentation.

I have sent this information to JetBrains and informed them that they can repost it on their website as long as credit is given to all members that have helped create the documentation.

Community
  • 1
  • 1
TUadmin
  • 36
  • 1
  • 3