Web GUI: 404 - Not Found from one day to another

Felix Bühler2 years ago

Okay, under /opt/traccar there is no web folder. I have a watchtower watching the container, so I think it got updated. But why is the web folder then not created?
What else do you need as information? MariaDB version?
Don't know what information about the setup is crucial to this.

Anton Tananaev2 years ago

There is no web folder anymore. We split it, so it's correct that it's not there.

How are you using MariaDB with no changes to the config files?

Felix Bühler2 years ago

Oh, misunderstanding there. I did change my default config file. I thought you were talking about changes before it didn't work anymore.
That's my config:

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

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

<properties>

<entry key='config.default'>/opt/traccar/conf/default.xml</entry>



<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://xxx/traccar?serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
<entry key='database.user'>traccar</entry>
<entry key='database.password'>xxx</entry>



<entry key='mail.smtp.host'>xxx</entry>
<entry key='mail.smtp.port'>587</entry>
<entry key='mail.smtp.starttls.enable'>true</entry>
<entry key='mail.smtp.ssl.protocols'>TLSv1.2</entry>
<entry key='mail.smtp.from'>xxx</entry>
<entry key='mail.smtp.auth'>true</entry>
<entry key='mail.smtp.username'>xxx</entry>
<entry key='mail.smtp.password'>xxx</entry>

  

<entry key='server.statistics'>false</entry>
<entry key='filter.enable'>true</entry>
<entry key='filter.duplicate'>true</entry>
<entry key='filter.zero'>true</entry>
<entry key='logger.enable'>true</entry>
<entry key='processing.remoteAddress.enable'>true</entry>
<entry key='coordinates.filter'>true</entry>
<entry key='coordinates.minError'>15</entry>

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

<entry key='report.trip.minimalTripDistance'>500</entry>
<entry key='report.trip.minimalTripDuration'>60</entry>
<entry key='report.trip.minimalParkingDuration'>180</entry>
<entry key='report.trip.minimalNoDataDuration'>600</entry>

<entry key='event.overspeed.notRepeat'>true</entry>


 
<entry key='geocoder.ignorePositions'>true</entry>
<entry key='geocoder.onRequest'>true</entry> 
<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.format'>%r %h, %p %t, %c</entry>
<entry key='geocoder.type'>opencage</entry>
<entry key='geocoder.url'>http://api.opencagedata.com/geocode/v1</entry>
<entry key='geocoder.key'>xxx</entry>

</properties>
Anton Tananaev2 years ago

Can you also post default.xml?

ontheair2 years ago

Just for the record: I updated my Docker version (on a regular Debian server) to the latest release, since then I have the same problem, with Traccar is not accesible anymore.

@Felix Bühler: Any chance that your system did a Docker update automatically?

Felix Bühler2 years ago

I got it: I replaced my default.xml in my conf folder mount with the new one from github. Now it's working.
I now changed the folder mount to a file mount, so that only the traccar.xml is mounted and not the whole folder with the default.xml in it.
This way, the default.xml should always be the newest version, right?

Below is the content from my old default.xml
Interesting tho, what line exactly caused the error.

@ontheair: Yes, my watchtower did update my docker container.

<?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.enable'>true</entry>
    <entry key='web.port'>8082</entry>
    <entry key='web.path'>./web</entry>
    <entry key='web.cacheControl'>max-age=3600,public</entry>
    <entry key='web.healthCheck'>true</entry>

    <entry key='geocoder.enable'>false</entry>
    <entry key='geocoder.type'>google</entry>

    <entry key='logger.enable'>true</entry>
    <entry key='logger.level'>info</entry>
    <entry key='logger.file'>./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.enable'>true</entry>
    <entry key='event.ignoreDuplicateAlerts'>true</entry>
    <entry key='processing.computedAttributes.enable'>true</entry>
    <entry key='processing.engineHours.enable'>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.generateQueries'>true</entry>
    <entry key='database.changelog'>./schema/changelog-master.xml</entry>
 
    <entry key='database.loginUser'>
        SELECT * FROM tc_users
        WHERE email = :email OR login = :email
    </entry>

    <entry key='database.selectPositions'>
        SELECT * FROM tc_positions WHERE deviceId = :deviceId AND fixTime BETWEEN :from AND :to ORDER BY fixTime
    </entry>

    <entry key='database.selectLatestPositions'>
        SELECT tc_positions.* FROM tc_positions INNER JOIN tc_devices ON tc_positions.id = tc_devices.positionid;
    </entry>

    <entry key='database.updateLatestPosition'>
        UPDATE tc_devices SET positionId = :id WHERE id = :deviceId
    </entry>

    <entry key='database.selectEvents'>
        SELECT * FROM tc_events WHERE deviceId = :deviceId AND serverTime BETWEEN :from AND :to ORDER BY serverTime
    </entry>

    <entry key='database.deletePositions'>
        DELETE FROM tc_positions WHERE serverTime &lt; :serverTime AND id NOT IN (SELECT positionId FROM tc_devices WHERE positionId IS NOT NULL)
    </entry>

    <entry key='database.deleteEvents'>
        DELETE FROM tc_events WHERE serverTime &lt; :serverTime
    </entry>

    <entry key='database.selectStatistics'>
        SELECT * FROM tc_statistics WHERE captureTime BETWEEN :from AND :to ORDER BY captureTime
    </entry>
   <entry key='gps103.port'>5001</entry>
    ...
    <entry key='portman.port'>5211</entry>

 
</properties>
Felix Bühler2 years ago

For some reason, I can't answer with my other account anymore, i always get the notification "Error: Too many requests".

Anton Tananaev2 years ago

Why would you copy over an old default.xml? Even the warning doesn't bother you?

DO NOT MODIFY THIS FILE.

Felix Bühler2 years ago

I installed traccar from a manual in the web, i which a default.xml came in a conf folder. I never really thought about it. But it works now.
Sorry for the circumstances and thank you, for your help!

Anton Tananaev2 years ago

Which manual? Do you have a link? Because if someone tells to use an old config file, it is incorrect. It will cause issues again and again.

Felix Bühler2 years ago
Anton Tananaev2 years ago

OK, I emails to see if they can update the guide.

But I asked from the beginning if any config files were changed.

Felix Bühler2 years ago

Yes, I'm sorry. I misunderstood you there. I thought you asked if i changed any config files shortly before my error occured.

Roland2 years ago

Hallo when I read this post I find me in a similar situation.
I tried to update from 5.1 to 5.3. It works fine for some time and from one moment to the other I had the situation with 404.
My only way back to a running Traccar server was restoring backup of the database and install 5.1.
Even going back to 5.1 without restoring the backup of my database did not help.
Either deleting the content and the tables in the database or restoring the backup helped me to come back to a running 5.1.
Traccar ist running here on a Synology in a docker container. I did not change anything in config files.

Felix Bühler2 years ago

hey roland, do you have a folder mount with the default.xml in it?