Mantis SOAP-访问 mantisconnect.php 时出错(Eclipse Mylyn 插件)
Mantis SOAP-Error accessing mantisconnect.php (Eclipse Mylyn-Plugin)
我在服务器上安装了 Mantis BT 1.2.19,运行良好。为了在我的 Eclipse-IDE (Mars) 中受益,我安装了 Mantis 的 Task-Repo 插件并尝试添加连接。
当我在 Eclipse 中单击 "Validate settings" 时,出现以下错误:
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"
在我的服务器错误日志中有以下条目
[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 "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl" 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
以上错误是由 Mantis 插件在访问 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)"
但即使是对上述 URL 的 "normal" GET 访问也会产生相同的错误
https://{myhost}/mantis/api/soap/mantisconnect.php
访问没有错误
https://{myhost}/mantis/api/soap/mantisconnect.php?wsdl
为了自己解决这个问题,我检查了几个想法:
- 文件存在...{myhost} 显然只是一个占位符 - 由我放置
- 我切换到网络服务器的上下文
www-data
并尝试访问该文件...它是可访问的
所以我不知道...
PHP 版本是 5.5.9-1ubuntu4.13
Ubuntu 14.04.3 LTS
€编辑:
追踪到 mantis/api/soap/mantisconnect.php
中的以下 PHP 行的错误
$server = new SoapServer("mantisconnect.wsdl",
array('features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS)
);
我不明白为什么会抛出错误 - 因为正如我所说:它存在并且可由网络服务器读取...
€edit2:
我替换了行
$server = new SoapServer("mantisconnect.wsdl",
与
$server = new SoapServer("http://{myhost}/mantis/api/soap/mantisconnect.wsdl",
这有效...所以我有一个 "solution" 但我不知道为什么通过文件访问不起作用
我想我自己找到了答案(几个小时后我的解决方法失败了 - 再次出现同样的错误)。
似乎是 PHP(在 Ubuntu)中的错误,如此处所述
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1160336
自 2013 年以来未解决
:-(
我目前的解决方法是在 php.ini
中禁用 soap.wsdl_cache_enabled
,这似乎暂时有帮助。
我在服务器上安装了 Mantis BT 1.2.19,运行良好。为了在我的 Eclipse-IDE (Mars) 中受益,我安装了 Mantis 的 Task-Repo 插件并尝试添加连接。
当我在 Eclipse 中单击 "Validate settings" 时,出现以下错误:
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"
在我的服务器错误日志中有以下条目
[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 "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl" 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
以上错误是由 Mantis 插件在访问 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)"
但即使是对上述 URL 的 "normal" GET 访问也会产生相同的错误
https://{myhost}/mantis/api/soap/mantisconnect.php
访问没有错误
https://{myhost}/mantis/api/soap/mantisconnect.php?wsdl
为了自己解决这个问题,我检查了几个想法:
- 文件存在...{myhost} 显然只是一个占位符 - 由我放置
- 我切换到网络服务器的上下文
www-data
并尝试访问该文件...它是可访问的
所以我不知道...
PHP 版本是 5.5.9-1ubuntu4.13
Ubuntu 14.04.3 LTS
€编辑:
追踪到 mantis/api/soap/mantisconnect.php
$server = new SoapServer("mantisconnect.wsdl",
array('features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS)
);
我不明白为什么会抛出错误 - 因为正如我所说:它存在并且可由网络服务器读取...
€edit2:
我替换了行
$server = new SoapServer("mantisconnect.wsdl",
与
$server = new SoapServer("http://{myhost}/mantis/api/soap/mantisconnect.wsdl",
这有效...所以我有一个 "solution" 但我不知道为什么通过文件访问不起作用
我想我自己找到了答案(几个小时后我的解决方法失败了 - 再次出现同样的错误)。
似乎是 PHP(在 Ubuntu)中的错误,如此处所述 https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1160336
自 2013 年以来未解决 :-(
我目前的解决方法是在 php.ini
中禁用 soap.wsdl_cache_enabled
,这似乎暂时有帮助。