Jump to content
Changes to the Jaspersoft community edition download ×

Docker install 7.5 failing at create-ks interactive prompt


dialacci

Recommended Posts

I am building a container based on Jasper Server CE 7.5. Everything works great until the init routine tries to create the keystore, prompting for a yes/no input and causing a build failure

wait-for-it.sh: jrspostgres:5432 is available after 0 seconds/usr/src/jasperreports-server/buildomatic /usr/local/tomcatUnable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-8-openjdk-amd64/lib/tools.jarBuildfile: /usr/src/jasperreports-server/buildomatic/build.xml[create-ks] A new encryption key and a new keystore are about to be created. Any previously created key and keystore will become invalid and the corresponding passwords unusable. If you think this JasperReports Server instance already has a keystore configured by another OS user, stop this process and configure the path in keystore.init.propertiesfile, then run this command again. See the JasperReports Server Security Guide for details. Do you want to continue? (y/N)BUILD FAILED/usr/src/jasperreports-server/buildomatic/build.xml:58: The following error occurred while executing this line:/usr/src/jasperreports-server/buildomatic/bin/setup.xml:377: Keystore creation was canceled.Total time: 0 seconds[/code]

obviously I can not answer "yes" during the build interactively and do not want to get into hacky solutions with Expect - has anyone else ran into this?

 

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

  • 4 weeks later...

Well I was building jasperreposts a docker VM. To succesfuly build I followed the recipe below:

1)  copy the TIB_js-jrs-cp_7.5.0_bin.zip (unzipped of course) on to the vm.

2) Create a default_master.properties file inside jasperserver/buildomatic (sample configs exist in buildomatic/sample_conf).

3) enter  buildomatic directory and execute export BUILDOMATIC_MODE=' ';./js-ant gen-config (here is where the keystore is created)

4) ensure the db is up and running; execute ./js-install-ce.sh minimal.

   if the db already exists the script turns interactive again asking whether to recreate the db. The solution to this is to run 

   sed -i 's/name="prompt" default="true"/name="prompt" default="false"/' bin/db-common.xml so that the db gets recreated.

  The only way I found so as to leave the db intact is to answer y in interactive mode.

Restart Tomcat and get ready to go.

 

I hope this is enough detail.

Cheers

Link to comment
Share on other sites

I was able to go past that point and install my docker by adding to my Dockerfile this line

ENV BUILDOMATIC_MODE=script

"script" was my choice, you can put anything there, as long as it's different from "interactive". There is only one IF in the script.xml, specifically for create-ks.

<if>
    <and>

        <isset property="env.BUILDOMATIC_MODE"/>
        <equals arg1="${env.BUILDOMATIC_MODE}" arg2="interactive" />

    </and>
    <then>
        <create-ks ks="${ks}" ksp="${ksp}" propsFile="${masterPropsSource}"
                   confirmArg="y"
                   confirmMessage="A new encryption key and a new keystore are about to be created. Any previously created key and keystore will become invalid and the corresponding passwords unusable. If you think this JasperReports Server instance already has a keystore configured by another OS user, stop this process and configure the path in keystore.init.properties file, then run this command again. See the JasperReports Server Security Guide for details. Do you want to continue? (%s/N)"/>
    </then>
    <else>
        <echo message=""/>
        <create-ks ks="${ks}" ksp="${ksp}" propsFile="${masterPropsSource}"
                   warningMessage="WARNING: A new encryption key and a new keystore are about to be created."/>
    </else>
</if>

 

Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...