Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed start container with Oracle DB on step of checking connection to database #63

Open
derifgig opened this issue Apr 23, 2021 · 0 comments

Comments

@derifgig
Copy link

derifgig commented Apr 23, 2021

Hello.

We have the critical issue for Oracle DB with image that build from this repo

I did:

  1. Docker images by manual created successfully, uploaded to AWS ECR
$ docker images
REPOSITORY                                                              TAG     IMAGE ID       CREATED        SIZE
4444444.dkr.ecr.eu-west-1.amazonaws.com/jasperserver-pro           7.8.0   38744255fa70   10 hours ago   1.71GB
4444444.dkr.ecr.eu-west-1.amazonaws.com/jasperserver-pro-cmdline   7.8.0   89b05a57a938   12 hours ago   1.14GB
  1. Test of connection from host to Oracle RDS instance:
    2.1) by sqlplus - success
    2.2) by jdbc tester FROM Jasper Server container
root@ssg_jasper-2:~# java -jar jdbc-tester-1.1.jar MY_JASPER MYPASSWORD jdbc:oracle:thin:@//my-oracle-rds.dhdil1lso2123.eu-west-1.rds.amazonaws.com:1521/sgcapp
14:35:00.216 [main] INFO Main - arg 0 = MY_JASPER
14:35:00.225 [main] INFO Main - arg 1 = MYPASSWORD
14:35:00.225 [main] INFO Main - arg 2 = jdbc:oracle:thin:@//my-oracle-rds.dhdil1lso2123.eu-west-1.rds.amazonaws.com:1521/sgcapp
14:35:00.447 [main] INFO Main - ****** Starting JDBC Connection test *******
14:35:00.919 [main] INFO Main - Running SQL query: [select sysdate from dual]
14:35:00.952 [main] INFO Main - Result of SQL query: [2021-04-22 14:35:00.0]
14:35:00.954 [main] INFO Main - JDBC connection test successful!
  1. Start container command:
docker run -it --rm \v
-v /home/ec2-user/jasperserver.license:/usr/local/share/jasperserver-pro/license/jasperserver.license \
-v /home/ec2-user/jrs_deploy_customization/default_master_additional.properties:/usr/local/share/jasperserver-pro/deploy-customization/default_master_additional.properties \
-v /jasper/keystore:/usr/local/share/jasperserver-pro/keystore:rw \
-e DB_HOST=my-oracle-rds.dhdil1lso2123.eu-west-1.rds.amazonaws.com \
-e DB_NAME=my_jasper \
-e DB_PASSWORD=MYPASSWORD \
-e DB_PORT='1521' \
-e DB_TYPE=oracle \
-e DB_USER=my_jasper \
-e JAVA_OPTS=-Djava.awt.headless=true \
-p 8080:8080 \
4444444.dkr.ecr.eu-west-1.amazonaws.com/jasperserver-pro:7.8.0

Content of /home/ec2-user/jrs_deploy_customization/default_master_additional.properties:

sid=sgcapp
  1. Start container, received error:
 [echo] Maven settings: /usr/src/jasperreports-server/buildomatic/build_conf/default/maven_settings.xml
do-install-upgrade-test:
[echo] Checking DBMS host and port:
[echo] About to validate port: my-oracle-rds.dhdil1lso2123.eu-west-1.rds.amazonaws.com:1521
[echo]   Port 1521 is OK
[echo] Done validating port: my-oracle-rds.dhdil1lso2123.eu-west-1.rds.amazonaws.com:1521
[echo] Validating administrative database connection at jdbc:tibcosoftware:oracle://my-oracle-rds.dhdil1lso2123.eu-west-1.rds.amazonaws.com:1521;SID=SGCAPP. Phase: [test]
[echo] About to validate JDBC jar existence
[echo]   Look in: /usr/src/jasperreports-server/buildomatic/conf_source/db/oracle/jdbc
[echo]   Found jar file: assuming OK
[echo]   Jar or Jars found: TIoracle-6.0.0.000032.jar;jasperreports-pro-7.8.0.jar;ojdbc8-19.10.jar
[select-sql] Failed to connect: [TibcoSoftware][Oracle JDBC Driver][Oracle]ORA-01017: invalid username/password; logon denied
[echo] Connection failed:
[echo]   SQLState: 28000
[echo]   Vendor specific error code: 1017
[echo]   Message: [[TibcoSoftware][Oracle JDBC Driver][Oracle]ORA-01017: invalid username/password; logon denied
[echo] ]
  1. Additional info
    5.1) The same container successfully start and connect to Postgres DB.
    5.2) Attempt switch JDBC driver to native for Oracle DB failed, but error message in different. Container frozen at step of connection verification to DB.
    5.3) Docker info:
$ docker  info
\Client:
 Debug Mode: false

Server:
 Containers: 2
  Running: 2
  Paused: 0
  Stopped: 0
 Images: 10
 Server Version: 19.03.13-ce
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: active
  NodeID: wwvrcplgj1ksq313wywe98nu4
  Is Manager: false
  Node Address: 10.103.30.174
  Manager Addresses:
   10.103.25.16:2377
   10.103.38.170:2377
   10.103.42.43:2377
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
 runc version: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
 init version: de40ad0 (expected: fec3683)
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.14.219-161.340.amzn2.x86_64
 Operating System: Amazon Linux 2
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 3.805GiB
 Name: sgc-eu-prod-jasper-0
 ID: OGCZ:PFMC:M5EX:M3SF:JPVH:NVV3:FS74:MTJO:2P63:2Y2T:P3D7:OOKE
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
  1. Localization of the wrong step

6.1) Commented call of "test_database_connection" in:

test_database_connection

6.2) Added

COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/install_resources /usr/src/jasperreports-server/buildomatic/install_resources/

after:

COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/lib /usr/src/jasperreports-server/buildomatic/lib/

Result (after 6) - container started and successfully connected to Oracle DB.

Please, review and fix verification step for Oracle DB.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant