简体   繁体   中英

Mantis SOAP-Error accessing mantisconnect.php (Eclipse Mylyn-Plugin)

I installed Mantis BT 1.2.19 on my server and it works well. To benefit from it in my Eclipse-IDE (Mars) I installed the Task-Repo Plugin for Mantis and tried to add the connection.

When I click on "Validate settings" in Eclipse I get the following error:

 SOAP-ERROR: Parsing WSDL: Couldn't load from '/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl' : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"

In my error-log on the server are the following entries

[14-Oct-2015 11:25:05 Europe/Berlin] [mantisconnect.php] Error Type: SYSTEM WARNING,
Error Description: SoapServer::SoapServer(): I/O warning : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
Stack Trace:
mantisconnect.php L121 SoapServer(<string>'mantisconnect.wsdl', <Array> { ['features'] => 5 })

[14-Oct-2015 11:25:05 Europe/Berlin] PHP Warning:  Uncaught SoapFault exception: [Server] Error Type: SYSTEM WARNING,
Error Description: SoapServer::SoapServer(): I/O warning : failed to load external entity &quot;/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl&quot; in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php:107
Stack trace:
#0 /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php(530): SoapActions::sendSoapFault('Server', 'Error Type: SYS...')
#1 [internal function]: mc_error_handler(2, 'SoapServer::Soa...', '/var/www/vhosts...', 121, Array)
#2 /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.php(121): SoapServer->SoapServer('mantisconnect.w...', Array)
#3 {main}
  thrown in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php on line 107
[14-Oct-2015 11:25:05 Europe/Berlin] PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from '/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl' : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
 in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.php on line 121

The errors above are produced by the Mantis plugin on accessing the URL

188.109.171.76 - - [14/Oct/2015:11:25:05 +0200] "POST /mantis/api/soap/mantisconnect.php HTTP/1.0" 500 1067 "-" "Mylyn/3.17.0 Mylyn-Mantis Connector/3.10.1 Apache Axis/1.4 Eclipse (org.eclipse.epp.package.jee.product) HttpClient/3.1 Java/1.8.0_60 (Oracle) Windows 7/6.1 (amd64; de_DE)"

But even a "normal" GET-access to the URL mentioned above produces the same error

https://{myhost}/mantis/api/soap/mantisconnect.php

No error is produced on accessing

https://{myhost}/mantis/api/soap/mantisconnect.php?wsdl

To solve the problem on my own I checked several ideas:

  • The file IS existant ... {myhost} is just a placeholder here obviously - placed by me
  • I switched to the context of the webserver www-data and tried accessing the file ... it IS accessible

So I´ve no idea...

PHP version is 5.5.9-1ubuntu4.13 on Ubuntu 14.04.3 LTS

€dit:

Tracked down the error to the following PHP-line in mantis/api/soap/mantisconnect.php

 $server = new SoapServer("mantisconnect.wsdl",
                        array('features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS)
        );

I don´t understand why there an error is thrown - because as I said: it exists and is readable by the webserver...

€edit2:

I replaced the line

 $server = new SoapServer("mantisconnect.wsdl",

with

$server = new SoapServer("http://{myhost}/mantis/api/soap/mantisconnect.wsdl",

THIS works... so I´ve a "solution" but I don´t know why the access via file does not work

I Think I found the answere on my own (my workaround failed some hours later - with same error again).

Seems to be a bug in PHP (on Ubuntu) as mentioned here https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1160336

Unresolved since 2013 :-(

My current workaround is disabling soap.wsdl_cache_enabled in php.ini which seems to help for the moment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM