When starting WAS 8.5 app server from a docker container getting 502 Bad Gateway error

I have a docker image that install the WAS 8.5 (Developer Edition) with fix packs.

Now I create and start my Docker Container (was8cont) exposing few public ports.

  • Can several nodes access mounted docker containers
  • Why didn't docker copy files to the mounted directory?
  • Camunda/JBOSS with MySQL
  • Docker swarm with a custom network
  • How to place secure file in rancher storage?
  • Spring Boot in Docker
  • Now when I start the App Server using command —

    docker exec was8cont /opt/IBM/WebSphere/AppServer/bin/startServer.sh server1

    I’m getting error as

    Error response from daemon: 
        502 Bad Gateway -- nginx

    I have the container memory as 2GB.

    My Docker File is:

    From ubuntu:14.04
    MAINTAINER Nandakumar Kuthalaraja <n.kuthalaraja@perficient.com>
    RUN apt-get install -y unzip 
    ################ Installation manager ##############
    #Install Installation Manager
    COPY agent.installer.linux.gtk.x86_64_1.8.3000.20150606_0047.zip /tmp/
    RUN mkdir /tmp/im && unzip -qd /tmp/im /tmp/agent*.zip \
     && /tmp/im/installc -acceptLicense -accessRights admin \
     -installationDirectory "/opt/IBM/InstallationManager" \
     -dataLocation "/var/ibm/InstallationManager" -showProgress \
     && rm -fr /tmp/agent*.zip /tmp/im
    #Install IBM WAS v8 --com.ibm.websphere.BASE.v85
    COPY WAS_V8_1_OF_3.zip /tmp/
    COPY WAS_V8_2_OF_3.zip /tmp/
    COPY WAS_V8_3_OF_3.zip /tmp/
    RUN mkdir /tmp/was && unzip -qd /tmp/was /tmp/WAS_V8_1_OF_3.zip \
     && unzip -qd /tmp/was /tmp/WAS_V8_2_OF_3.zip \
     && unzip -qd /tmp/was /tmp/WAS_V8_3_OF_3.zip \
     && /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \
     -acceptLicense install com.ibm.websphere.DEVELOPERSILAN.v85 \
     -repositories /tmp/was/repository.config \
     -installationDirectory /opt/IBM/WebSphere/AppServer \
     && rm -fr /tmp/was /tmp/WAS_V8_1_OF_3.zip \
      /tmp/WAS_V8_2_OF_3.zip    /tmp/WAS_V8_3_OF_3.zip
    # Install fixpack
    COPY 8.5.5-WS-WAS-FP0000005-part1.zip /tmp/
    COPY 8.5.5-WS-WAS-FP0000005-part2.zip /tmp/
    RUN mkdir /tmp/wasfp \
    && unzip -qd /tmp/wasfp /tmp/8.5.5-WS-WAS-FP0000005-part1.zip \
    && rm -fr /tmp/8.5.5-WS-WAS-FP0000005-part1.zip \
    && unzip -qd /tmp/wasfp /tmp/8.5.5-WS-WAS-FP0000005-part2.zip \
    && rm -fr /tmp/8.5.5-WS-WAS-FP0000005-part2.zip \
    && /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \
    -acceptLicense install com.ibm.websphere.DEVELOPERSILAN.v85  \
    -repositories /tmp/wasfp/repository.config \
    -installationDirectory /opt/IBM/WebSphere/AppServer \
    && rm -fr /tmp/wasfp
    # Create AppServer Profile
    RUN /opt/IBM/WebSphere/AppServer/bin/manageprofiles.sh -create -templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/default/ -profileName AppSrv01 -profilePath /opt/IBM/WebSphere/AppServer/profiles/AppSrv01
    EXPOSE 2809 9402 9403 9353 9633 9100 11004 11003 9401 7276 7286 5558 5578 5060 5061 9943 9080 9043 9060 8880

  • Running Kubernetes Example on CoreOS, Part 1 not work
  • What are the pros and cons of docker data volumes
  • Docker GitLab image that update itself
  • Multiple applications running simultaneously on a single Docker image
  • How can I attach VS Code to a node process running in a docker container
  • Setting Up Docker Dnsmasq
  • One Solution collect form web for “When starting WAS 8.5 app server from a docker container getting 502 Bad Gateway error”

    You may like to take a look at the Dockerfiles for WAS classic that we have recently made available: https://github.com/WASdev/ci.docker.websphere-classic

    You’ll see in this example that we start the server as part of the command executed when the container is run rather than having to use a separate exec. You should also get a considerably smaller image if you follow these steps.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.