Unpacked and installed on ubuntu, what now?

egbert8 years ago

Hi,
I installed traccar server after I installed openjdk 8 jre on my Ubuntu 16.04.1 server. I expected to be able to see a webinterface on <server address>:8082. Not. Running a console give me:

root@ubuntu:/etc/apache2# /opt/traccar/bin/traccar console
Running traccar...
wrapper  | --> Wrapper Started as Console
wrapper  | Java Service Wrapper Community Edition 64-bit 3.5.28
wrapper  |   Copyright (C) 1999-2016 Tanuki Software, Ltd. All Rights Reserved.
wrapper  |     http://wrapper.tanukisoftware.com
wrapper  |
wrapper  | Launching a JVM...
jvm 1    | WrapperManager: Initializing...
jvm 1    | [WrapperSimpleAppMain] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Started.
jvm 1    | INFO 10/24/16, 10:33 PM: liquibase: Clearing database change log checksums
jvm 1    | INFO 10/24/16, 10:33 PM: liquibase: Successfully acquired change log lock
jvm 1    | INFO 10/24/16, 10:33 PM: liquibase: Successfully released change log lock
jvm 1    | INFO 10/24/16, 10:33 PM: liquibase: Successfully acquired change log lock
jvm 1    | INFO 10/24/16, 10:33 PM: liquibase: Reading from PUBLIC.DATABASECHANGELOG
jvm 1    | INFO 10/24/16, 10:33 PM: liquibase: Reading from PUBLIC.DATABASECHANGELOG
jvm 1    | INFO 10/24/16, 10:33 PM: liquibase: Successfully released change log lock
jvm 1    | [WrapperSimpleAppMain] INFO org.eclipse.jetty.util.log - Logging initialized @9768ms
jvm 1    | WrapperSimpleApp:
jvm 1    | WrapperSimpleApp Error: Encountered an error running main:
jvm 1    | WrapperSimpleApp Error: java.lang.NoClassDefFoundError: javax/annotation/Priority
jvm 1    | WrapperSimpleApp Error:      at org.glassfish.jersey.model.internal.ComponentBag.modelFor(ComponentBag.java:483)
jvm 1    | WrapperSimpleApp Error:      at org.glassfish.jersey.model.internal.ComponentBag.access$100(ComponentBag.java:89)
jvm 1    | WrapperSimpleApp Error:      at org.glassfish.jersey.model.internal.ComponentBag$5.call(ComponentBag.java:408)
jvm 1    | WrapperSimpleApp Error:      at org.glassfish.jersey.model.internal.ComponentBag$5.call(ComponentBag.java:398)

TIA
Egbert Jan, NL
Java does not say me anything... I cannot read nor program it. What can I do to pinpoint my problem?

Anton Tananaev8 years ago
  1. Don't run it as console, run as a service.

  2. Looks like some classes are missing. Are you using official latest release without any modifications? If yes, possibly you have a problem with your Java runtime.

egbert8 years ago

Hi Anton,
Version is what is on official website in download (I took the 64 bit version). I just followed an example that seems to give debug output. I do run traccar as a service via init.d.

Should I use another JRE? I took Openjdk-8-jre. There is also a "default-jre-headless" in the repo...

Egbert Jan

Anton Tananaev8 years ago

How do you run it as a service? What do you get in the logs?

OpenJDK should be fine as long as it's installed correctly.

egbert8 years ago

I started and stopped traccar with "service traccar start" and "serv... stop"
Syslog:

Oct 24 23:10:32 ubuntu systemd[1]: Starting LSB: traccar...
Oct 24 23:10:32 ubuntu traccar[8871]: Starting traccar...
Oct 24 23:10:35 ubuntu traccar[8871]: Waiting for traccar......
Oct 24 23:10:35 ubuntu traccar[8871]: running: PID:8947
Oct 24 23:10:35 ubuntu systemd[1]: Started LSB: traccar.
Oct 24 23:10:59 ubuntu systemd[1]: Stopping LSB: traccar...
Oct 24 23:10:59 ubuntu traccar[9079]: Stopping traccar...
Oct 24 23:10:59 ubuntu traccar[9079]: traccar was not running.
Oct 24 23:10:59 ubuntu systemd[1]: Stopped LSB: traccar.

I de-installed Openjdk and installed default-jre using apt-get. Error in console stays the same. Something about a Class not found.

Thanks
Egbert Jan

Anton Tananaev8 years ago

I'm not talking about system logs. I'm talking about Traccar logs. They should be under /opt/traccar/logs.

egbert8 years ago

Wrapper log

STATUS | wrapper  | 2016/10/24 23:20:02 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2016/10/24 23:20:02 | Java Service Wrapper Community Edition 64-bit 3.5.28
STATUS | wrapper  | 2016/10/24 23:20:02 |   Copyright (C) 1999-2016 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper  | 2016/10/24 23:20:02 |     http://wrapper.tanukisoftware.com
STATUS | wrapper  | 2016/10/24 23:20:02 |
STATUS | wrapper  | 2016/10/24 23:20:03 | Launching a JVM...
INFO   | jvm 1    | 2016/10/24 23:20:03 | WrapperManager: Initializing...
INFO   | jvm 1    | 2016/10/24 23:20:04 | [WrapperSimpleAppMain] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Started.
INFO   | jvm 1    | 2016/10/24 23:20:05 | INFO 10/24/16, 11:20 PM: liquibase: Clearing database change log checksums
INFO   | jvm 1    | 2016/10/24 23:20:05 | INFO 10/24/16, 11:20 PM: liquibase: Successfully acquired change log lock
INFO   | jvm 1    | 2016/10/24 23:20:05 | INFO 10/24/16, 11:20 PM: liquibase: Successfully released change log lock
INFO   | jvm 1    | 2016/10/24 23:20:05 | INFO 10/24/16, 11:20 PM: liquibase: Successfully acquired change log lock
INFO   | jvm 1    | 2016/10/24 23:20:12 | INFO 10/24/16, 11:20 PM: liquibase: Reading from PUBLIC.DATABASECHANGELOG
INFO   | jvm 1    | 2016/10/24 23:20:12 | INFO 10/24/16, 11:20 PM: liquibase: Reading from PUBLIC.DATABASECHANGELOG
INFO   | jvm 1    | 2016/10/24 23:20:12 | INFO 10/24/16, 11:20 PM: liquibase: Successfully released change log lock
INFO   | jvm 1    | 2016/10/24 23:20:12 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.util.log - Logging initialized @9641ms
INFO   | jvm 1    | 2016/10/24 23:20:13 | WrapperSimpleApp:
INFO   | jvm 1    | 2016/10/24 23:20:13 | WrapperSimpleApp Error: Encountered an error running main:
INFO   | jvm 1    | 2016/10/24 23:20:13 | WrapperSimpleApp Error: java.lang.NoClassDefFoundError: javax/annotation/Priority
INFO   | jvm 1    | 2016/10/24 23:20:13 | WrapperSimpleApp Error:       at org.glassfish.jersey.model.internal.ComponentBag.modelFor(ComponentBag.java:483)
INFO   | jvm 1    | 2016/10/24 23:20:13 | WrapperSimpleApp Error:       at org.glassfish.jersey.model.internal.ComponentBag.access$100(ComponentBag.java:89)
INFO   | jvm 1    | 2016/10/24 23:20:13 | WrapperSimpleApp Error:       at org.glassfish.jersey.model.internal.ComponentBag$5.call(ComponentBag.java:408)
INFO   | jvm 1    | 2016/10/24 23:20:13 | WrapperSimpleApp Error:       at org.glassfish.jersey.model.internal.ComponentBag$5.call(ComponentBag.java:398)
INFO   | jvm 1    | 2016/10/24 23:20:13 | WrapperSimpleApp Error:       at org.glassfish.jersey.internal.Errors.process(Errors.java:315)

Traccar-server.log

2016-10-24 23:20:04  INFO: Operating system name: Linux version: 4.4.0-45-generic architecture: amd64
2016-10-24 23:20:04  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Oracle Corporation version: 9-internal+0-2016-04-14-195246.buildd.src
2016-10-24 23:20:04  INFO: Memory limit heap: 988mb non-heap: 0mb
2016-10-24 23:20:04  INFO: Character encoding: UTF-8 charset: UTF-8
2016-10-24 23:20:04  INFO: Version: 3.7-SNAPSHOT

Egbert Jan, NL

Anton Tananaev8 years ago

OK, it's the same problem as before. I can take a look if you provide an access to the server.

egbert8 years ago

Fine. Thanks. How do I get the pw safely to you?

Anton Tananaev8 years ago

You can send it to the email address on the support page.

Anton Tananaev8 years ago

The problem is that you are using Java 9, not Java 8 as you stated before. Java 9 hasn't been officially released and I won't recommend using it.

egbert8 years ago

Then I'll revoke 9 and install openjdk-8. See what happens then. Thanks.

Egbert Jan

egbert8 years ago

YES! After repairing the ln in /etc/alternatives/java to the -8 java tree, I see the website! There are a bunch of other java related logical links here... I'll have to fix them all, I guess.

This java stuff is a whole new eco system for me. :-/

Egbert Jan

egbert8 years ago

Is traccar a completely self contained system? I'm used to run websites under Apache but I see nothing of that kind on my server. Moving the server to /var/www is probavly an no-go?

Cu
Egbert Jan

Anton Tananaev8 years ago

It's completely self-contained, but if you want to use it through Apache, you can set up proxy:

https://www.traccar.org/secure-connection/