docker-archive-public/docker.labs

Issue with accessing Java application - userSignup page

JTG2020 opened this issue · 11 comments

Please provide the following information so we can assess the issue you're having

Which lab is it that you're having issues with?
Java debugging app - https://github.com/docker/labs/tree/master/developer-tools/java-debugging

Description
No sure if it is just me but I successfully followed all the instructions until clicking on userSignUp page from Tomcat app manager.
As i click on the userSignup link, I get 404.
I am running this app on Ubuntu and docker installed locally as well.
Any help will be appreciated.

Steps to reproduce the issue, if relevant:
I followed instructions all the way until I tried to access the application.

Describe the results you received:
error:
HTTP Status 404 – Not Found
Type Status Report
Message /UserSignup/
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

Describe the results you expected:
I should have received signup page

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client:
 Version:           18.06.0-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        0ffa825
 Built:             Wed Jul 18 19:11:02 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.0-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       0ffa825
  Built:            Wed Jul 18 19:09:05 2018
  OS/Arch:          linux/amd64
  Experimental:     false

Output of docker info:

Client:
 Version:           18.06.0-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        0ffa825
 Built:             Wed Jul 18 19:11:02 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.0-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       0ffa825
  Built:            Wed Jul 18 19:09:05 2018
  OS/Arch:          linux/amd64
  Experimental:     false

Additional environment details (AWS, Docker for Mac, Docker for Windows, VirtualBox, physical, etc.):
physical ubuntu machine. Docker installed on ubuntu.

I also face exactly the same problem:

Status code: 404 – Not Found
Description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

@JTG2020: does it indicate that the /UserSignup is running? If I click the start command the first time nothing happens (application does not start). so i first click on the undeploy command and then the start command for the web application to start running. I don't know if you also faced this problem?

@Alfusainey
I think i faced same problem. I thought that probably i did not follow instructions correctly and hence followed same steps again. I also realized that after web-server start up it takes some time for DB to be available based on logs. I am not sure if that’s what causing the issue.

thanks! let's hope that this issue gets resolved soon

spara commented

Replaced mysql:latest to mysql:5.7 to enable username/password login. Edited pom.xml to compile using Java 1.7 to match tomcat container used in the example.

works for me. i can also confirm that replacing mysql:latest to mysql:5.6 also works. thanks @spara

sorry about responding on closed issues. But looks like new issue cropped up now and throwing exception on submit. This issue is already open #415

The problem is still there. No files for UserSignup app are found in target container
root@4c7af6cb74d3:/usr/local/tomcat/webapps/UserSignup# ls -al
total 4
drwxr-xr-x 2 root root 40 Sep 6 22:24 .
drwxr-xr-x 8 root root 4096 Sep 7 00:03 ..
root@4c7af6cb74d3:/usr/local/tomcat/webapps/UserSignup#

Running docker on win10 host. seems like a windows integration problem?
http://support.divio.com/local-development/docker/how-to-use-a-directory-outside-cusers-with-docker-toolbox-on-windowsdocker-for-windows

The problem is still there. No files for UserSignup app are found in target container
root@4c7af6cb74d3:/usr/local/tomcat/webapps/UserSignup# ls -al
total 4
drwxr-xr-x 2 root root 40 Sep 6 22:24 .
drwxr-xr-x 8 root root 4096 Sep 7 00:03 ..
root@4c7af6cb74d3:/usr/local/tomcat/webapps/UserSignup#

Running docker on win10 host. seems like a windows integration problem?
http://support.divio.com/local-development/docker/how-to-use-a-directory-outside-cusers-with-docker-toolbox-on-windowsdocker-for-windows

Not sure if others are having this problem, but the issue for me was that there weren't any files in the UserSignup directory because the volume mount failed.

You can check this by doing this:

$ docker exec -ti javadebugging_webserver_1 bash
root@0e5b07c5c0b7:/usr/local/tomcat# ls
BUILDING.txt     LICENSE  README.md      RUNNING.txt  conf     lib   native-jni-lib  webapps
CONTRIBUTING.md  NOTICE   RELEASE-NOTES  bin          include  logs  temp            work
root@0e5b07c5c0b7:/usr/local/tomcat# cd webapps/
root@0e5b07c5c0b7:/usr/local/tomcat/webapps# ls
ROOT  UserSignup  docs  examples  host-manager  manager
root@0e5b07c5c0b7:/usr/local/tomcat/webapps# cd UserSignup/
root@0e5b07c5c0b7:/usr/local/tomcat/webapps/UserSignup# ls
META-INF  WEB-INF  assets  bootstrap  datepicker  index.jsp  jquery-1.8.3.js

If that last ls doesn't display anything in that folder, the volume mount failing is the issue.

I found the solution here: https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly#ensure-volume-mounts-work

The problem is still there. No files for UserSignup app are found in target container
root@4c7af6cb74d3:/usr/local/tomcat/webapps/UserSignup# ls -al
total 4
drwxr-xr-x 2 root root 40 Sep 6 22:24 .
drwxr-xr-x 8 root root 4096 Sep 7 00:03 ..
root@4c7af6cb74d3:/usr/local/tomcat/webapps/UserSignup#

Running docker on win10 host. seems like a windows integration problem?
http://support.divio.com/local-development/docker/how-to-use-a-directory-outside-cusers-with-docker-toolbox-on-windowsdocker-for-windows

this work for me. but i edit the docker-compose.yml file

volumes:
      - /home/docker/projects/workspace/labs/developer-tools/java-debugging/app/target/UserSignup:/usr/local/tomcat/webapps/UserSignup

The problem is still there. No files for UserSignup app are found in target container
root@4c7af6cb74d3:/usr/local/tomcat/webapps/UserSignup# ls -al
total 4
drwxr-xr-x 2 root root 40 Sep 6 22:24 .
drwxr-xr-x 8 root root 4096 Sep 7 00:03 ..
root@4c7af6cb74d3:/usr/local/tomcat/webapps/UserSignup#
Running docker on win10 host. seems like a windows integration problem?
http://support.divio.com/local-development/docker/how-to-use-a-directory-outside-cusers-with-docker-toolbox-on-windowsdocker-for-windows

this work for me. but i edit the docker-compose.yml file

volumes:
      - /home/docker/projects/workspace/labs/developer-tools/java-debugging/app/target/UserSignup:/usr/local/tomcat/webapps/UserSignup

In just a moment, the file disappeared again

BXK20 commented

When I click on the /UserSignUp on the tomcat web application manager, I also get the HTTP Status 404 – Not Found.

I checked the docker file for registration-database and it is using mysql:5.7

Is this exercise working beyond this for the windows 10 home edition with linux o/s on virtual box case.

Thanks