Invalid Parameter or Constraint violation

Tabitha Christian 8 years ago

Dear ,
I have successfully installe the traccar server, but when I try to add the device, am keeping receiving this message while trying to add a device.

Unique index or primary key violation: "UK_DEVICE_UNIQUEID_INDEX_B ON PUBLIC.DEVICES(UNIQUEID) VALUES ('522565', 3)"; SQL statement:
INSERT INTO devices (phone, contact, groupId, uniqueId, attributes, model, lastUpdate, category, name) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [23505-196] - JdbcSQLException (... < QueryBuilder:477 < DataManager:455 < BaseObjectManager:87 < ...)
Five 8 years ago

I think it is because the device identifier already exists.

Tabitha Christian 8 years ago

No! this is while adding a new device. and when trying to connect to traccar using the server public address. with local host everything works fine, but can't reach the server while out of office

Anton Tananaev 8 years ago

Why are you saying no when it's exactly what's happening.

Tabitha Christian 8 years ago

You are right,
I remember those devices where add by me. but when I lost the passord, i have to register again, after registration i couldn't find any devices on my dashbord and i have to add them for one more time... that's where the error message is coming from.... so how can i recover my previous password or remove the devices from the server and add them back?

Anton Tananaev 8 years ago

You need to login as admin and assign existing devices to your new account, or reset password on your old account.

Vladimir Rybinsky 7 years ago

I got similar errorcode today while changing user (admin) default record - set default coordinates

Unique index or primary key violation: "CONSTRAINT_INDEX_9 ON PUBLIC.TC_USERS(EMAIL) VALUES ('xxxxx@yyyy.ru', 2)"; SQL statement:
UPDATE tc_users SET limitCommands = ?, expirationTime = ?, phone = ?, zoom = ?, token = ?, login = ?, disabled = ?....

Any ideas?

Vladimir Rybinsky 7 years ago

While adding attributes to admin user (default speed format km/h) also getting this error :(