andey.wei Posted March 11, 2014 Share Posted March 11, 2014 Exactly: http://community.bitnami.com/t/crash-after-deleting-anonymoususer-on-jasperreports/22967And: http://community.jaspersoft.com/questions/821774/i-deleted-included-users-create-my-own-organization-now-i-get-internal-server-errorNeither 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) Link to comment Share on other sites More sharing options...
Solution marianol Posted March 11, 2014 Solution Share Posted March 11, 2014 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-1The 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 More sharing options...
hozawa Posted March 12, 2014 Share Posted March 12, 2014 Seems a safer way is to use the web service api to add the user back in. Link to comment Share on other sites More sharing options...
andey.wei Posted March 12, 2014 Author Share Posted March 12, 2014 Thanks once again marianol, option #2 worked like a charm Link to comment Share on other sites More sharing options...
gkm010 Posted June 11, 2014 Share Posted June 11, 2014 in my case all users are deleted i guess..plz help me thank in advance Link to comment Share on other sites More sharing options...
marianol Posted June 18, 2014 Share Posted June 18, 2014 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 More sharing options...
baptiste.gaillard Posted June 27, 2014 Share Posted June 27, 2014 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now