Feb 4 15:34:02 pan simplesamlphp[6544]: 7 [74f1277e4a] cron [metarefresh]: In set [renatertest] loading source [hBut eduGAIN metadata fail to load. metadata/ directory doesn't get populated, limited traced in simplesaml log file:
ttps://federation.renater.fr/test/renater-test-metadata.xml]
Feb 4 15:34:15 pan simplesamlphp[6544]: 7 [74f1277e4a] Writing: /opt/testidp/simplesamlphp-1.13.2/metadata/metadata-renater-test/saml20-idp-remote.php
Feb 4 15:34:16 pan simplesamlphp[6544]: 6 [74f1277e4a] cron [metarefresh]: Executing set [edugain]It seems that the code dies silently.
Feb 4 15:34:16 pan simplesamlphp[6544]: 7 [74f1277e4a] cron [metarefresh]: In set [edugain] loading source [http://mds.edugain.org/]
| Olivier Salaün Etudes et projets applicatifs |
|
| Tél : +33 2 23 23 71 27 Fax : +33 2 23 23 71 11 www.renater.fr |
RENATER 263 Avenue du Gal Leclerc 35042 Rennes Cedex |
Hi Olivier!On 04 Feb 2015, at 16:34 pm, Olivier Salaün <olivier...@renater.fr> wrote: Hi, I hope this is the right place to submit issues; I could not find simpleSAMLphp's bug tracker.We’ve been using github’s issue tracker since we moved there: https://github.com/simplesamlphp/simplesamlphp/issues
I am using simpleSAMLphp 1.13.2. I enabled the metarefresh module and configured it to load RENATER's Test federation metadata and eduGAIN metadata, see the attached config-metarefresh.php file. I then ran simpleSAML's cron.php?tag=hourly to trigger metadata refresh. RENATER's Test federation metadata get loaded and PHP files representing the corresponding SAML entities get created in metadata/ directory. I also find evidences in simplesaml lig file that it went well: Feb 4 15:34:02 pan simplesamlphp[6544]: 7 [74f1277e4a] cron [metarefresh]: In set [renatertest] loading source [h ttps://federation.renater.fr/test/renater-test-metadata.xml] Feb 4 15:34:15 pan simplesamlphp[6544]: 7 [74f1277e4a] Writing: /opt/testidp/simplesamlphp-1.13.2/metadata/metadata-renater-test/saml20-idp-remote.php But eduGAIN metadata fail to load. metadata/ directory doesn't get populated, limited traced in simplesaml log file: Feb 4 15:34:16 pan simplesamlphp[6544]: 6 [74f1277e4a] cron [metarefresh]: Executing set [edugain] Feb 4 15:34:16 pan simplesamlphp[6544]: 7 [74f1277e4a] cron [metarefresh]: In set [edugain] loading source [http://mds.edugain.org/] It seems that the code dies silently.Did you take a look at your web server’s error log? If SSP is dying it’s obviously not gonna print out anything to its log file, but you should find the reason for it dying at the error log.
[Thu Feb 05 16:52:47 2015] [error] [client 195.220.94.108] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 479989761 bytes) in /opt/testidp/simplesamlphp/modules/metarefresh/lib/MetaLoader.php on line 98I then increased PhP's memory_limit to 512M.
I started adding traces to the code, that dies within SAMLParser::processDescriptorsElement(). I did not go ahead because I miss a proper Php debugger. Is this a known issue of 1.13.2 version?There is a known issue with XML canonicalization in PHP, that makes the complexity to grow quadratically. That means a huge increase in the number of entities to canonicalize, means also an unaffordable increase of time for execution. 1.13.2 contains a workaround in xmlseclibs to avoid this problem, but your web server needs to be set up with enough memory to process a metadata file as big as eduGAIN’s. So yeah, as Daniel was saying, looks like you’ve been bitten but your own memory limit. Try increasing both the maximum execution time and the memory limit and run metarefresh again.
But parsing of eduGAIN metadata still fails.
[...]
Eventually I found errors in Apache log files including this one : [Thu Feb 05 16:52:47 2015] [error] [client 195.220.94.108] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 479989761 bytes) in /opt/testidp/simplesamlphp/modules/metarefresh/lib/MetaLoader.php on line 98 I then increased PhP's memory_limit to 512M. I don't get that error anymore, but metarefresh still does not create output files for eduGAIN.Nor any other errors? Neither in apache logs or in SSP logs? That’s strange...
I changed Php configuration with: • memory_limit = 512M • max_execution_time = 300 But parsing of eduGAIN metadata still fails.The memory limit is actually the same I have in my virtual machines, where I test SSP. The max_execution_time should be enough I think, but that could be the problem. In any reasonable machine it shouldn’t take more than 5 minutes, but I would just increase it and try again.
How do other institutions part of eduGAIN cope with this?I forgot in my previous email to add a link to a notice we published on SSP’s website some time ago: https://simplesamlphp.org/metaprocessing
Runing metadata parsing on a different server like Terena?That’s an option, though with the patched xmlseclibs it shouldn’t be necessary.
If so, are they using a standard simpleSAMLphp? using metarefresh.php script?Yes, it should just work. I’ve just tried in my local installation running on a virtual machine (which is therefore a bit limited) and consumption of eduGAIN metadata (with metarefresh) completed successfully in a bit more than a minute. So I don’t see any reason why it shouldn’t work for you...