I am getting below error in my Liberty message log file when I am trying to use Log4j in my Grails application. When I am run my application as locally, everything is working correctly but when I upload my application on to Liberty Server then I am seeing below error on log file. Please give me suggestion how I can resolve this issue. Thanks
[WARNING ] CWOBJ0210W: The transport type of the remote server on tvma1222.server.xxx.net:4809,tvma1223.server.xxx.net:4809,tvma1224.server.xxx.net:4809 cannot be determined. The following exception occurred while determining the transport type: java.net.UnknownHostException: tvma1224.server.xxx.net
at java.net.InetAddress.getAllByName0(InetAddress.java:1412)
at java.net.InetAddress.getAllByName(InetAddress.java:1316)
at java.net.InetAddress.getAllByName(InetAddress.java:1239)
at java.net.InetAddress.getByName(InetAddress.java:1189)
at com.ibm.ws.objectgrid.naming.DetermineTransport$1.run(DetermineTransport.java:292)
at com.ibm.ws.objectgrid.naming.DetermineTransport$1.run(DetermineTransport.java:288)
at java.security.AccessController.doPrivileged(AccessController.java:452)
at com.ibm.ws.objectgrid.naming.DetermineTransport.probe(DetermineTransport.java:288)
at com.ibm.ws.objectgrid.naming.LocationServiceFactory$1.call(LocationServiceFactory.java:1451)
at com.ibm.ws.objectgrid.naming.LocationServiceFactory$1.call(LocationServiceFactory.java:1447)
at java.util.concurrent.FutureTask.run(FutureTask.java:274)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
at java.lang.Thread.run(Thread.java:809)
java.net.UnknownHostException: tvma1224.server.xxx.net
Seems pretty clear that the server where the code is running can't lookup tvma1224.server.xxx.net w/ the system resolver. If you can't fix DNS, add an entry to /etc/hosts or the equivalent.
Related
This is a possible duplicate of Intellij docker with live update of EAR inside websphere, but that question is 3 years old and the answer "not supported" is maybe outdated.
Via IntelliJ IDEA (2020.3 Ultimate) on Windows 10, I want to deploy an application (EAR) into a Websphere Liberty server which is running in a docker container. This worked with traditional websphere, now we are switching to WLP. Is this possible at all?
The server is up and running. I'm perfectly able to copy the ear to the (mounted) "dropins" folder and the server picks it up, expands it and deploys it without problems.
I'm also able to attach the debugger in IntelliJ to the server and it will stop at breakpoints, it can even successfully update code ("hot swap classes").
What I did already:
I configured ports (7777,8880,9043,9443,9080) to forward 1:1 from the container to my local machine. I can successfully access at least port 9080 through a local browser.
I downloaded Websphere Liberty, Full Java EE 8 Profile, the same version as in the docker container, from IBM official website to my local hard drive, and expanded the zip.
Then I tried to follow the guide https://www.jetbrains.com/help/idea/run-debug-configuration-websphere-server.html and added a Run/Debug Configuration "Websphere Remote", I chose the expanded folder for IntelliJ for the "Application Server" configuration (I know that IntelliJ needed a local installation of Websphere for traditional version, so this may hold true for WLP as well).
I added the EAR-artifact for deployment in the Run Configuration. I copied the server name from the one inside docker and set the connection settings (localhost:9080).
The first try ("Test Connection") resulted in an error from IntelliJ: Error running 'WebSphere Application': JMX file not found: C:\[...]\wlp-javaee8-20.0.0.12\usr\servers\defaultServer\workarea\com.ibm.ws.jmx.local.address
Then I tried and copied this file from my docker container, it had the content
service:jmx:rmi://127.0.0.1/stub/[... some seemingly byte64-encoded string] to the local path. This resulted in a different error: Error connecting to the Application Server: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect
I also tried to use the content of the file com.ibm.ws.jmx.rest.address which was service:jmx:rest://localhost:9443/IBMJMXConnectorREST, (where I replaced the internal host name of the docker container by "localhost"), but that resulted in Error running 'WebSphere Application': java.net.MalformedURLException: Unsupported protocol: rest
If I start the local server on my machine (not in docker), connection works and deployment too. But this is not my aim.
PS: My server.xml contains <applicationMonitor updateTrigger="mbean"/>.
I'm trying to install create a container that runs a Payaraserver with my JAX-RS application. Getting the server running wasn't too hard, I simply used the official image. However, when I create the Connection Pool I was not able to ping, and I got this error message:
Ping Connection Pool failed for PostgreSQLPool.
Class name is wrong or classpath is not set for :
org.postgresql.ds.PGConnectionPoolDataSource Please check the server.log for more details.
Also, when i tried to upload the .war file (after I had created the DataSource) I got this error message:
Error occurred during deployment: Exception [EclipseLink-4002] (Eclipse Persistence Services -
2.7.7.payara-p3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception:
java.sql.SQLException: Error in allocating a connection. Cause:
org.postgresql.ds.PGConnectionPoolDataSource cannot be cast to javax.sql.DataSource Error Code:
0. Please see server.log for more details.
After a bit of digging I thought that the problem was that I did not have the postgre jdbc driver in the container. I created this Dockerfile:
FROM payara/server-full
COPY postgresql-42.2.18.jar /opt/payara41/glassfish/domains/domain1/lib
, which I thought would add the .jar file to the container. Unfortunately, no change was made. I have the exact same configurations on a local installation of Payara and everything works just fine there.
Is there something that I'm missing? I'm quite new to dockers, so if someone would be able to pint me in the right direction, I would really appreciate it.
I receive this error message in jenkins when trying to deploy my application to kubernetes. Is there something I am missing?
istio-gateway.yml ERROR: ERROR: java.io.IOException: ERROR: YAML file
istio-gateway.yml is invalid, please check it. Details:
java.io.IOException: Unknown apiVersionKind:
networking.istio.io/v1alpha3/Gateway known kinds are...
I am using Spring Boot with Java
You are trying to create a Istio Geteway using that yaml. You probably don't have istio installed in your Kubernetes cluster. If it's not installed then you need to install it.
Even after searching too much i couldn't find any suitable answer for my problem.
I am using Spring Tool Suite and trying to create a new server but getting error as The specified server is not valid. The .tc-runtime-instance file is missing.
So, I tried updating pivotal using Windows> Preferences and tried editing pivotal with new release but got the error as attached:
I tried changing tomcat version from 9 to 7 too but still no success. Please help.
It looks like you are trying to use the server adapter for the "Pivotal tc Server" to configure your server in the IDE. This server adapter is for the Pivotal tc Server only and doesn't work with a plain Tomcat installation on your disc. For that, you should select the "Apache Tomcat" server adapter when creating a server instance in your IDE.
We have a Java application that we deploy using .war files on tomcat server. The war is copied on the webapp directory (tomcat stopped) and then we start the server. We have several scripts that automate the process and we have deploying on development-backup and production servers without problems until two days ago... Then we were able to deploy on development machines, but in backup and production (ovh machines) we received an exception starting tomcat:
### Error building SqlSession.
### Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: java.io.IOException: Stream closed
org.apache.ibatis.exceptions.PersistenceException:
### Error building SqlSession.
### Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: java.io.IOException: Stream closed
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:51)
at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:39)
Redeploying old .war works fine, but new .war produces all the time this exception. We have spend lot of hours trying to figure out what is wrong, but the same .war that does not work on production work on a development machine and (this is incredible) if we deploy using another name for the war (just renaming the .war file) the application works.. But we need the application to work using this specific context name.
Please... help!
Finaly solved...
The main reason was the checking url from haproxy that in this version uses database, so, while the context are deploying haproxy try to load this url and causes several initializations on mybatis...
Changing the url haproxy query solves the problem, but I'm not sure the good way to avoid the initialization problem under load.