cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot login to Thingworx

AViñeta
7-Bedrock

Cannot login to Thingworx

I suddenly cannot login in Thingworx for no aparent reason, I have checked de logs and this is what I found: 

The first one is from a previous attempt, there was a password entered since this was not a first attempt and my first reaction was to make sure i had entered the password and try again. The second one  is from the latest attempt. I don't know why the log is different

[L: WARN] [O: S.c.t.s.a.AuthenticationUtilities] [I: ] [U: ???] [S: ] [P: ] [T: https-openssl-nio-8443-exec-6] Authentication FAILED for [user = Administrator] using [directory service = ThingWorxDirectoryService] : Cannot Login Using ThingWorx Authentication With an Empty Password
[L: ERROR] [O: S.c.t.s.a.AuthenticationFilter] [I: ] [U: ???] [S: ] [P: ] [T: https-openssl-nio-8443-exec-4] Authentication failed: Please make sure the credentials are correct.

 I have also tried accesing via REST API to check that the system is healthy, which as far as I could see it was, at least the UserManagementSubsystem, but the appKey tied to the admin I am using is only working intermittently, sometimes it works, others it says it is an expired key. 

[L: WARN] [O: S.c.t.s.a.ThingworxAppKeyAuthenticator] [I: ] [U: ???] [S: ] [P: ] [T: https-openssl-nio-8443-exec-6] AppKey [KepwareKey] has expired
[L: ERROR] [O: S.c.t.s.a.AuthenticationFilter] [I: ] [U: ???] [S: ] [P: ] [T: https-openssl-nio-8443-exec-6] No authType or appKey parameter has been specified for Authentication Scheme: AUTH_THINGWORX_APPKEY

I am at a  loss and I would appreciate some help.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

First of all, I'd try to find out what's going on with the system. The case when password for some reason becomes changed, so you can't login, is one thing, and the case when the password is valid and something wrong is going on with ThingWorx is another story.

 

Given that system is up and running correctly and you just need to reset password, you can try the following...

1) If you manage to get your appKey to work, you can reset Administrator's password via REST API:

https://community.ptc.com/t5/IoT-Tech-Tips/How-to-reset-Password-for-users-using-Administrator-Appke...

 

2) If you don't have the appKey with admin privileges, you'd have to reset Administrator's password, and, as far as I'm aware, there is no supported way to reset it without reinstalling ThingWorx.

There is a (quite old) topic with a workaround, but it's not a supported / recommended way and has some DB-related limitations.

https://community.ptc.com/t5/ThingWorx-Developers/How-to-recover-localhost-password-of-thingworx-com...

 

I'm quite sure you already did it, but, just in case... Simply restarting ThingWorx doesn't resolve the issue?

View solution in original post

10 REPLIES 10
bchaudhary
14-Alexandrite
(To:AViñeta)

Hello @AViñeta ,

 

pls verify whether the password have any speial characters:

https://www.ptc.com/en/support/article/cs253829

 

Kindly go through the above link.

Regards

Bhawna

The password doesn't have any special character. It is a development environment hosted in a local network wich needs either a physical connection or a configured vpn so we are not overly concerned with security in the platform itself in this installation. I forgot to mention in the original post but i have tried a couple accounts in different computers before and after resetting the server with the same results

In other news I have imported the project I was working on in another Thingworx installation in a different machine and it stopped working as well. Same error

2022-05-18 14:59:38.793+0000 [L: WARN] [O: S.c.t.s.a.AuthenticationUtilities] [I: ] [U: ] [S: ] [P: ] [T: https-openssl-nio-8443-exec-9] Authentication FAILED for [user = Administrator] using [directory service = ThingWorxDirectoryService] : Cannot Login Using ThingWorx Authentication With an Empty Password

2022-05-18 14:59:38.803+0000 [L: ERROR] [O: S.c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [P: ] [T: https-openssl-nio-8443-exec-9] Authentication failed: Please make sure the credentials are correct.

 

That narrows down the issue to something I did without realizing or a possible bug int Thingworx itself. Hopefully the first as it is something I might be able fix via API, but I am completely lost. I can provide the applications logs if required

Good to have it narrowed down to this. Hard to suggest something without knowing some details about your project.

 

What entities are there in the project? Just a wild guess - isn't Administrator user there?

Does authentication stop working right after importing the project, or after you do something, like run some service from your project?

 

If you can share the project (i.e. there is nothing private there), I could take a look and willing to break a sandbox or two on my side

I wouldn't know if its just importing or running a service since i don't have more thingworx instances to try with, although none of my services interact with the authenticators or users. As for sharing the project I will have to clear it with my boss, not entirely sure I will be able to although it would be a huge help, thank you

First of all, I'd try to find out what's going on with the system. The case when password for some reason becomes changed, so you can't login, is one thing, and the case when the password is valid and something wrong is going on with ThingWorx is another story.

 

Given that system is up and running correctly and you just need to reset password, you can try the following...

1) If you manage to get your appKey to work, you can reset Administrator's password via REST API:

https://community.ptc.com/t5/IoT-Tech-Tips/How-to-reset-Password-for-users-using-Administrator-Appke...

 

2) If you don't have the appKey with admin privileges, you'd have to reset Administrator's password, and, as far as I'm aware, there is no supported way to reset it without reinstalling ThingWorx.

There is a (quite old) topic with a workaround, but it's not a supported / recommended way and has some DB-related limitations.

https://community.ptc.com/t5/ThingWorx-Developers/How-to-recover-localhost-password-of-thingworx-com...

 

I'm quite sure you already did it, but, just in case... Simply restarting ThingWorx doesn't resolve the issue?

Don't know how i missed but resetting the password worked via API worked thanks a lot!

I have been to confirm that importing from source control entities breaks the password, I think it clears the password attribute for the users 

For anyone interested I have been able to find out what the issue was. Essentially I mistakenly ended up exporting the entire platform instead of the project as I intended which included all users, including the admin and since passwords are specifically not exported it wiped all passwords. Fun times.

Thanks for this, @AViñeta .

I really love when people write such kinds of postmortems after the problem is resolved. This often saves some hours to other guys who encounter similar issues later.

 

Not to mention that after curing the symptom / finding the workaround with resetting the password, you still dedicated some efforts to find the root cause, Thumbs up for this, way to go!

 

The cause of the issue on the "primary" platform is still unknown, though, if I understand correctly?

The in the "primary" platform was importing from that source control which deleted all passwords, so same problem everywhere: wrong exports

Announcements