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

Permission error #136

Open
docimin opened this issue Apr 22, 2022 · 15 comments
Open

Permission error #136

docimin opened this issue Apr 22, 2022 · 15 comments

Comments

@docimin
Copy link

docimin commented Apr 22, 2022

Hello! I seem to be having issue with the reporting module, and whatever I do, i keep getting this error. How or where do i fix this?

  File "/opt/odoo/odoo-server/odoo/http.py", line 835, in dispatch
    r = self._call_function(**self.params)
  File "/opt/odoo/odoo-server/odoo/http.py", line 346, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo-server/odoo/service/model.py", line 98, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo-server/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/odoo-server/odoo/http.py", line 941, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo-server/odoo/http.py", line 519, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/custom/addons/jasper_reports/controllers/main.py", line 58, in report_routes
    context).render_jasper(docids, data=data)
  File "/opt/odoo/custom/addons/jasper_reports/models/report_xml.py", line 186, in render_jasper
    jasper = r.execute()
  File "/opt/odoo/custom/addons/jasper_reports/JasperReports/jasper_report_config.py", line 174, in execute
    data_file, output_file, sub_report_data_files)
  File "/opt/odoo/custom/addons/jasper_reports/JasperReports/jasper_report_config.py", line 260, in execute_report
    connection_parameters, self.report_path, output_file, parameters)
  File "/opt/odoo/custom/addons/jasper_reports/JasperReports/jasper_server.py", line 115, in execute
    self.start()
  File "/opt/odoo/custom/addons/jasper_reports/JasperReports/jasper_server.py", line 105, in start
    with open(self.pidfile, 'w') as f:
PermissionError: [Errno 13] Permission denied: 'odoo-jasper.pid'
@JayVora-SerpentCS
Copy link
Owner

@hiren-serpentcs

@hiren-serpentcs
Copy link
Collaborator

@docimin

You need to give the write permission to the jasper_reports module

@docimin
Copy link
Author

docimin commented May 24, 2022

Hey @hiren-serpentcs, thank you, but do you mean with CHMOD 775 for example? Or where exactly? Linux side or Odoo side?

@hiren-serpentcs
Copy link
Collaborator

@docimin
From the Linux side, you need to give the 777 permission (chmod 777 <PATH TO MODULE>/jasper_reports).

@docimin
Copy link
Author

docimin commented Jun 8, 2022

Hey @hiren-serpentcs, i have done this, still will not work.

For reference, the .jrxml is completely empty and has nothing in it. And it does not even print out a blank page, just gives an "invisible error" instead

image
image

@ghost
Copy link

ghost commented May 8, 2023

Hello, we are getting this error message also, we have tried to giove permission to the files, the folder, reassing then to the odoo group but still get the same message, please help us, this is generating a lot of pressure from customers, Thank you Jay for your sharing this!!

@ghost
Copy link

ghost commented May 11, 2023

Hi, sorry about the insistence on this issue, but we have now a lot of reports that were working and now are not. How can we get help on this issue?
Thanks

@rmcasado
Copy link

hi, also got the same problem, 777 permissions were given but does not work

@baydevincent
Copy link

im also facing this issue, any help? @hiren-serpentcs

@baydevincent
Copy link

@rmcasado
i solve this by create odoo-jasper.pid at another folder and give it permission (sudo chmod 777 /[PATH]/odoo-jasper.pid)
and then edit your odoo config file and add this to your line

jasperpid = /[Your PATH]/odoo-jasper.pid

@rmcasado
Copy link

@baydevincent thanks !!!! Now I got a connection error :(

odoo.addons.jasper_reports.JasperReports.jasper_server: EXCEPTION: [Errno 111] Connection refused (111, 'Connection refused')

@baydevincent
Copy link

@rmcasado i got the same issue, i trying to solve that
or maybe you can post that as new issue

@rmcasado
Copy link

@baydevincent finally found the problem, java directory was not right copied, only java classes in com and nothing in lib, after copied could run my reports again

@baydevincent
Copy link

@rmcasado may i ask what java version do you use? because i still got the refused issue

@rmcasado
Copy link

@baydevincent

Hi, my configuraion :

  • Ubuntu 20.04.6 LTS
  • Odoo 14
  • Python 3.9
  • Java 11 - /usr/lib/jvm/java-11-amazon-corretto
    Also works with
    /jasper_reports/java

image

chmod 777 -R /jasper_reports

  • odoo14.conf
    server_wide_modules = base,web,jasper_load
    jasperpid=/jasper_reports/JasperReports/odoo-jasper.pid

chmod 777 /jasper_reports/JasperReports/odoo-jasper.pid

Modified jasper_server to use jasperpid
#with open(self.pidfile, 'w') as f:
with open(os.path.join(self.path(), self.pidfile), 'w') as f:

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

5 participants