Community discussions

 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 247
Joined: Fri Apr 25, 2008 6:52 pm

Re: primary key must be unique problem UM 5.4

Thu Jul 07, 2011 4:37 pm

Hello

When trying to add a new user, and assign a profile to that user, I am constantly getting the error "error primary key must be unique".
I always have to click 5 times or more until it accepts the user and profile.

have a look at the picture.

How to fix it?

I am using the Usermanager V 5.4

P.s. I have 3 subscriber (customer with owner permission) on the same UM, each subscriber is one remote Router.
Can it be that these 3 subscribers interfere with each other and cause the problem? ( I mean maybe UM 5.4 doesn't work correctly if there are more than 1 subscribers ...)

Thanks
You do not have the required permissions to view the files attached to this post.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6616
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: primary key must be unique problem UM 5.4

Fri Jul 08, 2011 4:50 pm

Please upgrade your User Manager router to v5.5 and check for the same issue.
Make support output file if you notice the same error and send it to support (support@mikrotik.com).
 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 247
Joined: Fri Apr 25, 2008 6:52 pm

Re: primary key must be unique problem UM 5.4

Sun Jul 10, 2011 12:33 pm

Updated to UM 5.5., rebuilt the database, the problem still happens.

P.s.
In my payment records under "tool user-manager payments print", there are few payments with user=(unknown)
Is there a way how i can delete this payments records, cause maybe this is causing the problem?


I am sending you the supout.rif per email.


Thanks
You do not have the required permissions to view the files attached to this post.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4637
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: primary key must be unique problem UM 5.4

Sun Jul 10, 2011 2:49 pm

You should be able to use this:
/tool user-manager payments
print
remove X
Replace X with the line number of the payment.
 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 247
Joined: Fri Apr 25, 2008 6:52 pm

Re: primary key must be unique problem UM 5.4

Sun Jul 10, 2011 3:02 pm

You should be able to use this:
/tool user-manager payments
print
remove X
Replace X with the line number of the payment.
I tried but there is no "remove" command under payments.
I can only print, but not remove
 
SurferTim
Forum Guru
Forum Guru
Posts: 4637
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: primary key must be unique problem UM 5.4

Sun Jul 10, 2011 5:42 pm

No remove? I don't have V5.4, but I am surprised that command is gone. Did you check the available commands?
/tool user-manager payment
?
The question mark won't show. It should display a list of what commands are available.
 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 247
Joined: Fri Apr 25, 2008 6:52 pm

Re: primary key must be unique problem UM 5.4

Sun Jul 10, 2011 8:07 pm

Yes, the remove command is missing.
When i check with "?", only the following commands are available:

/tool user-manager payment>>


.. -- go up to user-manager
edit --
find -- Find items by value
get -- Gets value of item's property
print -- Print values of item properties
set -- Change item properties
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6616
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: primary key must be unique problem UM 5.4

Mon Jul 11, 2011 8:33 am

Thank you very much for support output file.
We are working on it!
 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 247
Joined: Fri Apr 25, 2008 6:52 pm

Re: primary key must be unique problem UM 5.4

Mon Jul 11, 2011 10:23 am

Thank you very much for support output file.
We are working on it!
Thanks
I am waiting for your help.
 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 247
Joined: Fri Apr 25, 2008 6:52 pm

Re: primary key must be unique problem UM 5.4

Sat Jul 16, 2011 1:19 am

Upgraded the router-board 433 firmware to latest version, rebuilt the database again, restarted the router 2 times after.

Right now the problem seems to be gone, i will still test it and report if the issue happens again.

One more question;

Until now, the user wouldn't automatically get disconnected if his session (profile has expired). I always have to manually disconnect the user via Win-box if his profile has expired and he was still connected.

Any help with that problem?

Thanks
 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 247
Joined: Fri Apr 25, 2008 6:52 pm

Re: primary key must be unique problem UM 5.4

Sun Jul 17, 2011 10:44 pm

No, it happens again!!
You do not have the required permissions to view the files attached to this post.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6616
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: primary key must be unique problem UM 5.4

Fri Jul 29, 2011 9:46 am

Please contact support to get the latest pre-release version (5.6), primary key error is fixed there.
 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 247
Joined: Fri Apr 25, 2008 6:52 pm

Re: primary key must be unique problem UM 5.4

Tue Aug 09, 2011 4:58 pm

There is another bug in the new version.

User has logged out, but the User Manager shows the user as active.

The user is not possible to log in again, because there is an error "simultaneous session limit reached".

Few hours later the user tries again to log in, but still the same error "simultaneous session limit reached".

I tried to reboot the router, rebuild the database, everything, but the User Manager still shows that the use is currently active, and he is not able to log in again.
In winbox under hotspot there is no active users of course...
The only way i could solve the problem was to delete that user, and then create the same user again.
You do not have the required permissions to view the files attached to this post.
 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 247
Joined: Fri Apr 25, 2008 6:52 pm

Re: primary key must be unique problem UM 5.4

Tue Aug 09, 2011 4:59 pm

This has happened first in the log, after that the user was not able to log-in to hotspot anymore, because user manager reported him as active, even though he was not active.
You do not have the required permissions to view the files attached to this post.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6616
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: primary key must be unique problem UM 5.4

Wed Aug 10, 2011 9:07 am

Why do you think "simultaneous session limit reached" is a bug?
Perhaps shared-user limit is reached for the particular user (multiple sessions for one username).
 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 247
Joined: Fri Apr 25, 2008 6:52 pm

Re: primary key must be unique problem UM 5.4

Wed Aug 10, 2011 10:05 am

Why do you think "simultaneous session limit reached" is a bug?
Perhaps shared-user limit is reached for the particular user (multiple sessions for one username).
I think you dint understand my case :

There are no Active sessions for that user!!!

The user is not logged in at all !!!!

There are no multiple sessions, there is no session at all!!



When he tries to log in it says "simultaneous session limit reached" .

The user manager just keeps showing that the user is still active but he is not!!

When checking via Winbox the user has last time logged out 5 hours ago and has not logged in again, also he is currently not active (of-course). But user manager just keeps saying that the user is still active, and doesn't allow him to log in.

have a look at my 2.nd screen pictuer - the user is not active!!
Just the user manager "thinks" he is still active look at the picture nr.3
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6616
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: primary key must be unique problem UM 5.4

Wed Aug 10, 2011 2:02 pm

Please contact support (support@mikrotik.com), give us remote access to User Manager and HotSpot router and point out problematic username.
 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 247
Joined: Fri Apr 25, 2008 6:52 pm

Re: primary key must be unique problem UM 5.4

Wed Aug 10, 2011 2:23 pm

Please contact support (support@mikrotik.com), give us remote access to User Manager and HotSpot router and point out problematic username.
I don't have that user anymore, cause i had to delete that user and then create it again(so that the user is able to loggin again).
But it happened already twice, the solution was to delete the user and then create it again.

One time this problem happened when on our local router the power (electricity) went down for 1 minute, and the remote router with UM database was still active.
After we had power back on our local router, the user could not login- there was error "simultaneous session limit reached".
On our local router in Winbox-Hotspot, there was shown that the user is not active.
But on the remote router under Tool-Usermanager-users-print- The user was still shown as if he was active.
An hour later the problem was still there (the UM keeps tracking the user as active even though he is not)

The problem was solved, only by deleting the user, and then recreating him again
 
boomdv
just joined
Posts: 15
Joined: Sun Aug 15, 2010 1:58 am

Re: primary key must be unique problem UM 5.4

Fri Aug 12, 2011 3:31 am

Why do you think "simultaneous session limit reached" is a bug?
Perhaps shared-user limit is reached for the particular user (multiple sessions for one username).
I think you dint understand my case :

There are no Active sessions for that user!!!

The user is not logged in at all !!!!

There are no multiple sessions, there is no session at all!!



When he tries to log in it says "simultaneous session limit reached" .

The user manager just keeps showing that the user is still active but he is not!!

When checking via Winbox the user has last time logged out 5 hours ago and has not logged in again, also he is currently not active (of-course). But user manager just keeps saying that the user is still active, and doesn't allow him to log in.

have a look at my 2.nd screen pictuer - the user is not active!!
Just the user manager "thinks" he is still active look at the picture nr.3



I had the same problem like you in ROS 5.x in two location that i used mikrotik to core router.
First, i I change the hotspot from eth X to eth Y and when i used new hotspot on this eth Y it have this problem like you.
I solved this problem by close all session in userman and clear all log.
Second, i have some profile that have shared user=3 and some profile shared user=1.And when user log in more than one mac address
It show "simultaneous session limit reached" same with you. I think the user will try to log in more than shared user you define.
I think if you use some program ex. "mac maker" it will show you at the same error.

Sorry about my english. I have a little knowledge but I hope it can help other people.Pleas change to correct if it wrong.
 
imaljko4
Member Candidate
Member Candidate
Topic Author
Posts: 247
Joined: Fri Apr 25, 2008 6:52 pm

Re: primary key must be unique problem UM 5.4

Fri Aug 12, 2011 11:19 am

I solved this problem by close all session in userman and clear all log.
Good, i didn't know that in user-manager 5 there is an option to Force/Close active session.

I found it now, i think this could help.


Thanks
 
skordan
just joined
Posts: 22
Joined: Wed Feb 02, 2005 1:13 am
Location: Poland
Contact:

Re: primary key must be unique problem UM 5.4

Sun Mar 11, 2012 11:56 pm

I have the same problem with me, but the user is disconnected mt says he is still online, I tried to set the "shared user" for "unlimited" but now I have a dozen or so active sessions on the same user, someone found a solution?
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: No registered users and 7 guests