Help to compile traccar

wagnerd9 years ago

Hi

Could someone explain me how to build, step by step traccar for linux? I am new to java.

thanks

Anton Tananaev9 years ago

Download NetBeans and follow instructions here:
https://github.com/tananaev/traccar#netbeans-recommended

Alternatively you can build with Maven from command line:

mvn package
wagnerd9 years ago

=[

i'm sorry, but I'm new to traccar.

before build, what i do?

Anton Tananaev9 years ago

You need to check it out from repository:
https://github.com/tananaev/traccar

wagnerd9 years ago

hi

I managed to compile and install traccar, but to run it reports:

STATUS | wrapperm | 2015/07/10 23:22:02 | Traccar service installed.
STATUS | wrapper | 2015/07/10 23:22:52 | --> Wrapper Started as Service
STATUS | wrapper | 2015/07/10 23:22:53 | Java Service Wrapper Standard Edition 32-bit 3.5.26
STATUS | wrapper | 2015/07/10 23:22:53 | Copyright (C) 1999-2014 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper | 2015/07/10 23:22:53 | http://wrapper.tanukisoftware.com
STATUS | wrapper | 2015/07/10 23:22:53 |
ERROR | wrapper | 2015/07/10 23:22:53 | License Error:
ERROR | wrapper | 2015/07/10 23:22:53 | A valid license was not found in the Wrapper configuration file.
ERROR | wrapper | 2015/07/10 23:22:53 |
ERROR | wrapper | 2015/07/10 23:22:53 | The Java Service Wrapper requires a License Key to activate the
ERROR | wrapper | 2015/07/10 23:22:53 | software. License Keys can be purchased on the Java Service Wrapper
ERROR | wrapper | 2015/07/10 23:22:53 | web site:
ERROR | wrapper | 2015/07/10 23:22:53 | http://wrapper.tanukisoftware.com/purchase
ERROR | wrapper | 2015/07/10 23:22:53 |
ERROR | wrapper | 2015/07/10 23:22:53 | You can also immediately obtain a one-month Free trial license:
ERROR | wrapper | 2015/07/10 23:22:53 | http://wrapper.tanukisoftware.com/trial
ERROR | wrapper | 2015/07/10 23:22:53 |
ERROR | wrapper | 2015/07/10 23:22:53 | License Keys can be generated for any of the following HostIds.
ERROR | wrapper | 2015/07/10 23:22:53 | HostId(s):
ERROR | wrapper | 2015/07/10 23:22:53 | 30f9eddbdd6e (#1)
ERROR | wrapper | 2015/07/10 23:22:53 | b8763fcbbc7c (#2)
ERROR | wrapper | 2015/07/10 23:22:53 | 08002700189f (#3)
ERROR | wrapper | 2015/07/10 23:22:53 |
ERROR | wrapper | 2015/07/10 23:22:53 |
ERROR | wrapper | 2015/07/10 23:22:53 | Optional host name for license: WAGNER-PC
STATUS | wrapper | 2015/07/10 23:22:53 | <-- Wrapper Stopped

Thanks

Anton Tananaev9 years ago

Looks like you are trying to use commercial version of Java Service Wrapper.

wagnerd9 years ago
Anton Tananaev9 years ago

Not sure about sourceforge. I would recommend to download community edition from here:
http://wrapper.tanukisoftware.com/doc/english/download.jsp

wagnerd9 years ago

Hi

First, I would like to thank you for the help!

I did what you said and showed another error.

I'm using Windows 10 x64 has a problem?

STATUS | wrapperm | 2015/07/13 20:59:23 | Traccar service installed.
STATUS | wrapper | 2015/07/13 21:01:56 | --> Wrapper Started as Service
STATUS | wrapper | 2015/07/13 21:01:58 | Java Service Wrapper Community Edition 32-bit 3.5.26
STATUS | wrapper | 2015/07/13 21:01:58 | Copyright (C) 1999-2014 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper | 2015/07/13 21:01:58 | http://wrapper.tanukisoftware.com
STATUS | wrapper | 2015/07/13 21:01:58 |
STATUS | wrapper | 2015/07/13 21:02:00 | Launching a JVM...
FATAL | wrapper | 2015/07/13 21:02:00 | Unable to execute Java command. O sistema não pode encontrar o arquivo especificado. (0x2)
FATAL | wrapper | 2015/07/13 21:02:00 | "java" -Djava.library.path="../lib" -classpath "../lib/wrapper.jar;../tracker-server.jar" -Dwrapper.key="chwKZ0NIV28ej7Wa" -Dwrapper.port=32000 -Dwrapper.pid=2128 -Dwrapper.version="3.5.26" -Dwrapper.native_library="wrapper" -Dwrapper.arch="x86" -Dwrapper.service="TRUE" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp org.traccar.Main "C:\Program Files (x86)\Traccar\conf\traccar.xml"
ADVICE | wrapper | 2015/07/13 21:02:00 |
ADVICE | wrapper | 2015/07/13 21:02:00 | --------------------------------------------------------------------
ADVICE | wrapper | 2015/07/13 21:02:00 | Advice:
ADVICE | wrapper | 2015/07/13 21:02:00 | Usually when the Wrapper fails to start the JVM process, it is
ADVICE | wrapper | 2015/07/13 21:02:00 | because of a problem with the value of the configured Java command.
ADVICE | wrapper | 2015/07/13 21:02:00 | Currently:
ADVICE | wrapper | 2015/07/13 21:02:00 | wrapper.java.command=java
ADVICE | wrapper | 2015/07/13 21:02:00 | Please make sure that the PATH or any other referenced environment
ADVICE | wrapper | 2015/07/13 21:02:00 | variables are correctly defined for the current environment.
ADVICE | wrapper | 2015/07/13 21:02:00 | --------------------------------------------------------------------
ADVICE | wrapper | 2015/07/13 21:02:00 |
STATUS | wrapper | 2015/07/13 21:02:00 | <-- Wrapper Stopped
STATUS | wrapper | 2015/07/13 21:06:23 | --> Wrapper Started as Service
STATUS | wrapper | 2015/07/13 21:06:23 | Java Service Wrapper Community Edition 32-bit 3.5.26
STATUS | wrapper | 2015/07/13 21:06:23 | Copyright (C) 1999-2014 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper | 2015/07/13 21:06:23 | http://wrapper.tanukisoftware.com
STATUS | wrapper | 2015/07/13 21:06:23 |
STATUS | wrapper | 2015/07/13 21:06:24 | Launching a JVM...
FATAL | wrapper | 2015/07/13 21:06:24 | Unable to execute Java command. O sistema não pode encontrar o arquivo especificado. (0x2)
FATAL | wrapper | 2015/07/13 21:06:24 | "java" -Djava.library.path="../lib" -classpath "../lib/wrapper.jar;../tracker-server.jar" -Dwrapper.key="eTrB4ES6XwYBGrJS" -Dwrapper.port=32000 -Dwrapper.pid=5528 -Dwrapper.version="3.5.26" -Dwrapper.native_library="wrapper" -Dwrapper.arch="x86" -Dwrapper.service="TRUE" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp org.traccar.Main "C:\Program Files (x86)\Traccar\conf\traccar.xml"
ADVICE | wrapper | 2015/07/13 21:06:24 |
ADVICE | wrapper | 2015/07/13 21:06:24 | --------------------------------------------------------------------
ADVICE | wrapper | 2015/07/13 21:06:24 | Advice:
ADVICE | wrapper | 2015/07/13 21:06:24 | Usually when the Wrapper fails to start the JVM process, it is
ADVICE | wrapper | 2015/07/13 21:06:24 | because of a problem with the value of the configured Java command.
ADVICE | wrapper | 2015/07/13 21:06:24 | Currently:
ADVICE | wrapper | 2015/07/13 21:06:24 | wrapper.java.command=java
ADVICE | wrapper | 2015/07/13 21:06:24 | Please make sure that the PATH or any other referenced environment
ADVICE | wrapper | 2015/07/13 21:06:24 | variables are correctly defined for the current environment.
ADVICE | wrapper | 2015/07/13 21:06:24 | --------------------------------------------------------------------
ADVICE | wrapper | 2015/07/13 21:06:24 |
STATUS | wrapper | 2015/07/13 21:06:24 | <-- Wrapper Stopped

Thanks

Anton Tananaev9 years ago

Looks like you don't have Java installed.

wagnerd9 years ago

Sorry, but have error.

I try to found the solution too, but not yet.

STATUS | wrapper | 2015/07/14 00:47:44 | --> Wrapper Started as Service
STATUS | wrapper | 2015/07/14 00:47:44 | Java Service Wrapper Community Edition 32-bit 3.5.26
STATUS | wrapper | 2015/07/14 00:47:44 | Copyright (C) 1999-2014 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper | 2015/07/14 00:47:44 | http://wrapper.tanukisoftware.com
STATUS | wrapper | 2015/07/14 00:47:44 |
STATUS | wrapper | 2015/07/14 00:47:44 | Launching a JVM...
INFO | jvm 1 | 2015/07/14 00:47:45 | WrapperManager: Initializing...
INFO | jvm 1 | 2015/07/14 00:47:46 | 2015-07-14 00:47:46.355:INFO:oejs.Server:jetty-8.1.16.v20140903
INFO | jvm 1 | 2015/07/14 00:47:46 | 2015-07-14 00:47:46.384:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8082

Anton Tananaev9 years ago

Where is the error? It looks like it works now.

wagnerd9 years ago

This line isn't a error: "00:47:46.384:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8082" ?

the service is running, but when accessing the address "http: // localhost: 8082", the browser search and search and does not stop.

I use Chrome, and on the "inspect element" appears two errors:

  • Failed to load resource: the server responded with a status of 404 (Not Found)

  • Ext-all-debug.js: 5666 [E] [Ext.Loader] Some requested files failed to load
             - .log @ Ext-all-debug.js: 5666 localhost / 1

  • Resource interpreted the Document but transferred with MIME type application / zip: "http: // localhost: 8082 /".

  • GET http: // localhost: 8082 / favicon.ico 404 (Not Found)

  • Resource interpreted the Document but transferred with MIME type application / zip: "http: // localhost: 8082 /".

wagnerd9 years ago

wrapper.log:

STATUS | wrapper | 2015/07/14 00:47:44 | --> Wrapper Started as Service
STATUS | wrapper | 2015/07/14 00:47:44 | Java Service Wrapper Community Edition 32-bit 3.5.26
STATUS | wrapper | 2015/07/14 00:47:44 | Copyright (C) 1999-2014 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper | 2015/07/14 00:47:44 | http://wrapper.tanukisoftware.com
STATUS | wrapper | 2015/07/14 00:47:44 |
STATUS | wrapper | 2015/07/14 00:47:44 | Launching a JVM...
INFO | jvm 1 | 2015/07/14 00:47:45 | WrapperManager: Initializing...
INFO | jvm 1 | 2015/07/14 00:47:46 | 2015-07-14 00:47:46.355:INFO:oejs.Server:jetty-8.1.16.v20140903
INFO | jvm 1 | 2015/07/14 00:47:46 | 2015-07-14 00:47:46.384:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8082
INFO | jvm 1 | 2015/07/14 17:09:22 | 2015-07-14 17:09:22.153:INFO:oejsh.ContextHandler:stopped o.e.j.s.ServletContextHandler{/api,null}
STATUS | wrapper | 2015/07/14 17:09:22 | <-- Wrapper Stopped

Anton Tananaev9 years ago

This line means that server has successfully started:
00:47:46.384:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8082

As for the problem, it looks like web interface files are missing or paths in the config are incorrect.