Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STATUS and Address problem #439

Closed
leontino opened this issue Dec 31, 2015 · 11 comments
Closed

STATUS and Address problem #439

leontino opened this issue Dec 31, 2015 · 11 comments

Comments

@leontino
Copy link

Hello, my traccar show me this error on tracker log.
2015-12-31 01:44:25 WARN: Unknown column 'status' in 'field list' - MySQLSyntaxErrorException (... < QueryBuilder:431 < DataManager:256 < ConnectionManager:110 < ...)

and my devices don't show the address.

Traccar version: 3.3

Thanks

@ghost
Copy link

ghost commented Dec 31, 2015

Hello,

For addresse NOT display....
same problem but Traccar3.3

@gsiotas
Copy link
Contributor

gsiotas commented Feb 10, 2016

About the status problem after updating to traccar 3.3 I got the same error. After fiddling with the traccar.xml I think maybe the query in the updateDeviceStatus entry should change. I am talking about this one:

UPDATE devices SET status = :status, lastUpdate = :lastUpdate WHERE id = :id;

For the meantime I have commented it, but I still get a relevant warning message in the log files:

WARN: Query was empty - MySQLSyntaxErrorException (... < QueryBuilder:431 < DataManager:256 < ConnectionManager:110 < ...)

Edit: I am using traccer web 0.10.3

@vitalidze
Copy link
Owner

This query is not yet supported, i.e. there are no status and lastUpdate columns in the devices table yet. The warning can be safely ignored or you can remove/comment out the status update query if the warning bothers you.

@PascalVD
Copy link

i use the last Android client and last server version and i see no location of all my devices ...
can you help to find the problem ?

@peptoni
Copy link

peptoni commented Apr 7, 2016

Do we have info about the 'status' column? Could we just add the field to the table...? It's annoying to have error messages in the log every couple of seconds. It does not help to find other errors and clogs the server available space (I'm on a EC2 server, with limited disk space).

@vitalidze
Copy link
Owner

@peptoni you can either add column of following type:

<column name="status" type="VARCHAR(128)" />

Or just comment out the updateStatus query in traccar.xml:

    <!-- entry key='database.updateDeviceStatus'>
        UPDATE devices SET status = :status, lastUpdate = :lastUpdate WHERE id = :id;
    </entry -->

In future I think it's worth to have such column in the web UI mod.

@peptoni
Copy link

peptoni commented Apr 7, 2016

Thank you. I also had to add column "lastUpdate" as TIMESTAMP. Now all errors have gone.

@peptoni
Copy link

peptoni commented Apr 7, 2016

Shit... lastUpdate initializes as not null... And I get this error:
WARN: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp - SQLException (... < QueryBuilder:346 < *:409 < DataManager:231 < *:118 < *:138 < BaseProtocolDecoder:47 < ...)

@peptoni
Copy link

peptoni commented Apr 7, 2016

Ok. I solved doing this:
ALTER TABLE devices ADD lastUpdate DATETIME DEFAULT NULL;

Now it's working.

@peptoni
Copy link

peptoni commented Apr 7, 2016

So, the complete thing goes here:

msql -u USER -pPASSWORD
use TRACCAR;
ALTER TABLE devices ADD lastUpdate DATETIME DEFAULT NULL;
ALTER TABLE devices ADD status VARCHAR(128);
quit

@vitalidze
Copy link
Owner

Fixed, written news, updated latest and demo versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants