JayVora-SerpentCS / Jasperreports_odoo

Jasper Reports Engine for Odoo
http://www.serpentcs.com
81 stars 140 forks source link

Permission error #136

Open docimin opened 2 years ago

docimin commented 2 years ago

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 commented 2 years ago

@hiren-serpentcs

hiren-serpentcs commented 2 years ago

@docimin

You need to give the write permission to the jasper_reports module

docimin commented 2 years ago

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

hiren-serpentcs commented 2 years ago

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

docimin commented 2 years ago

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

sfeterman commented 1 year ago

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

sfeterman commented 1 year ago

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 commented 8 months ago

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

baydevincent commented 8 months ago

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

baydevincent commented 8 months ago

@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 commented 8 months ago

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

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

baydevincent commented 8 months ago

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

rmcasado commented 8 months ago

@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 commented 8 months ago

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

rmcasado commented 8 months ago

@baydevincent

Hi, my configuraion :

image

chmod 777 -R /jasper_reports

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: