I have a liberty docker container, witch seems to start fine, but when I try to enter via browser the server is not reachable.
I use the IBM Sample1.war for testing to make sure it is not the war file. My problem is that the log file look fine:
[AUDIT ] CWWKE0001I: The server defaultServer has been launched.
[AUDIT ] CWWKE0100I: This product is licensed for development, and limited production use. The full license terms can be viewed here: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/18.0.0.2/lafiles/en.html
[AUDIT ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ibm/wlp/usr/servers/defaultServer/configDropins/defaults/keystore.xml
[AUDIT ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://localhost:9080/Sample1/
[AUDIT ] CWWKZ0001I: Application Sample1 started in 0.394 seconds.
[AUDIT ] CWWKF0012I: The server installed the following features: [servlet-3.1].
[AUDIT ] CWWKF0011I: The server defaultServer is ready to run a smarter planet.
And here the docker file:
FROM websphere-liberty:kernel
COPY server.xml /config/
COPY build/libs/Sample1.war /config/dropins/
RUN installUtility install --acceptLicense defaultServer
I have no idea how to debug without any errors.
Thanks
Here my Server.xml:
<server description="default servlet engine">
<!-- Enable features -->
<featureManager>
<feature>servlet-3.1</feature>
</featureManager>
<httpEndpoint host="localhost" httpPort="9080" httpsPort="9443"
id="defaultHttpEndpoint" />
It seems that your server run with no error, and also the Sample1 war has been deployed with web root /Sample1
What you need, as already mentioned, is to:
change httpEndpoint in server.xml the host="localhost" to host="*"
make sure you run the docker with port mapping, e.g.
docker run -d -p 80:9080 -p 443:9443 your-liberty-name
open a browser and enter url (I guess you run the Sample1 demo, which has a SimpleServlet in it)
http://the-ip/Sample1/SimpleServlet or https://the-ip/Sample1/SimpleServlet
Above tells that we use port 80 and 443 (standard ports, no need to specify them in the url), the-ip depends if you run local docker container or remote. Enter your ip/localhost if you run local.
I would also recommend to download the IBM Web developer tools for eclipse which allows you to manage the server very easy in your IDE environment.
Some good links to have:
IBM - creating docker container...
Docker hub websphere liberty...
Related
Trying to use clearml-server on own Ubuntu 18.04.5 with SSH Port Forwarding and not beeing able to see my debug samples.
My setup:
ClearML server on hostA
SSH Tunnel connections to access Web App from working machine via localhost:18080
Web App: ssh -N -L 18081:127.0.0.1:8081 user#hostA
Fileserver: ssh -N -L 18081:127.0.0.1:8081 user#hostA
In Web App under Task->Results->Debug Samples the Images are still refrenced by localhost:8081
Where can I set the fileserver URL to be localhost:18081 in Web App?
I tried ~/clearml.conf, but this did not work ( I think it is for my python script ).
Disclaimer: I'm a member of the ClearML team (formerly Trains)
In ClearML, debug images' URL is registered once they are uploaded to the fileserver. The WebApp doesn't actually decide on the URL for each debug image, but rather obtains it for each debug image from the server. This allows you to potentially upload debug images to a variety of storage targets, ClearML File Server simply being the most convenient, built-in option.
So, the WebApp will always look for localhost:8008 for debug images that have already been uploaded to the fileserver and contain localhost:8080 in their URL.
A possible solution is to simply add another tunnel in the form of ssh -N -L 8081:127.0.0.1:8081 user#hostA.
For future experiments, you can choose to keep using 8081 (and keep using this new tunnel), or to change the default fileserver URL in clearml.conf to point to port localhost:18081, assuming you're running your experiments from the same machine where the tunnel to 18081 exists.
I have 2 web applications that run on a single Tomcat in a docker container on an AWS EC2 instance. One web app is 100% angular static content and the other is a REST application. When I run the web apps on my laptop, everything runs fine. When I run the docker container on an EC2 instance and access the web apps directly using the public IP, everything runs fine. However, when I try to access the web apps through an ELB, requests for the static content are handled fine, but requests to the REST app fail with a 403. I can see the 403 error in the Tomcat access logs so I know they are being received by Tomcat. However the REST app logs show no evidence that the request was received. I added a filter to the REST app that logs all requests received, but it shows no evidence that the request was received when when sent through the ELB.
Any idea why this might be happening? Any suggestions for diagnosing?
My docker file ...
FROM tomcat:8.0
LABEL maintainer="rossmillsiphone#gmail.com"
ADD voteride-web.war /usr/local/tomcat/webapps/
ADD voteride-ws.war /usr/local/tomcat/webapps/
ADD mysql-connector-java-5.1.9.jar /usr/local/tomcat/lib/
ADD server.xml /usr/local/tomcat/conf/
ADD context.xml /usr/local/tomcat/conf/
ADD email.properties /usr/local/tomcat/lib/
ADD logging.properties /usr/local/tomcat/conf
EXPOSE 8080
CMD ["catalina.sh", "run"]
This article had the answer I needed: https://willwarren.com/2014/01/27/running-apache-tomcat-with-ssl-behind-amazon-elb/
Setting the connector like this resolved the issue and allowed the web app to be called when traffic came through the ELB.
<Connector
port="8080"
protocol="HTTP/1.1"
proxyPort="443"
scheme="https"
secure="true"
proxyName="mywebsite.com"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />
I created a Weblogic generic container for version 12.1.3 based on the official Docker images from Oracle at https://github.com/oracle/docker-images/tree/master/OracleWebLogic/dockerfiles
Command: buildDockerImage.sh -g -s -v 12.1.3
This creates the image oracle/weblogic:12.1.3-generic
Using a modified version of sample dockerfile for 1213-domain, I built the Weblogic container.
Note: changed the base image to be generic, instead of developer
docker build -t 1213-domain --build-arg ADMIN_PASSWORD="admin123" -f myDockerfile .
Pushed the built image to Amazon ECR and ran the container using the AWS ECS. Configured the port mappings as 0:7001, set memory soft limit as 1024, nothing else changed in default ECS settings. I have an application load balancer in the front, which receives traffic at 443 port and forwards to the containers. In the browser I get a login page for Weblogic, when I enter username as weblogic and password as admin123, I get the error:
Authentication Denied
Interestingly when I go to the container and connect to the weblogic using WLST, it works fine.
[ec2-user#ip-10-99-103-141 ~]$ docker exec -it 458 bash
[oracle#4580238db23f mydomain]$ /u01/oracle/oracle_common/common/bin/wlst.sh
Initializing WebLogic Scripting Tool (WLST) ...
Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away.
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline> connect("weblogic","admin123","t3://localhost:7001")
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server "AdminServer" that belongs to domain "mydomain".
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
wls:/mydomain/serverConfig>
Any hints on what can be going wrong?
Very interesting indeed. :) .. You are sure there is no special characters or so when you entering the username and password. Try typing the same if you are coping.
Also as backup, since you are able to login to WLST you can try two option.
Resetting the current password of weblogic or try adding new username and password.
below link will help
http://middlewarebuzz.blogspot.com/2013/06/weblogic-password-reset.html
or
http://middlewaremagic.com/weblogic/?p=4962
I have a Dropwizard application that works fine locally, but I can not figure out how to deploy it into my Jelastic environment.
I read "Hosting Spring Boot Standalone and Clustered Java Applications with Jelastic Cloud" tutorial but seems like it is more focused on Spring Boot applications. To run my DropWizard app I need to execute
java -jar myJar.jar server config.yml
but from the tutorial it seems that Elastic just executes the jar without providing "server" and "config.yml" parameters.
So when I upload and deploy my jar file (I tried both, jar and zip approaches) all I can see in the output is
Node ID : XXXXX
-----------------------
Deploy failed
/opt/repo/jelastic/scripts/deploy.sh line 66 clearCache command not found
zipinfo cannot find or open /, /.zip or /.ZIP.
zipinfo cannot find or open /, /.zip or /.ZIP.
Error Nothing to run
and SpringBoot log is empty.
Can you please tell me is there a way to deploy a DropWizard application, or the only way to deploy it is using docker registry?
To provide parameters to your application you need to edit file variables.conf from your dashboard, then just restart the application
everyone,
I followed instructions on highcharts export server. And my test environment is Ubuntu Server, tomcat 7.x, java 1.7.x, the latest highcharts export server code cloned by git. No problem occurred during mvn install and mvn clean package. And soem settings of my app-convert.properties is
port=8080 # the same port with my tomcat
exec = /home/{my user name}/phantomjs-1.9.1-linux-x86_64/bin/phantomjs
And from the logs of Tomcat, I can see that phantomjs is started and listening on port 8080. Also when I access http://{myservername}:8080/highchars-export-web/, it's loaded correctly, even when I click 'Generate Image' button, it gave me a file named 'Charts.png'. However, the image's size is 1kb, not the one as getting from http://export.highcharts.com/demo. I don't know what I am missing. I need you guys help on this.
Best wishes,
Arthur
Pick a different port other than the one your tomcat (or other service) is listening on. That port you set in the app.properties files is for the phatomjs service to listen on.