Git Product home page Git Product logo

docker-jasperserver's Introduction

JasperReports Server CE Edition Docker Container

The Docker Image aims to quickly get up-and-running a JasperReports Server for a development environment.

Start the Container

Using Command Line

To start the JasperServer container you'll need to pass in 5 environment variables and link it to either a MySQL or Postgres container.

E.g. docker run -d --name jasperserver -e DB_TYPE=mysql -e DB_HOST=db -e DB_PORT=3306 -e DB_USER=root -e DB_PASSWORD=mysql --link jasperserver_mysql:db -p 8080:8080 retriever/jasperserver

If you haven't got an existing MySQL or Postgres container then you can easily create one: docker run -d --name jasperserver_mysql -e MYSQL_ROOT_PASSWORD=mysql mysql:5.7

Using Docker-compose

To start up the JasperServer and a MySQL container:

  • Run docker-compose up to run in foreground or
  • Run docker-compose up -d to run as in daemon mode.

To stop the containers run docker-compose stop and docker-compose start to restart them.

Note: To install Docker-compose see the releases page.

Login to JasperReports Web

  1. Go to URL http://${dockerHost}:8080/
  2. Login using credentials: jasperadmin/jasperadmin

Image Features

This image includes:

How to build this image

Use docker build -t retriever/jasperserver .

See comments in Dockerfile to speed up testing by not having to download the jasperserver release each time.

Troubleshooting

If you are having problems starting the containers because of a MySQL error like "[ERROR] [FATAL] Innodb: Table flags are 0...", then you will need to delete the data_dir which contains the MySQL database and then recreate the containers. Please note that you will lose any data previously stored in the database.

How to release a new image version

Since changes-to-docker-hub-autobuilds builds have to be done manually.

Steps to make a new official version of the image:

  1. Push a new git tag using the naming convention major.minor.iteration where:
    • major and minor line up with the included version of jasperserver
    • iteration is incremented each time a change is done that isn't an upgrade of the included jasperserver version
  2. Build the image locally for each tag e.g. docker build -t retriever/jasperserver:7.5.0 -t retriever/jasperserver:latest .
  3. Login to dockerhub with account that has push privileges to retriever org (i.e. docker login)
  4. Push image for each tag (e.g. docker push retriever/jasperserver:7.5.0 and docker push retriever/jasperserver:latest)
  5. Check images are on Docker Hub: retriever/jaserpserver
  6. Test new Docker Hub images by deleting local image e.g. docker rmi retriever/jasperserver:7.5.0 retriever/jasperserver:latest and re-downloading from Dockerhub and run up container e.g. docker-compose up.
    • Note: ensure docker-compose.yml is pointing to right version and clear out local datadir to start fresh.

docker-jasperserver's People

Contributors

ajiob avatar georgezim85 avatar grange74 avatar luketimothyjarman avatar mhoffmann75 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-jasperserver's Issues

Not able to login again in jasperserver UI "Invalid credentials supplied. Could not login to JasperReports Server".

Hi @grange74

I have used this to run a JasperReports server with version 7.8.0. all seems working fine but when i remove jasperverserver container using 'docker-compose down jasperserver' and create it back but i am not able to get login into jasperserver UI with default credentials jasperserveradmin/jasperserveradmin although my MySQL data is persistent and its not recreated.
UI login screen showing "Invalid credentials supplied. Could not log in to JasperReports Server." error.

Can you please suggest if I am missing something?

Default Tomcat web application

Hey thanks for sharing your repo. Is there an easy way to make jasper as a default application? Currently it requires jasperserver in context.

Remove OpenJDK deprecated options from Dockerfile

Currently when you start up, you get the following warnings. We should remove from JAVA_OPTS in Dockerfile.

jasperserver    | OpenJDK 64-Bit Server VM warning: ignoring option PermSize=32m; support was removed in 8.0
jasperserver    | OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0

Persistency issues

Is all data stored in database right now? I mean if I start my container again, will I lose something regarding data?

I think that this is worth that to be stated in README as well.

javax.naming.OperationNotSupportedException: Context is read only

On startup, you get this annoying message below. It doesn't seem to cause any meaningful problems but would be nice to eliminate as it can cause unnecessary angst if making a change and expecting no error messages to appear. It seems to be a known issue with JasperServer for quite some time: https://community.jaspersoft.com/questions/822153/error-closing-context

jasperserver    | 2019-01-07 20:19:25,715 ERROR JNDIResourceProvider,localhost-startStop-1:75 - error closing context
jasperserver    | javax.naming.OperationNotSupportedException: Context is read only
jasperserver    |       at org.apache.naming.NamingContext.checkWritable(NamingContext.java:963)
jasperserver    |       at org.apache.naming.NamingContext.close(NamingContext.java:758)
jasperserver    |       at com.tonbeller.tbutils.res.JNDIResourceProvider.close(JNDIResourceProvider.java:72)
jasperserver    |       at com.tonbeller.tbutils.res.CompositeResourceProvider.close(CompositeResourceProvider.java:56)
jasperserver    |       at com.tonbeller.tbutils.res.ResourcesFactory.initialize(ResourcesFactory.java:163)
jasperserver    |       at com.tonbeller.tbutils.res.ResourcesFactory.<init>(ResourcesFactory.java:92)
jasperserver    |       at com.tonbeller.tbutils.res.ResourcesFactory.<clinit>(ResourcesFactory.java:89)
jasperserver    |       at com.tonbeller.tbutils.res.ResourcesFactoryContextListener.contextInitialized(ResourcesFactoryContextListener.java:23)
jasperserver    |       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792)
jasperserver    |       at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
jasperserver    |       at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
jasperserver    |       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
jasperserver    |       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
jasperserver    |       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
jasperserver    |       at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1140)
jasperserver    |       at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
jasperserver    |       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
jasperserver    |       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
jasperserver    |       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
jasperserver    |       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
jasperserver    |       at java.lang.Thread.run(Thread.java:748)

Container ignores port specified in env for database connection MySQL

It seems like even though you supply env ${DB_PORT}, when it actually starts up it still tries to use 3306 (I tried setting DB_PORT to 3307).

,2019-08-01T01:21:21.805777100Z /usr/src/jasperreports-server/buildomatic/bin/app-server.xml:58: java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=localhost)(port=3306)(type=master) : Connection refused (Connection refused)
,2019-08-01T01:21:21.805771200Z BUILD FAILED
,2019-08-01T01:21:21.805774300Z /usr/src/jasperreports-server/buildomatic/bin/db-common.xml:45: The following error occurred while executing this line:

Support for JasperServer 7.5.0

Hi! Could anyone please give some hints on how can this image be upgraded to the latest JasperReports Server version? Thanks!

MySQL Client Error

I'm simply trying to run jasperserver:

docker-compose up

but then the build fails and I get the following error:

Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Could not connect: Client does not support authentication protocol requested by server; consider upgrading MySQL client

I've tried to run with the command line as well and got the same error.

EDIT: I've just tried to run with postgres as the database, following these instructions in another issue and it worked fine

ldap not working

After configuring the ldap I am trying to login with the ldap user, unable to log, I have followed the below process.

add the parameters in default_master.properties file
external.ldapUrl=ldap://hostname:389/dc=test,dc=com
external.ldapDn=cn=user,ou=test service,ou=test,dc=test,dc=com
external.ldapPassword=*******

after build the jasper application above parameters added in below file.
js.externalAuth.properties

external.ldap.url=ldap://hostname:389/dc=test,dc=com
external.ldap.username=cn=user,ou=test service,ou=test,dc=test,dc=com
external.ldap.password=*******

Is there anything I need to do for ldap, After I did this I am unable to login using ldap user.

Sample report and testing the rest api?

Hi!

I did first install jasperserver without docker on my windows-machine, there were a multiple of sample reports.
Now I have started up this jasperserver on my ubuntu, I would like to test the ability to (1) add a PDF-report (2) fetch the report with a restful-api (see https://community.jaspersoft.com/documentation/tibco-jasperreports-server-rest-api-reference/v710/rest-api-overview) - see the sectionReports in the documentation.

In the custom installation (without docker) , If I choose 'view' I will see an hierarchy in the left-menu 'root'/'Reports'/'Interactive' and there some sample reports like the 'Table Report'.
In the custom installation I have created a report fetching data from my mysql-database, the report is generated correctly, but I am not able to fetch it via the restful-api according to the documentation.

Would this case be good to document here, either in a md-file or in a wiki ?

best, i

Jasperserver exited with code 124

Hi,
i have this docker compose file:

version: '2'
services:
  postgres:
    image: postgres:latest
    ports:
      - "54323:5432"
    working_dir: /var/lib/postgresql/data
    volumes:
      - ./docker/postgresql/data:/var/lib/postgresql/data
    restart: always
    environment:
      - POSTGRES_DB=testy
      - POSTGRES_USER=testy_db_user
      - POSTGRES_PASSWORD=Testy#987
  jasperserver:
    image: retriever/jasperserver
    restart: always
    ports:
     - "8080:8080"
    environment:
     - DB_TYPE=postgres
     - DB_HOST=postgres
     - DB_PORT=54323
     - DB_USER=testy_db_user
     - DB_PASSWORD=Testy#987
    volumes:
     - ./docker/jasperserver:/jasperserver-import
    depends_on:
     - postgres
    links:
      - postgres

But, if i try run project from docker compose file by command docker-compose up then i get on the console this:

postgres_1      | LOG:  database system was shut down at 2017-10-12 15:04:36 UTC
postgres_1      | LOG:  MultiXact member wraparound protections are now enabled
jasperserver_1  | wait-for-it.sh: waiting 30 seconds for postgres:54323
postgres_1      | LOG:  database system is ready to accept connections
postgres_1      | LOG:  autovacuum launcher started
jasperserver_1  | wait-for-it.sh: timeout occurred after waiting 30 seconds for postgres:54323
testy_jasperserver_1 exited with code 124

Configuration of the postgres servise is correct, i can connect to the database.
Please, where i have a problem?

Can't create database 'jasperserver'; database exists

I've used this Docker image of Jasperreports server. It works fine for the first time but when I down all containers and make them up jasperserver exit with code 1.

jasperserver | Caused by: org.mariadb.jdbc.internal.common.QueryException: Can't create database 'jasperserver'; database exists

I want to keep the old Database of Jasperreport server.
Is there a solution to make Jasper use the old Database without recreating it?

Plugin Web Service Data Source

I need add plugin Web Service Data Source, but when coppy files to restart container, new configuration jasper-server in tomcat. I need help :)

enable SSL

How to enable ssl for mysql connections

Two missing bundles

Hi,
i've found when trying to access the jasper server via web browser at
http://localhost:8080/login.html

there are two missing request that makes the browser stop. The two XHR request are:
/rest_v2/bundles/AttributeBundle
/rest_v2/bundles/CommonBundle

I've attached output from docker-compose logs
log.txt

Should i download those bundles manually?
Regards.

Support for Oracle 11

I want to know what changes are needed to support a oracle 11g container.

Greetings

Rest V2 API

Hi.

I've been trying to access the reports through the rest API. As stated here: https://community.jaspersoft.com/documentation/jasperreports-server-web-services-guide/v56/rest-server-information. Every time I call one endpoint I just get 404.

I searched and tried different things to solve this issue. Looks like the endpoints are not available on Tomcat. I was wondering if this could be related to the configuration to force the jasperserver to run as the default application.

I have checked the config file and the rest_v2 endpoint is configured there.

Thanks for your work. This is a really good project and it's helping a lot.

Let me know if I can help with something.

7.8.x support?

When do you will support CE 7.8.x?
I tried just by just changing the version in the Docker files and obviously, it did not work as the UI was not reachable 8-).
I guess something changed in the install process or SQL's 8-(

export.zip

Fantastic container. Everything just worked export the export.zip import. I know i am just doing something wrong. Looking at the bootstrap script it looks like on the first run it checks to see if folder exists and then if not creates database and checks the jasperserver-imports folder for zip archives.

So to make sure everything was cleaned on my test db i just removed /var/lib/docker for 100% fresh take on everything.

I then run your docker mysql run command and that comes up great.

I then do ...

docker run --volume jasperserver-import:/jasperserver-import --rm --name jasperserver -e DB_TYPE=mysql -e DB_HOST=db -e DB_PORT=3306 -e DB_USER=root -e DB_PASSWORD=mysql --link jasperserver_mysql:db -p 8080:8080 retriever/jasperserver (putting this into foreground mode so i could watch the boot strap).

I run this from the parent directory of jasperserver-import.

It bootstraps, it runs, its accessible but the export.zip file in ./jasperserver-import doesn't get imported.

I have attached the output from the bootstrap process.

jasperserver_bootstrap.txt

Thanks!!

run after import

After doing export and import, occours following error :

docker run -d --name jasperserver -e DB_TYPE=mysql -e DB_HOST=database -e DB_PORT=3306 -e DB_USER=root -e DB_PASSWORD=1234 --link database -p 8080:8080 jasper-server/shoot /entrypoint.sh

wait-for-it.sh: waiting 30 seconds for database:3306
wait-for-it.sh: database:3306 is available after 0 seconds
/entrypoint.sh: line 55: catalina.sh: command not found

Invalid credentials supplied could not login jasperreports

Whenever I install the jasper reports first time in as a k8s pod, I am able to login but after restart/re-create the pod I am unable to login throwing below error.
invalid credentials supplied could not login jasper reports.

I am using the below image and jasper version 7.5.0 and PostgreSQL version is 14, Can you please suggest me what I missed in the installation process and I am not getting any errors related to login issue. I am struggling with this issue.
retriever/jasperserver:latest

Mail support

Is there an easy way to add support for email by environments variables?
(By the way I am using in Kubernetes cluster your image. It is working pretty much nice.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.