Error when building gradle project (non-zero exit value 1)

Anton Tananaev2 years ago

What version of IntelliJ are you using? Maybe you can provide a screen recording of the configuration and running the server.

Cris Amende2 years ago

Using Intellij 2022-3 (But tried on ealier versions as well, resulted in the same error)

This is the default.xml (Pretty much the standard, except for the logger file location, I did also attempt to add the logger file location in the traccar.xml file, but this had the same result)
Also, there is a log file (named tracker-server.log) in the logs directory as specified in the default.xml, this is copied from an existing server running a testing instance of traccar 5.5.

I can look at creating a screen video and adding that (if it helps)

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>

<properties>

    <!--

    DO NOT MODIFY THIS FILE. Use traccar.xml instead.

    -->

    <entry key='web.port'>8082</entry>
    <entry key='web.path'>./modern</entry>
    <entry key='web.sanitize'>false</entry>
    <entry key='web.persistSession'>false</entry>

    <entry key='geocoder.enable'>true</entry>
    <entry key='geocoder.type'>nominatim</entry>
    <entry key='geocoder.url'>https://us1.locationiq.com/v1/reverse.php</entry>
    <entry key='geocoder.key'>pk.689d849289c8c63708068b2ff1f63b2d</entry>
    <entry key='geocoder.onRequest'>true</entry>
    <entry key='geocoder.ignorePositions'>true</entry>

    <entry key='logger.level'>info</entry>
    <entry key='logger.file'>C:\Users\cris\Downloads\tbuild\logs\tracker-server.log</entry>
    <entry key='logger.rotate'>true</entry>

    <entry key='filter.enable'>true</entry>
    <entry key='filter.future'>86400</entry>

    <entry key='event.ignoreDuplicateAlerts'>true</entry>

    <entry key='media.path'>./media</entry>

    <entry key='notificator.types'>web,mail</entry>

    <entry key='server.statistics'>https://www.traccar.org/analytics/</entry>

    <entry key='commands.queueing'>true</entry>

    <entry key='database.ignoreUnknown'>true</entry>
    <entry key='database.changelog'>./schema/changelog-master.xml</entry>

    <entry key='gps103.port'>5001</entry>
...
    <entry key='rftrack.port'>5245</entry>

</properties>
Cris Amende2 years ago

Here's the video of running the project.

Video

Anton Tananaev2 years ago

Why are you pointing it to the default.xml? That's wrong.

Cris Amende2 years ago

ok, was not aware of that, finally managed to get the back end server running. (Despite the warning that the port is in use, which it is not, as verified by netstat...)

While working on windows , I also needed to change the linebreak-style.js from "unix", "windows" to "windows", "unix" as I got all sorts of linebreak errors when running npm start.

Now the backend server runs and npm start runs, there is an approachable website on port 8082 (legacy version) but it seems that the modern version has a proxy to be diverted to 3000, is there any way to change that port, as 3000 is already in use on my system.

PS C:\traccar\traccar-web\modern> npm start

> traccar5.5.0 start (manually removed the 'at' sign)
> react-scripts start

[HPM] Proxy created: /api/socket  -> ws://localhost:8082
[HPM] Proxy created: /api  -> http://localhost:8082
(node:21) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
(node:21) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
Starting the development server...
Compiled successfully!

You can now view traccar in the browser.

  Local:            http://localhost:3000
  On Your Network:  http://192.168.110.33:3000

Note that the development build is not optimized.
To create a production build, use npm run build.

webpack compiled successfully
Anton Tananaev2 years ago

Check Create React App documentation for that. There must be a way to change the port.