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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Thingworx Composer return HTTP Status 401 - Could not handle request

dbologna1
1-Newbie

Thingworx Composer return HTTP Status 401 - Could not handle request

Hi All,

today I installed on my PC Oracle Client 12.0 and then I uninstalled it.

After that I started Tomcat and I'm connect to Composer in local thingworx instance, the url returned the following message :

I'm not requested to enter the login/password andf the url returned the page before.

Any suggestion .. I would like to avoid to reinstall all the environment.

In case I have to reinstall  how canI restore data (stored in neo4j).

Is it possibile afther the new installation to link the old db ?

Many Thanks

BR

Dimitri

15 REPLIES 15
supandey
19-Tanzanite
(To:dbologna1)

Hi Dimitri, what's the error message in the tomcat's catalina log? is the Tomcat running while you get that error? You might want to confirm if somehow the Java settings are changed/updated for the Tomcat after you uninstalled the Oracle client.

Edit:

Could you please attach the Tomcat to your reply.

Hi Sushant,

The catalina log contain the following critical row

FO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.pa ...........

How can I restore the 'APR based Apache Tomcat Native library'  ?

Where I found these libraries and where I copy their ?

BR

Dimitri

posipova
20-Turquoise
(To:dbologna1)

Could you please post the whole contents of the log? What operating system is it?

The native lib is expected in one of the following locations:

/usr/java/packages/lib/amd64

/usr/lib64

/lib64

/lib

/usr/lib

You could download the native library appropriate to your platform here Apache Tomcat Native Library - Documentation Index

And then place it in one of the above mentioned locations.

Hi Polina,

Here is the information about installation of Thingworx on my notebook :

1) OS windows 7 Prof. 64bit

2) java jdk1.8.101 (64bit)

3) apache-tomcat-8.0.36

4) tomcat 8.0.36

BR

Dimitri

posipova
20-Turquoise
(To:dbologna1)

I don't quite understand 3&4 as it is the same thing... Do you have two tomcats installed? Could you please go to your Services and see if you only have one tomcat service running? Also, could you please share the entire catalina-out log?

posipova
20-Turquoise
(To:posipova)

And this part shows how to add native library in Windows:

Apache Tomcat Native Library - Documentation Inde

Windows

Download the Windows sources of tc-native and extract them.

Obtain the Windows sources for APR and OpenSSL. Apply the patches from native/srclib and build APR and OpenSSL for your platform (X86 or X64).

Build with

nmake -f NMAKEMakefile WITH_APR=... WITH_OPENSSL=... APR_DECLARE_STATIC=1

More detailed instructions including the steps to create a standard release distribution are provided on the Wiki.


Hi Polina,

Only one tomcat was installed.

BR

Dimitri

posipova
20-Turquoise
(To:dbologna1)

Could you please try following the steps above to manually install the native libraries in your Windows system?

Hi Poline,

in my pc there arent the Common Native build Environment.

That workaround is very complex.

Are there other workaround to restore that situation ?

BR

Dimitri

posipova
20-Turquoise
(To:dbologna1)

Are you seeing any errors in your ApplicationLog (located in ThingworxStorage/Logs) ?

posipova
20-Turquoise
(To:dbologna1)

Could you please verify that your Tomcat java path is set to (with your own java version):

Java\jre1.8.0_121\bin\server\jvm.dll

Hi Polina,

the path is correct

BR

Dimitri

Hi Polina,

Thank you very much for your support,

I'm sorry for the delay in sending you the information.

In Thingworx/logs/ApplicationLog.log there area the following rows

017-03-20 15:24:18.058+0100 [L: INFO] [O: c.t.s.ThingWorxPersistenceHandler] [I: ] [U: SuperUser] [S: ] [T: localhost-startStop-1] Default Persistence Provider Name = ThingworxPersistenceProvider

2017-03-20 15:24:18.058+0100 [L: INFO] [O: c.t.s.ThingWorxPersistenceHandler] [I: ] [U: SuperUser] [S: ] [T: localhost-startStop-1] Default Persistence Provider Package Name = H2PersistenceProviderPackage

2017-03-20 15:25:07.819+0100 [L: WARN] [O: c.m.v.r.BasicResourcePool] [I: ] [U: SuperUser] [S: ] [T: C3P0PooledConnectionPoolManager[identityToken->139rofi9m1tidp7cidmc1|669a5377]-HelperThread-#5] com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@7abac999 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:

2017-03-20 15:25:07.819+0100 [L: WARN] [O: c.m.v.r.BasicResourcePool] [I: ] [U: SuperUser] [S: ] [T: C3P0PooledConnectionPoolManager[identityToken->139rofi9m1tidp7cidmc1|669a5377]-HelperThread-#5] Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicResourcePool@70e9c33e is interrupting all Threads waiting on a resource to check out. Will try again in response to new client requests.

2017-03-20 15:25:07.835+0100 [L: ERROR] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: localhost-startStop-1] [message: Connections could not be acquired from the underlying database!]

2017-03-20 15:25:07.835+0100 [L: ERROR] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: localhost-startStop-1] *** Web Application STATE is being set to ERROR! ***

In Thingworx/logs/SecurityLog.log there area the following rows

2017-03-20 15:25:07.852+0100 [L: ERROR] [O: S.c.t.s.a.AuthenticationFilter] [I: ] [U: SuperUser] [S: ] [T: localhost-startStop-1] Could not load session timeout from database, using default: null

2017-03-20 15:25:09.026+0100 [L: ERROR] [O: S.c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-2] Could not handle request

2017-03-20 15:25:09.026+0100 [L: ERROR] [O: S.c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-1] Could not handle request

2017-03-20 15:25:09.026+0100 [L: ERROR] [O: S.c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-3] Could not handle request

2017-03-20 15:26:06.885+0100 [L: ERROR] [O: S.c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-5] Could not handle request

2017-03-20 15:26:08.850+0100 [L: ERROR] [O: S.c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-6] Could not handle request

2017-03-20 15:26:09.037+0100 [L: ERROR] [O: S.c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-7] Could not handle request

2017-03-20 15:30:34.453+0100 [L: ERROR] [O: S.c.t.s.a.AuthenticationFilter] [I: ] [U: SuperUser] [S: ] [T: localhost-startStop-1] Could not load session timeout from database, using default: null

2017-03-20 15:30:35.574+0100 [L: ERROR] [O: S.c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-1] Could not handle request

2017-03-20 15:35:12.997+0100 [L: ERROR] [O: S.c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-5] Could not handle request

2017-03-20 15:35:31.607+0100 [L: ERROR] [O: S.c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-6] Could not handle request

BR

Dimitri

posipova
20-Turquoise
(To:dbologna1)

Dimitri, is that an H2 database or Postgresql? If it's an H2 (which shows in the log error, so it should be) - please check the folder permissions are set to read/write. If it's a postgresql, please make sure the platform-settings.json file contains the proper username password.

Hi Polina, the database is H2.

I found in my PC a backup (copy)  of db datafile data.h2.db, data.lock.db,data.trace.db.

I moved the backup  into C:\ThingworxStorage\database and now the composer is working.

Many Thanks

BR

Dimitri

Top Tags