Hi Billy,
I see that you don't have issues open on this project but it looks really interesting! I have been trying to build it to use locally.
I get what seems like a good authentication with my iRODS server but things get troubled after that. I am running gdb and ending up at a null function pointer in auth.c for 'ap_session_load_fn' I thought perhaps you would have some advice on steps forward?
I'll appended below:
- cadaver command line used as a test driver
- gdb session on apache
- apache error log
Any advice or suggestions would be most welcome.
Best,
Blake
Test driver using cadaver (same results come from a firefox session)
mradmin@mrtest:~$ cadaver -t mrtest.kyb.local
Authentication required for DAV on server `mrtest.kyb.local':
Username: mrdata
Password:
Could not open collection:
Could not read status line: connection timed out
dav:/?
gdb sesesion running apache:
root@mrtest:~# export APACHE_RUN_DIR=/etc/apache2/
root@mrtest:~# export HOME=/root
root@mrtest:~# . /etc/apache2/envvars
root@mrtest:/root# gdb /usr/sbin/apache2
GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/apache2...(no debugging symbols found)...done.
(gdb) r -X
Starting program: /usr/sbin/apache2 -X
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Mon Jan 25 15:09:14.847264 2021] [so:warn] [pid 3831:tid 140737354039296] AH01574: module davrods_module is already loaded, skipping
[Mon Jan 25 15:09:14.869779 2021] [core:trace3] [pid 3831:tid 140737354039296] core.c(3355): Setting LogLevel for all modules to trace8
[New Thread 0x7fffe8606700 (LWP 3835)]
< ... snip ...>
[New Thread 0x7fff89ffb700 (LWP 3861)]
[Thread 0x7fffe8606700 (LWP 3835) exited]
Thread 5 "apache2" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe6e03700 (LWP 3838)]
0x0000000000000000 in ?? ()
(gdb) backtrace
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff5204bdf in GetSessionAuth (req_p=0x7ffff7eab0a0, user_ss=0x7fffe6e02968, password_ss=0x7fffe6e02970, hash_ss=0x7fffe6e02978) at auth.c:440
#2 0x00007ffff5206fbd in GetIRODSConnectionFromRequest (req_p=0x7ffff7eab0a0) at common.c:368
#3 0x00007ffff520b47e in FillInPrivateResourceData (req_p=0x7ffff7eab0a0, resource_pp=0x7fffe6e02a38, root_dir_s=0x7ffff7f3a778 "/") at repo.c:402
#4 0x00007ffff520b67a in dav_repo_get_resource (r=0x7ffff7eab0a0, root_dir=0x7ffff7f3a778 "/", label=0x0, use_checked_in=0, result_resource=0x7fffe6e02ae8) at repo.c:478
#5 0x00007ffff543eadf in ?? () from /usr/lib/apache2/modules/mod_dav.so
#6 0x00007ffff5442259 in ?? () from /usr/lib/apache2/modules/mod_dav.so
#7 0x00007ffff54436c0 in ?? () from /usr/lib/apache2/modules/mod_dav.so
#8 0x00005555555add10 in ap_run_handler ()
#9 0x00005555555ae28d in ap_invoke_handler ()
#10 0x00005555555c5c9b in ap_process_async_request ()
#11 0x00005555555c2340 in ?? ()
#12 0x00005555555b7af0 in ap_run_process_connection ()
#13 0x00007fffe9aaeecf in ?? () from /usr/lib/apache2/modules/mod_mpm_event.so
#14 0x00007fffe9aaf8e5 in ?? () from /usr/lib/apache2/modules/mod_mpm_event.so
#15 0x00007ffff74e96db in start_thread (arg=0x7fffe6e03700) at pthread_create.c:463
#16 0x00007ffff721271f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb)
Apache /var/log/apach2/error.log
[Mon Jan 25 15:09:14.945678 2021] [so:warn] [pid 3831:tid 140737354039296] AH01574: module davrods_module is already loaded, skipping
[Mon Jan 25 15:09:14.946913 2021] [core:trace3] [pid 3831:tid 140737354039296] core.c(3355): Setting LogLevel for all modules to trace8
[Mon Jan 25 15:09:14.948312 2021] [watchdog:debug] [pid 3831:tid 140737354039296] mod_watchdog.c(454): AH010033: Watchdog: Running with WatchdogInterval 1000ms
[Mon Jan 25 15:09:14.948346 2021] [watchdog:debug] [pid 3831:tid 140737354039296] mod_watchdog.c(462): AH02974: Watchdog: found parent providers.
[Mon Jan 25 15:09:14.948357 2021] [watchdog:debug] [pid 3831:tid 140737354039296] mod_watchdog.c(508): AH02977: Watchdog: found child providers.
[Mon Jan 25 15:09:14.948366 2021] [watchdog:debug] [pid 3831:tid 140737354039296] mod_watchdog.c(516): AH02978: Watchdog: Looking for child (_default_).
[Mon Jan 25 15:09:14.948375 2021] [watchdog:debug] [pid 3831:tid 140737354039296] mod_watchdog.c(516): AH02978: Watchdog: Looking for child (_singleton_).
[Mon Jan 25 15:09:14.948393 2021] [core:warn] [pid 3831:tid 140737354039296] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon Jan 25 15:09:14.948800 2021] [core:trace4] [pid 3831:tid 140737354039296] mpm_common.c(533): mpm child 3831 (gen 0/slot 0) started
[Mon Jan 25 15:09:14.951749 2021] [watchdog:debug] [pid 3831:tid 140737354039296] mod_watchdog.c(565): AH02980: Watchdog: nothing configured?
[Mon Jan 25 15:09:14.952218 2021] [mpm_event:debug] [pid 3831:tid 140737092019968] event.c(2218): AH02471: start_threads: Using epoll (wakeable)
[Mon Jan 25 15:11:59.968931 2021] [mpm_event:trace6] [pid 3831:tid 140735508625152] event.c(1612): connections: 0 (clogged: 0 write-completion: 0 keep-alive: 0 lingering: 0 suspended: 0)
[Mon Jan 25 15:11:59.969136 2021] [core:trace5] [pid 3831:tid 140737083627264] protocol.c(653): [client 10.38.10.164:42644] Request received from client: OPTIONS / HTTP/1.1
[Mon Jan 25 15:11:59.969248 2021] [http:trace4] [pid 3831:tid 140737083627264] http_request.c(420): [client 10.38.10.164:42644] Headers received from client:
[Mon Jan 25 15:11:59.969271 2021] [http:trace4] [pid 3831:tid 140737083627264] http_request.c(424): [client 10.38.10.164:42644] User-Agent: cadaver/0.23.3 neon/0.30.2
[Mon Jan 25 15:11:59.969295 2021] [http:trace4] [pid 3831:tid 140737083627264] http_request.c(424): [client 10.38.10.164:42644] Keep-Alive:
[Mon Jan 25 15:11:59.969304 2021] [http:trace4] [pid 3831:tid 140737083627264] http_request.c(424): [client 10.38.10.164:42644] Connection: TE, Keep-Alive
[Mon Jan 25 15:11:59.969313 2021] [http:trace4] [pid 3831:tid 140737083627264] http_request.c(424): [client 10.38.10.164:42644] TE: trailers
[Mon Jan 25 15:11:59.969321 2021] [http:trace4] [pid 3831:tid 140737083627264] http_request.c(424): [client 10.38.10.164:42644] Host: mrtest.kyb.local
[Mon Jan 25 15:11:59.969420 2021] [authz_core:debug] [pid 3831:tid 140737083627264] mod_authz_core.c(809): [client 10.38.10.164:42644] AH01626: authorization result of Require valid-user : denied (no authenticated user yet)
[Mon Jan 25 15:11:59.969468 2021] [authz_core:debug] [pid 3831:tid 140737083627264] mod_authz_core.c(809): [client 10.38.10.164:42644] AH01626: authorization result of <RequireAny>: denied (no authenticated user yet)
[Mon Jan 25 15:11:59.969481 2021] [core:trace3] [pid 3831:tid 140737083627264] request.c(119): [client 10.38.10.164:42644] auth phase 'check user' gave status 401: /
[Mon Jan 25 15:11:59.969549 2021] [http:trace3] [pid 3831:tid 140737083627264] http_filters.c(1128): [client 10.38.10.164:42644] Response sent with status 401, headers:
[Mon Jan 25 15:11:59.969572 2021] [http:trace5] [pid 3831:tid 140737083627264] http_filters.c(1135): [client 10.38.10.164:42644] Date: Mon, 25 Jan 2021 15:11:59 GMT
[Mon Jan 25 15:11:59.969583 2021] [http:trace5] [pid 3831:tid 140737083627264] http_filters.c(1138): [client 10.38.10.164:42644] Server: Apache/2.4.29 (Ubuntu)
[Mon Jan 25 15:11:59.969597 2021] [http:trace4] [pid 3831:tid 140737083627264] http_filters.c(957): [client 10.38.10.164:42644] WWW-Authenticate: Basic realm=\\"DAV\\"
[Mon Jan 25 15:11:59.969609 2021] [http:trace4] [pid 3831:tid 140737083627264] http_filters.c(957): [client 10.38.10.164:42644] Content-Length: 463
[Mon Jan 25 15:11:59.969621 2021] [http:trace4] [pid 3831:tid 140737083627264] http_filters.c(957): [client 10.38.10.164:42644] Keep-Alive: timeout=5, max=100
[Mon Jan 25 15:11:59.969632 2021] [http:trace4] [pid 3831:tid 140737083627264] http_filters.c(957): [client 10.38.10.164:42644] Connection: Keep-Alive
[Mon Jan 25 15:11:59.969644 2021] [http:trace4] [pid 3831:tid 140737083627264] http_filters.c(957): [client 10.38.10.164:42644] Content-Type: text/html; charset=iso-8859-1
[Mon Jan 25 15:12:04.974795 2021] [mpm_event:trace6] [pid 3831:tid 140735508625152] event.c(1612): connections: 1 (clogged: 0 write-completion: 0 keep-alive: 0 lingering: 0 suspended: 0)
[Mon Jan 25 15:12:04.974985 2021] [core:trace6] [pid 3831:tid 140737075234560] core_filters.c(525): [client 10.38.10.164:42644] core_output_filter: flushing because of FLUSH bucket
[Mon Jan 25 15:12:08.995556 2021] [mpm_event:trace6] [pid 3831:tid 140735508625152] event.c(1612): connections: 1 (clogged: 0 write-completion: 0 keep-alive: 0 lingering: 1 suspended: 0)
[Mon Jan 25 15:12:08.996045 2021] [core:trace5] [pid 3831:tid 140737066841856] protocol.c(653): [client 10.38.10.164:42646] Request received from client: OPTIONS / HTTP/1.1
[Mon Jan 25 15:12:08.996150 2021] [http:trace4] [pid 3831:tid 140737066841856] http_request.c(420): [client 10.38.10.164:42646] Headers received from client:
[Mon Jan 25 15:12:08.996176 2021] [http:trace4] [pid 3831:tid 140737066841856] http_request.c(424): [client 10.38.10.164:42646] User-Agent: cadaver/0.23.3 neon/0.30.2
[Mon Jan 25 15:12:08.996221 2021] [http:trace4] [pid 3831:tid 140737066841856] http_request.c(424): [client 10.38.10.164:42646] Keep-Alive:
[Mon Jan 25 15:12:08.996232 2021] [http:trace4] [pid 3831:tid 140737066841856] http_request.c(424): [client 10.38.10.164:42646] Connection: TE, Keep-Alive
[Mon Jan 25 15:12:08.996242 2021] [http:trace4] [pid 3831:tid 140737066841856] http_request.c(424): [client 10.38.10.164:42646] TE: trailers
[Mon Jan 25 15:12:08.996251 2021] [http:trace4] [pid 3831:tid 140737066841856] http_request.c(424): [client 10.38.10.164:42646] Host: mrtest.kyb.local
[Mon Jan 25 15:12:08.996260 2021] [http:trace4] [pid 3831:tid 140737066841856] http_request.c(424): [client 10.38.10.164:42646] Authorization: Basic bXJkYXRhOk1EZ3pZbVF4Tm1KbFlqUTJZekk0TkdKbE1EZGxPVGhq
[Mon Jan 25 15:12:08.996356 2021] [authz_core:debug] [pid 3831:tid 140737066841856] mod_authz_core.c(809): [client 10.38.10.164:42646] AH01626: authorization result of Require valid-user : denied (no authenticated user yet)
[Mon Jan 25 15:12:08.996408 2021] [authz_core:debug] [pid 3831:tid 140737066841856] mod_authz_core.c(809): [client 10.38.10.164:42646] AH01626: authorization result of <RequireAny>: denied (no authenticated user yet)
[Mon Jan 25 15:12:08.996428 2021] [davrods:debug] [pid 3831:tid 140737066841856] auth.c(621): [client 10.38.10.164:42646] Authenticating iRODS username 'mrdata' using Native auth scheme.
[Mon Jan 25 15:12:08.996481 2021] [davrods:error] [pid 3831:tid 140737066841856] username "(null)"
[Mon Jan 25 15:12:08.996508 2021] [davrods:error] [pid 3831:tid 140737066841856] mem pool "0"
[Mon Jan 25 15:12:08.996521 2021] [davrods:debug] [pid 3831:tid 140737066841856] auth.c(145): [client 10.38.10.164:42646] Connecting to iRODS using address <mrirods.kyb.local:1247>, username <mrdata> and zone <MRDataZone>
[Mon Jan 25 15:12:08.996554 2021] [davrods:debug] [pid 3831:tid 140737066841856] auth.c(153): [client 10.38.10.164:42646] Using iRODS env file at </etc/apache2/irods/irods_environment.json>
[Mon Jan 25 15:12:09.118999 2021] [davrods:debug] [pid 3831:tid 140737066841856] auth.c(162): [client 10.38.10.164:42646] Succesfully connected to iRODS zone 'MRDataZone'
[Mon Jan 25 15:12:09.120482 2021] [davrods:debug] [pid 3831:tid 140737066841856] auth.c(168): [client 10.38.10.164:42646] Server version: rods4.2.8
[Mon Jan 25 15:12:09.120527 2021] [davrods:debug] [pid 3831:tid 140737066841856] auth.c(189): [client 10.38.10.164:42646] SSL negotiation result: <CS_NEG_USE_TCP>: will NOT use SSL (if using PAM, SSL will only be used during auth)
[Mon Jan 25 15:12:09.120542 2021] [davrods:debug] [pid 3831:tid 140737066841856] auth.c(194): [client 10.38.10.164:42646] Is SSL currently on? (ssl* = 0, ssl_on = 0) (ignore ssl_on, it seems 4.x does not update it after SSL is turned on automatically during rcConnect)
[Mon Jan 25 15:12:09.120553 2021] [davrods:debug] [pid 3831:tid 140737066841856] auth.c(243): [client 10.38.10.164:42646] Logging in
[Mon Jan 25 15:12:09.128351 2021] [davrods:debug] [pid 3831:tid 140737066841856] auth.c(299): [client 10.38.10.164:42646] Login succesful
[Mon Jan 25 15:12:09.128412 2021] [davrods:debug] [pid 3831:tid 140737066841856] auth.c(564): [client 10.38.10.164:42646] caching connection for mrdata
[Mon Jan 25 15:12:09.128807 2021] [authz_core:debug] [pid 3831:tid 140737066841856] mod_authz_core.c(809): [client 10.38.10.164:42646] AH01626: authorization result of Require valid-user : granted
[Mon Jan 25 15:12:09.128842 2021] [authz_core:debug] [pid 3831:tid 140737066841856] mod_authz_core.c(809): [client 10.38.10.164:42646] AH01626: authorization result of <RequireAny>: granted
Hi Billy,
I see that you don't have issues open on this project but it looks really interesting! I have been trying to build it to use locally.
I get what seems like a good authentication with my iRODS server but things get troubled after that. I am running gdb and ending up at a null function pointer in auth.c for 'ap_session_load_fn' I thought perhaps you would have some advice on steps forward?
I'll appended below:
Any advice or suggestions would be most welcome.
Best,
Blake
Test driver using cadaver (same results come from a firefox session)
gdb sesesion running apache:
Apache /var/log/apach2/error.log