WebLogic Console - No application files exist when redeploying application - java

When stopping/starting a deployment via the WebLogic Admin console, sometimes we get the following error:
Unable to access application source information in '/opt/product/oracle/local/managedservers/mydomain/servers/serverA/stage/apputil/apputil.war'
for application 'apputil’.
The specific error is: [Deployer:149158] No application files
exist at '/opt/product/oracle/local/managedservers/mydomain/servers/serverA/stage/apputil/apputil.war'
Yet, if I stop and start the managed server, the deployment appears to come back.
My question is, WHY do these war files disappear from the managed server seemingly randomly, while the server is running? This typically happens after we haven't touched a deployment for some time (6 months). Other war files for other deployments are there. It does not affect the running of the app, until we try to stop/start it.
This is what the filesystem looks like before and after.
[oracle#serverA stage]$ pwd;ls -alstr
/opt/product/oracle/local/managedservers/mydomain/servers/serverA/stage
total 20
4 drwxr-x--- 8 oracle dba 4096 Mar 19 2014 ..
4 drwxr----- 3 oracle dba 4096 Mar 19 2014 app-crypto-util
4 drwxr----- 2 oracle dba 4096 Mar 19 2014 appadmin
4 drwxr----- 2 oracle dba 4096 Mar 19 2014 appsm
4 drwxr----- 5 oracle dba 4096 May 1 15:29 .
[oracle#serverA stage]$ ls
appadmin app-crypto-util appsm
Restart managed server here...
[oracle#serverA stage]$ ls
appdmin app-crypto-util appsm apputil
[oracle#serverA stage]$ ls -alstr
total 24
4 drwxr-x--- 8 oracle dba 4096 Mar 19 2014 ..
4 drwxr----- 3 oracle dba 4096 Mar 19 2014 app-crypto-util
4 drwxr----- 2 oracle dba 4096 Mar 19 2014 appadmin
4 drwxr----- 2 oracle dba 4096 Mar 19 2014 appsm
4 drwxr----- 2 oracle dba 4096 Jun 25 14:35 apputil
4 drwxr----- 6 oracle dba 4096 Jun 25 14:35 .
[oracle#serverA stage]$ ls -alstr apputil/apputil.war
28660 -rw-r----- 1 oracle dba 29347298 Jun 25 14:35 apputil/apputil.war

This may happen when AdminServer & Managed Server are in different machines, or the war is being sent from a different machine to AS.
use arguments: -remote -upload
i.e.:
java weblogic.Deployer -adminurl t3://200.10.10.125:7001 -verbose -username weblogic -password welcome1 -deploy -targets WLCluster -name sample -remote -source sample.war -upload

Referring to the stage directory modification date, it appears this dir is created/edited when an event occur, maybe by a script, and if it is the case, the problem should come from that script when copying apps wars.
So in my POV when stopping a deployment, maybe weblogic stop the apputil managed server, wich delete the war from th stage dir, and when starting a deployment after stopping it, it does not start the specified managed server before, and try to redeploy all apps wich cause the exception.

Related

Using tcnative module on AIX for HTTP2 on Tomcat

Has anyone successfully got the HTTP/2 connector working in Tomcat9 on AIX (e.g. powerpc-ibm-aix7.2.5.0)?
I followed the instructions here to build the tcnative module (using tomcat-native-1.2.24-src that comes with Tomcat 9.0.37, APR 1.5.2, OpenSSL 1.0.2, IBM Java 1.8.0_261) i.e.
$ ./configure --with-apr=/opt/freeware/bin/apr-1-config --with-java-home=/app/java8_64/ --with-ssl=yes --prefix=/app/tomcat
followed by
make && make install
This creates the expected entries in /app/tomcat/lib, i.e.
-rw-r--r-- 1 usrxxx grpxxxx 3440287 Mar 03 16:47 libtcnative-1.a
-rwxr-xr-x 1 usrxxx grpxxxx 1057 Mar 03 16:47 libtcnative-1.la
lrwxrwxrwx 1 usrxxx grpxxxx 23 Mar 03 16:47 libtcnative-1.so -> libtcnative-1.so.0.2.24
lrwxrwxrwx 1 usrxxx grpxxxx 23 Mar 03 16:47 libtcnative-1.so.0 -> libtcnative-1.so.0.2.24
-rwxr-xr-x 1 usrxxx grpxxxx 1372146 Mar 03 16:47 libtcnative-1.so.0.2.24
but when Tomcat starts I get
04-Mar-2021 15:30:00.752 WARNING [main] org.apache.catalina.core.AprLifecycleListener.init The Apache Tomcat Native library failed to load. The error reported was [tcnative-1 (Not found in java.library.path)]
java.lang.UnsatisfiedLinkError: tcnative-1 (Not found in java.library.path)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1462)
at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:1414)
at java.lang.System.loadLibrary(System.java:584)
at org.apache.tomcat.jni.Library.<init>(Library.java:69)
at org.apache.tomcat.jni.Library.initialize(Library.java:206)
at org.apache.catalina.core.AprLifecycleListener.init(AprLifecycleListener.java:198)
...
04-Mar-2021 15:30:01.096 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.library.path=/app/java8_64/jre/lib/ppc64/compressedrefs:/app/java8_64/jre/lib/ppc64:/app/java8_64/jre/lib/ppc64/j9vm:/app/java8_64/jre/lib/ppc64:/app/java8_64/jre/../lib/ppc64:/app/java8_64/jre/lib/icc:/opt/freeware/lib:/opt/freeware/lib64:/usr/lib:/usr/lib64:/app/tomcat/lib:/usr/lib64:/usr/lib
...
04-Mar-2021 15:30:02.233 SEVERE [main] org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to initialize component [Connector[org.apache.coyote.http11.Http11AprProtocol-8443]] org.apache.catalina.LifecycleException: The configured protocol [org.apache.coyote.http11.Http11AprProtocol] requires the APR/native library which is not available
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1024)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:533)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1057)
Edit - based on suggestions from Piotr and Lorinczy:
Tried adding tcnative-1.so as a symlink - same error
Copied libtcnative-1.* to the bin folder. Still failing but new error (progress!?). Possible 32bit v 64bit issue?
09-Mar-2021 10:10:07.116 WARNING [main] org.apache.catalina.core.AprLifecycleListener.init The Apache Tomcat Native library failed to load. The error reported was [/app/apache-tomcat-9.0.37/bin/libtcnative-1.a ( 0509-022 Cannot load module /app/apache-tomcat-9.0.37/bin/libtcnative-1.a.
0509-026 System error: Cannot run a file that does not have a valid format.)]
java.lang.UnsatisfiedLinkError: /app/apache-tomcat-9.0.37/bin/libtcnative-1.a ( 0509-022 Cannot load module /app/apache-tomcat-9.0.37/bin/libtcnative-1.a.
0509-026 System error: Cannot run a file that does not have a valid format.)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1462)
...
All the dependencies seem to be available
$ldd libtcnative-1.so.0.2.24
libtcnative-1.so.0.2.24 needs:
/usr/lib/libssl.so
/usr/lib/libcrypto.so
/opt/freeware/lib/libapr-1.so
/usr/lib/libpthread.a(shr_xpg5.o)
/usr/lib/libc.a(shr.o)
/opt/freeware/lib/libgcc_s.a(shr.o)
/usr/lib/libcrypto.a(libcrypto.so.1.0.2)
/unix
/usr/lib/libpthreads.a(shr_comm.o)
/usr/lib/libcrypt.a(shr.o)
but the dump command seems to support the 32 v 64 bit theory:
$ dump -H -X64 libtcnative-1.so.0.2.24
libtcnative-1.so.0.2.24:
dump: libtcnative-1.so.0.2.24: 0654-108 file is not valid in the current object file mode.
Use the -X option to specify the desired object mode.
$ dump -H -X32 libtcnative-1.so.0.2.24
libtcnative-1.so.0.2.24:
***Loader Section***
Loader Header Information
VERSION# #SYMtableENT #RELOCent LENidSTR
0x00000001 0x00000364 0x00000771 0x00000084
#IMPfilID OFFidSTR LENstrTBL OFFstrTBL
0x00000007 0x0000aacc 0x00006406 0x0000ab50
***Import File Strings***
INDEX PATH BASE MEMBER
0 /opt/freeware/lib:/usr/lib:/lib
1 libssl.so
2 libcrypto.so
3 libapr-1.so
4 libpthread.a shr_xpg5.o
5 libc.a shr.o
6 libgcc_s.a shr.o
It looks like only the 32-bit version of APR is currently available on the server also. I will update once I can get the 64-bit version installed.
Further Updates
The commands I am trying now are:
$ export CFLAGS=-maix64
$ export OBJECT_MODE=64
$ ./configure --with-apr=/opt/freeware/bin/apr-1-config_64 --with-java-home=/app/java8_64/ --with-ssl=/usr/include/openssl --prefix=/app/tomcat
$ make && make install
No errors but same outcome however. This doesn't seem to build a 64 bit version of the tomcat native module (if that is the issue).

Connect to a MS Access database secured with a Workgroup security file (MDW) using UCanAccess

I am using UCanAccess driver to connect to an MS Access database without security from Knime software. Now, I need to do the same connection but with a MS Access DB (MDB file) secured by a workgroup security file (MDW).
Anyone knows how to do this using UCanAccess? or maybe using another driver?
When I connect to that database from Power BI, I use an odbc connector with the following url
jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\bsc_uob\Indicadores_UOB_cliente.mdb;SystemDB=C:\bsc_uob\Seguridad.mdw;
But i cannot use odbc driver in knime.
I need something similar for UCanAccess. I tried to do this:
jdbc:ucanaccess://C:\bsc_uob\Indicadores_UOB_cliente.mdb;SystemDB=C:\bsc_uob\Seguridad.mdw
But I got this error:
ERROR Database Connector 0:20 Execute failed: Could not create connection to database: Decoding not supported. Please choose a CodecProvider which supports reading the current database encoding.
I don't have Knime, but I was able to apply the following steps to have LibreOffice Base open an Access .mdb file that was protected with user-level security (ULS).
First, I used the instructions here to do a normal setup of UCanAccess and LibreOffice Base. I verified that I could open an Access database file that was not ULS-protected.
Then I added the following three (3) JAR files to the UCanAccess lib\ folder:
jackcess-encrypt-2.1.4.jar (available here)
bcprov-jdk15on-1.52.jar (available here)
CryptCodecOpener.jar (available here)
so it contained
gord#gord-dv7-xubuntu0:~$ ll Downloads/JDBC/UCanAccess/lib
total 5580
drwxrwxr-x 2 gord gord 4096 Jan 17 05:54 ./
drwxrwxr-x 5 gord gord 4096 Jan 17 05:38 ../
-rw-rw---- 1 gord gord 2902942 Dec 1 2017 bcprov-jdk15on-1.52.jar
-rw-rw---- 1 gord gord 284220 Nov 16 2013 commons-lang-2.6.jar
-rw-rw---- 1 gord gord 62050 Sep 22 2015 commons-logging-1.1.3.jar
-rw-rw---- 1 gord gord 1146 Jan 16 17:40 CryptCodecOpener.jar
-rw-rw---- 1 gord gord 1467326 Oct 8 2013 hsqldb.jar
-rw-rw---- 1 gord gord 882908 Mar 10 2018 jackcess-2.1.11.jar
-rw-rw---- 1 gord gord 86730 Dec 1 2017 jackcess-encrypt-2.1.4.jar
Then I added ;jackcessOpener=com.gordthompson.ucanaccess.crypto.CryptCodecOpener to my connection URL so it became
jdbc:ucanaccess:///home/gord/Documents/protected.mdb;jackcessOpener=com.gordthompson.ucanaccess.crypto.CryptCodecOpener
and I could open a ULS-protected .mdb file.

Permanently remove Pivotal tc from STS

I am using STS since a long time and the only feature annoys me is, it creates a new Pivotal tc Server instance in every workspace created and I never use Pivotal tc.
Can anyone tell me how to completely remove Pivotal tc Server from STS installation?
I have tried to update the artifacts.xml file, bundles.info (equinox) and bluntly deleting the features for Pivotal tc but I've never got clean result.
Once you unzipped the distribution it should have a folder with tc-server in it. Simply delete that entire folder and STS will no longer try and create a tc-server install in your workspace.
For example in my installation it looks like this:
$ ls -la sts-bundle/
total 20
drwxrwxr-x 5 kdvolder kdvolder 4096 Oct 12 05:47 .
drwxr-xr-x 23 kdvolder kdvolder 4096 Nov 6 14:43 ..
drwxr-xr-x 2 kdvolder kdvolder 4096 Oct 11 04:03 legal
drwxr-xr-x 11 kdvolder kdvolder 4096 Oct 13 07:56 pivotal-tc-server-developer-3.2.8.RELEASE
drwxr-xr-x 9 kdvolder kdvolder 4096 Nov 3 15:41 sts-3.9.1.RELEASE
So simply delete the folder pivotal-tc-server-developer-3.2.8.RELEASE.

how to change tomcat from generating daily catalina logs as root user/group

I would like to change the logs generated by tomcat as another user/group. Currently it is generating as root user and group. where can i make this configuration?
example
-rw-r--r-- 1 root root 16056 Sep 15 09:06 catalina.2015-09-15.log
would like it to be
-rw-r--r-- 1 tomcat tomcat 16056 Sep 15 09:06 catalina.2015-09-15.log

How to fix several (permission related) exceptions with Lift and Jetty?

I'm trying to deploy a small Lift webapp to a Jetty container but I get several exceptions. I pasted a small excerpt of the stack trace below. I can provide the full stack trace if needed. I goggled all three problems but I couldn't find anything useful to solve it.
I created my app.war file in sbt with the package command and just dropped the web archive inside Jetty webapps folder.
~$ whereis jetty8
jetty8: /etc/jetty8 /usr/share/jetty8
~$ ls -al /usr/share/jetty8/
total 16
drwxr-xr-x 4 root root 4096 Feb 28 13:25 .
drwxr-xr-x 107 root root 4096 Feb 28 16:12 ..
lrwxrwxrwx 1 root root 20 Jul 30 2013 contexts -> /etc/jetty8/contexts
lrwxrwxrwx 1 root root 11 Jul 30 2013 etc -> /etc/jetty8
lrwxrwxrwx 1 root root 25 Jul 30 2013 javadoc -> ../doc/libjetty8-java/api
drwxr-xr-x 3 root root 4096 Feb 28 13:25 lib
lrwxrwxrwx 1 root root 15 Jul 30 2013 logs -> /var/log/jetty8
drwxr-xr-x 2 root root 4096 Feb 28 13:25 resources
lrwxrwxrwx 1 root root 40 Jul 30 2013 start.jar -> ../java/jetty8-start-8.1.3.v20120416.jar
lrwxrwxrwx 1 root root 23 Jul 30 2013 webapps -> /var/lib/jetty8/webapps
I'm using Scala 2.10.3, Lift 2.6-M2, SBT 0.13.1, Jetty 8.1.3.v20120416 and Java 8 on Linaro Ubuntu Server 13.10.
Stacktrace[excerpt]:
ERROR in ch.qos.logback.core.FileAppender[FILE] - openFile(console.devmode.log,true) call failed. java.io.FileNotFoundException: console.devmode.log (Permission denied)
at java.io.FileNotFoundException: console.devmode.log (Permission denied)
at at java.io.FileOutputStream.open(Native Method)
ERROR net.liftweb.db.StandardDBVendor - Unable to get database connection. url=jdbc:h2:lift_proto.db;AUTO_SERVER=TRUE
org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.FileNotFoundException: /usr/share/jetty8/lift_proto.db.lock.db (Permission denied)"; "/usr/share/jetty8/lift_proto.db.lock.db" [90031-167]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) ~[h2-1.3.167.jar:1.3.167]
at org.h2.message.DbException.get(DbException.java:158) ~[h2-1.3.167.jar:1.3.167]
ERROR n.liftweb.http.provider.HTTPProvider - Failed to Boot! Your application may not run properly
java.lang.NullPointerException: Looking for Connection Identifier ConnectionIdentifier(lift) but failed to find either a JNDI data source with the name lift or a lift connection manager with the correct name
at net.liftweb.db.DB$$anonfun$newConnection$2.apply(DB.scala:190) ~[lift-db_2.10-2.6-M2.jar:2.6-M2]

Categories

Resources