【发布时间】:2017-11-08 10:15:55
【问题描述】:
我必须在现有的 Dspace 安装上配置 Swordv2 服务器,以允许通过 SwordV2 协议进行访问。我查看了 duraspace 的 instruction,位于 [dspace]/webapps/swordv2/ 的 Swordv2 应用程序似乎在 tomcat webapps 文件夹中可用,并且 Sword2 配置文件位于正确的位置([dspace]/config/modules/ Swordv2-server.cfg)。
但对配置文件的更改似乎没有效果。 我在这里做错了什么?
更新
这是剑灵特有的tomcat的输出重启后:
Nov 14 08:10:33 ub11 server: INFORMATION: Deploying web application directory /data/dspace/webapps-deploy/swordv2
Nov 14 08:10:37 ub11 server: INFO [localhost-startStop-1] (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from URL [jar:file:/data/dspace/webapps/swordv2/WEB-INF/lib/additions-5.3.jar!/spring/spring-dspace-addon-example-services.xml]
Nov 14 08:10:37 ub11 server: INFO [localhost-startStop-1] (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from URL [jar:file:/data/dspace/webapps/swordv2/WEB-INF/lib/dspace-api-5.3.jar!/spring/spring-dspace-addon-sherpa-configuration-services.xml]
Nov 14 08:10:37 ub11 server: INFO [localhost-startStop-1] (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from URL [jar:file:/data/dspace/webapps/swordv2/WEB-INF/lib/dspace-api-5.3.jar!/spring/spring-dspace-addon-requestitem-services.xml]
Nov 14 08:10:37 ub11 server: INFO [localhost-startStop-1] (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from URL [jar:file:/data/dspace/webapps/swordv2/WEB-INF/lib/dspace-api-5.3.jar!/spring/spring-dspace-addon-sherpa-services.xml]
Nov 14 08:10:37 ub11 server: INFO [localhost-startStop-1] (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from URL [jar:file:/data/dspace/webapps/swordv2/WEB-INF/lib/dspace-api-5.3.jar!/spring/spring-dspace-addon-discovery-services.xml]
Nov 14 08:10:37 ub11 server: INFO [localhost-startStop-1] (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from URL [jar:file:/data/dspace/webapps/swordv2/WEB-INF/lib/dspace-api-5.3.jar!/spring/spring-dspace-core-services.xml]
Nov 14 08:10:37 ub11 server: INFO [localhost-startStop-1] (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from URL [jar:file:/data/dspace/webapps/swordv2/WEB-INF/lib/dspace-services-5.3.jar!/spring/spring-dspace-core-services.xml]
Nov 14 08:10:37 ub11 server: INFO [localhost-startStop-1] (DefaultListableBeanFactory.java:623) - Overriding bean definition for bean 'org.dspace.identifier.IdentifierService': replacing [Generic bean: class [org.dspace.identifier.IdentifierServiceImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=2; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/data/dspace/webapps/swordv2/WEB-INF/lib/dspace-api-5.3.jar!/spring/spring-dspace-core-services.xml]] with [Generic bean: class [org.dspace.identifier.IdentifierServiceImpl]; scope=singleton; abstract=false; lazyInit=false; autowireMode=2; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [/opt/dspace/config/spring/api/identifier-service.xml]]
Nov 14 08:10:37 ub11 server: INFO [localhost-startStop-1] (DefaultListableBeanFactory.java:623) - Overriding bean definition for bean 'org.dspace.app.requestitem.RequestItemAuthorExtractor': replacing [Generic bean: class [org.dspace.app.requestitem.RequestItemMetadataStrategy]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=false; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/data/dspace/webapps/swordv2/WEB-INF/lib/dspace-api-5.3.jar!/spring/spring-dspace-addon-requestitem-services.xml]] with [Generic bean: class [org.dspace.app.requestitem.RequestItemMetadataStrategy]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=false; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [/opt/dspace/config/spring/api/requestitem.xml]]
Nov 14 08:10:37 ub11 server: INFO [localhost-startStop-1] (DefaultListableBeanFactory.java:623) - Overriding bean definition for bean 'org.dspace.app.sherpa.submit.SHERPASubmitConfigurationService': replacing [Generic bean: class [org.dspace.app.sherpa.submit.SHERPASubmitConfigurationService]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/data/dspace/webapps/swordv2/WEB-INF/lib/dspace-api-5.3.jar!/spring/spring-dspace-addon-sherpa-configuration-services.xml]] with [Generic bean: class [org.dspace.app.sherpa.submit.SHERPASubmitConfigurationService]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [/opt/dspace/config/spring/api/sherpa.xml]]
Nov 14 08:10:38 ub11 server: INFORMATION: Deployment of web application directory /data/dspace/webapps-deploy/swordv2 has finished in 5,024 ms
这是我的 swordv2-server.cfg:
url = https://somedomain.de/swordv2
collection.url = https://somedomain.de/swordv2/collection
servicedocument.url = https://somedomain.de/swordv2/servicedocument
这是来自 dspace.cfg:
dspace.hostname = somedomain.de
dspace.baseUrl = https://somedomain.de
dspace.url = https://somedomain.de/xmlui
真实姓名已替换为“somedomain”。
如果我调用像 somedomain.de/swordv2/servicedocument 这样的 url,我会得到 404 Not found。
更新 2:
我重新启动了机器,现在我的 dspace 日志中出现了剑:
2017-11-15 12:50:10,337 INFO org.swordapp.server.servlets.SwordServlet @ Using org.dspace.sword2.SwordConfigurationDSpace as 'config-impl'
2017-11-15 12:50:10,340 INFO org.swordapp.server.servlets.SwordServlet @ Using org.dspace.sword2.ServiceDocumentManagerDSpace as 'service-document-impl'
2017-11-15 12:50:10,347 INFO org.swordapp.server.SwordAPIEndpoint @ Auth type = None
2017-11-15 12:50:10,488 INFO org.dspace.sword2.SwordAuthenticator @ anonymous:session_id=0:sword_authenticate:username=null,on_behalf_of=null
2017-11-15 12:50:10,494 INFO org.dspace.sword2.SwordAuthenticator @ anonymous:session_id=0:sword_unable_to_set_on_behalf_of:username=null,on_behalf_of=null
我已将剑服务器配置中的身份验证暂时设置为无。当我尝试使用 curl 访问服务文档时,我从 tomcat 收到 403 状态代码(“访问指定资源已被禁止”)。我想现在剩下要做的就是在 tomcat 中重新配置访问权限?
【问题讨论】:
-
修改配置文件后需要重启tomcat,你这样做吗?另外,当您尝试访问服务文档时,DSpace 日志文件中是否有任何有用的信息?
-
我重新启动了服务器并检查了 dspace 日志。没有关于 servicedocument 或 Swordv2 的输出。有没有办法确定 SwordV2-Module 是否启动并运行?剑模块似乎躺在tomcat的baseApps文件夹中.....
-
服务文档 URL 位于您的 Swordv2 服务器设置中。尝试访问它。
-
另外 - 如果您不知道如何访问 Swordv2 模块,您怎么知道您更改的设置没有生效?
-
我拥有对 Swordv2-server.cfg 的完全访问权限。当我尝试访问服务文档时,我得到一个 404 Not found。没有身份验证请求,没有别的......