I do have log.conf under rpc/. All user groups have read permissions to the
file. This is what the file looks like:

#########################################
# Log4perl Config for the REST Handler
# Note - the handler runs with the privileges of the webserver user
# ensure appropriate rights for the used log files!

log4perl.category.client.rpc = INFO, Logfile

log4perl.appender.Logfile  = Log::Log4perl::Appender::File
log4perl.appender.Logfile.recreate = 1
log4perl.appender.Logfile.recreate_check_interval = 120
log4perl.appender.Logfile.filename = /var/log/openxpki/rpc.log
log4perl.appender.Logfile.layout   = Log::Log4perl::Layout::PatternLayout
log4perl.appender.Logfile.layout.ConversionPattern = %d %p{3} %m [pid=%P]%n
log4perl.appender.Logfile.syswrite  = 1
#########################################

I did get messages earlier to rpc.log, so I believe that part should work.
Some entries I got earlier:

2022/08/08 10:47:39 WAR Unable to detect script name - please check the
docs [pid=1186]
2022/08/08 10:47:39 ERR Unable to query OpenAPI specification from OpenXPKI
server:
I18N_OPENXPKI_CLIENT_SEND_RECEIVE_SERVICE_MSG_ERROR_DURING_SEND_SERVICE_MSG;
__EVAL_ERROR__ => I18N_OPENXPKI_CLIENT_INIT_CONNECTION_FAILED; __ERROR__ =>
No such file or directory, __SOCKETFILE__ => /var/openxpki/openxpki.socket
[pid=1186]
2022/08/08 10:47:39 ERR 50004 - Unable to query OpenAPI specification from
OpenXPKI server [pid=1186]

However, sending queries to RPC now does not write anything to the file.

ma 8. elok. 2022 klo 18.00 Oliver Welter ([email protected]) kirjoitti:

> Hi Simon,
>
> does your log config exist and is it readable by the apache process?
>
> Oliver
>
> On 08.08.22 16:12, Simon Borg wrote:
> > Hi,
> >
> > I have followed the quickstart guide in
> > https://openxpki.readthedocs.io/en/latest/quickstart.html and managed
> > to get openxpki web UI working (used the sampleconfig script). So now
> > I'm running openxpki version 3.20 on Debian 10.
> >
> > My goal is to automate some stuff using the RPC, but I can't make it
> > work even after browsing the mail archives. I for example have
> > /etc/openxpki/rpc/public.conf which has the following inside:
> >
> > ######################################################
> > [global]
> > log_config = /etc/openxpki/rpc/log.conf
> > log_facility = client.rpc
> > socket = /var/openxpki/openxpki.socket
> > realm = democa
> > #locale_directory: /usr/share/locale
> > default_language = en_US
> >
> > [auth]
> > stack = _System
> >
> > [input]
> > allow_raw_post = 1
> > parse_depth = 5
> >
> > [output]
> > use_http_status_codes=1
> >
> > [openapi]
> > title = Public Certificate API
> >
> > [SearchCertificate]
> > workflow = certificate_search
> > param = common_name
> > # append "certificate" if you want the full PEM block in the result
> > output = cert_identifier, notbefore, notafter, status
> > ######################################################
> >
> > If I call for example: curl -F "method=openapi-spec"
> > http://localhost:80/rpc/public <http://localhost:80/rpc/public>
> >
> > It returns the following message:
> > {"error":{"code":50000,"message":"Unable to fetch configuration from
> > server - connect failed","data":{"pid":4518}},"rpc_failure":1}
> >
> > I have tried other methods too also from enroll.conf, but they always
> > return the same error.
> >
> > Also nothing gets written into /var/log/openxpki/rpc.log or
> > catchall.log. Only apache2:s error.log gets the line [Mon Aug 08
> > 14:09:10.638387 2022] [fcgid:warn] [pid 1565:tid 140651006596864]
> > [client ::1:58404] mod_fcgid: stderr: [Mon Aug  8 14:09:10 2022]
> > rpc.fcgi: Client Connect Failed: Can't call method "error" on an
> > undefined value at /usr/lib/cgi-bin/rpc.fcgi line 108.
> >
> > At this point I'm running out of ideas to try, what should I do next?
> >
> > Best,
> >
> > Simon
> >
> >
> > _______________________________________________
> > OpenXPKI-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/openxpki-users
>
> --
> Protect your environment -  close windows and adopt a penguin!
>
>
>
> _______________________________________________
> OpenXPKI-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openxpki-users
>
_______________________________________________
OpenXPKI-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openxpki-users

Reply via email to