Jump to content
We've recently updated our Privacy Statement, available here ×

I deleted anonymousUser in AMI Jasperserver 5.5, now Jasperserver is useless.


andey.wei
Go to solution Solved by marianol,

Recommended Posts

Exactly: http://community.bitnami.com/t/crash-after-deleting-anonymoususer-on-jasperreports/22967
And: http://community.jaspersoft.com/questions/821774/i-deleted-included-users-create-my-own-organization-now-i-get-internal-server-error

Neither of these two questions have an answer. What am I expected to do? Just launch a new instance?
(Just a suggestion: If the anonymousUser is essential, then I shouldn't be able to delete it from the UI)

Screenshot-03112014-02_35_30PM.png.0f535a6d521de78b6b60c02231ea91af.png

 

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • Solution

Good call, that looks like a bug, even though there may be someuse cases when you need to delete the anonymous user it should have better warnings when you do it :) You can file an enhancement request here.

As a fix you need to recreate that user. I exported the user and role for the Anonymous user from my instance, you can import that to your JasperServer instace and that should fix the issue. The export is attached to this answer download the ZIP file attached to your computer you will need it.

There are 2 ways to do this:
1) the Easy one it may not work but is easy to try: 
  - login as superuser, since you cannot see the login page (because there is no anonymous user). To login use a URL like this one http://My-EC2-Instance-IP.compute-1.amazonaws.com/jasperserver-pro/flow.html?_flowId=homeFlow&j_username=superuser&j_password=superuser (change the superuser password to the one you are using)
  - that should log you in as superuser and land you in the home page
  - Go in the menu to Manage -> Server Settings -> Import
   - Select the export you downloaded from here and click import
   - Wait for the import to finish and you can check the creation on the user from there
    - Log Out and you should be good to go!!

2) If option one did not work, for some reason you were not able to login, ssh into your EC2 instance and copy the ZIP file to the instance home folder. You will need to use the buildomatic scripts that come with Jasper to import the file. Those scripts are explained in the Install guide http://community.jaspersoft.com/documentation/jasperreports-server-install-guide-commercial-edition-1

The scripts are located in the EC2 Instance in '/usr/share/jrs_dist/jasperreports-server-5.5-bin/buildomatic' follow the instruccions on the Install guide. the script you need to use is js-import.sh if you do './js-import.sh --help' it will show you the way to use it, if my memory is right it should be something like './js-import.sh --input-zip /path/to/AnonUser-export.zip --update-core-users'

Good Luck!!

Link to comment
Share on other sites

  • 2 months later...
Ups in that case you are in big trouble :) I'm not in my computer now, but you can spin up a new AWS instance, login as superuser and export all the standard users (jasperadmin, superuser, anonymous, etc) and import them in your old instance, that should fix the issue the same it did for @andey.wei
Link to comment
Share on other sites

  • 2 weeks later...

Hi, I encounter this problem today too. 

I think an easier solution to solve it it to manually reinsert the user in the PostgreSQL database used by JasperServer. 

Here is how I did it : 

$ cd /home/ec2-user/jasperreports-server-cp-5.5.0a/postgresql$ bin/psql/bin/psql jasperserver -U postgres -p 5432jaspserserver# insert into jiuser(id, username, tenantid, fullname, emailaddress, password, externallydefined, enabled, previouspasswordchangetime) values(6, 'anonymousUser', 1, 'Anonymous User', 'contact@gomoob.com', 'XXXXXXXXXXXXXXXXXX', false, true, '2014-06-27 11:42:15.077');insert into jiuserrole values(4, 6);

Then simply restarts JasperServer and it shold work again. 

Hope this helps. 

Baptiste Gaillard

Link to comment
Share on other sites

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...