Structr 结构,现有Neo4j安装

Structr 结构,现有Neo4j安装,structr,Structr,我希望通过structr使用现有的Neo4j安装,而不是structr的嵌入式graph db 设置为: 视窗10 Neo4j 3.2.5 结构2.1.3 structr启动后,它将创建一个structr.conf文件,其中只有一个条目为superuser.password=somehash 我像以前一样添加了以下条目: superuser.password = somehash #######################################################

我希望通过structr使用现有的Neo4j安装,而不是structr的嵌入式graph db

设置为:

  • 视窗10
  • Neo4j 3.2.5
  • 结构2.1.3
structr启动后,它将创建一个structr.conf文件,其中只有一个条目为superuser.password=somehash

我像以前一样添加了以下条目:

superuser.password = somehash

#############################################################################
# Neo4j server settings
#############################################################################

# With driver 'org.structr.bolt.BoltDatabaseService'
# and driver mode 'remote' Structr won't start a Neo4j database
database.driver = org.structr.bolt.BoltDatabaseService
database.driver.mode = remote

database.connection.url = bolt://localhost:7687
database.connection.username = neo4j
database.connection.password = password
现在,当我启动Structor时,管理员凭据不起作用,控制台显示:

INFO  org.structr.rest.auth.AuthHelper - No principal found for eMail admin
21:35:08.273 [qtp180489140-23] INFO  o.s.websocket.command.LoginCommand - Unable to login admin, probably wrong password
*********编辑-1*********

我可以使用管理员凭据登录数据库浏览器

结构器启动时的控制台输出:

java -cp lib/*;structr-ui-2.1.3-201706220925.909fa.jar org.structr.Server
21:04:32,158 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
21:04:32,160 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
21:04:32,161 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/P:/Software/IDE/DB/structr-2.1.3/lib/structr-ui-2.1.3.jar!/logback.xml]
21:04:32,171 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
21:04:32,172 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/P:/Software/IDE/DB/structr-2.1.3/lib/structr-ui-2.1.3.jar!/logback.xml]
21:04:32,172 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/P:/Software/IDE/DB/structr-2.1.3/structr-ui-2.1.3-201706220925.909fa.jar!/logback.xml]
21:04:32,272 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@46238e3f - URL [jar:file:/P:/Software/IDE/DB/structr-2.1.3/lib/structr-ui-2.1.3.jar!/logback.xml] is not of type file
21:04:32,683 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
21:04:32,712 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
21:04:32,721 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
21:04:32,727 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
21:04:32,779 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.structr] to INFO
21:04:32,779 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
21:04:32,779 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
21:04:32,779 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
21:04:32,789 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@6e2c9341 - Registering current configuration as safe fallback point

21:04:32.804 [main] INFO  org.structr.Server - Starting server instance
21:04:32.892 [main] INFO  org.structr.core.app.StructrApp - Reading structr.conf..
log4j:WARN No appenders could be found for logger (org.apache.commons.configuration.PropertiesConfiguration).
log4j:WARN Please initialize the log4j system properly.
21:04:33.586 [main] INFO  o.structr.api.service.LicenseManager - Host ID is bbb22b8bc5944fc3ffd95f070c5789fd
21:04:33.586 [main] INFO  o.structr.api.service.LicenseManager - Checking Structr license..
21:04:33.589 [main] INFO  o.structr.api.service.LicenseManager - Running Community Edition with modules [core, rest, ui].
21:04:33.589 [main] INFO  o.structr.api.service.LicenseManager - Evaluation License
21:04:34.897 [main] INFO  o.s.module.JarConfigurationProvider - Activating module core
21:04:36.130 [main] INFO  o.s.module.JarConfigurationProvider - Activating module rest
21:04:37.271 [main] INFO  o.s.module.JarConfigurationProvider - Activating module ui
21:04:37.507 [main] INFO  o.s.module.JarConfigurationProvider - 24 JARs scanned
21:04:37.508 [main] INFO  org.structr.core.app.StructrApp - Starting services..
21:04:37.508 [main] INFO  org.structr.core.app.StructrApp - Creating NodeService..
21:04:38.411 [main] INFO  org.structr.bolt.BoltDatabaseService - Node cache size set to 100000
21:04:38.412 [main] INFO  org.structr.bolt.BoltDatabaseService - Relationship cache size set to 100000
21:04:38.413 [main] INFO  org.structr.core.graph.NodeService - Database driver loaded.
21:04:39.039 [main] INFO  org.structr.core.app.StructrApp - Creating AgentService..
21:04:39.040 [main] ERROR org.structr.core.app.StructrApp - Configured service AgentService is not part of the currently licensed Structr Edition.
21:04:39.041 [main] INFO  org.structr.core.app.StructrApp - Creating CronService..
21:04:39.045 [main] ERROR org.structr.core.app.StructrApp - Configured service CronService is not part of the currently licensed Structr Edition.
21:04:39.045 [main] INFO  org.structr.core.app.StructrApp - Creating SchemaService..
21:04:39.047 [main] INFO  org.structr.core.app.StructrApp - Creating HttpService..
21:04:39.048 [main] INFO  org.structr.rest.service.HttpService - Running in asynchronous mode
21:04:39.136 [main] INFO  org.eclipse.jetty.util.log - Logging initialized @18425ms
21:04:39.454 [main] INFO  org.structr.rest.service.HttpService - Adding servlet org.structr.rest.servlet.JsonRestServlet-3b4d50b@7547473c==org.structr.rest.servlet.JsonRestServlet,1,true for /structr/rest/*
21:04:39.456 [main] INFO  org.structr.rest.service.HttpService - Adding servlet org.structr.web.servlet.HtmlServlet-476ee5b3@2123a164==org.structr.web.servlet.HtmlServlet,2,true for /structr/html/*
21:04:39.459 [main] INFO  org.structr.rest.service.HttpService - Adding servlet org.structr.websocket.servlet.WebSocketServlet-7cd4a4d7@5154ec46==org.structr.websocket.servlet.WebSocketServlet,3,true for /structr/ws/*
21:04:39.460 [main] INFO  org.structr.rest.service.HttpService - Adding servlet org.structr.web.servlet.UploadServlet-18da4dd@beda4369==org.structr.web.servlet.UploadServlet,4,true for /structr/upload/*
21:04:39.461 [main] INFO  org.structr.rest.service.HttpService - Starting Structr 2.1 (host=0.0.0.0:8082, maxIdleTime=30000, requestHeaderSize=8192)
21:04:39.462 [main] INFO  org.structr.rest.service.HttpService - Base path ./
21:04:39.463 [main] INFO  org.structr.rest.service.HttpService - Structr 2.1 started at http://0.0.0.0:8082
21:04:39.474 [main] INFO  org.eclipse.jetty.server.Server - jetty-9.2.9.v20150224
21:04:39.750 [main] INFO  / - org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)
21:04:40.399 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@7915bca3{/,[file:/P:/Software/IDE/DB/structr-2.1.3/, jar:file:/P:/Software/IDE/DB/structr-2.1.3/lib/structr-rest-2.1.3.jar!/],AVAILABLE}
21:04:40.399 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@68d651f2{/structr,null,AVAILABLE}
21:04:40.437 [main] INFO  o.e.jetty.server.ServerConnector - Started ServerConnector@3d96fa9e{HTTP/1.1}{0.0.0.0:8082}
21:04:40.439 [main] INFO  org.eclipse.jetty.server.Server - Started @19728ms
21:04:40.445 [main] INFO  org.structr.core.app.StructrApp - 3 service(s) processed
21:04:40.446 [main] INFO  org.structr.core.app.StructrApp - Registering shutdown hook.
21:04:45.817 [pool-3-thread-1] INFO  o.s.schema.compiler.NodeExtender - Successfully compiled 10 dynamic entities: File.java, _FileHelper.java, Folder.java, Group.java, Image.java, _ImageHelper.java, MailTemplate.java, Page.java, User.java, Widget.java
2017-10-02 21:04:45.445  ---------------- Initialization complete ----------------
既没有创建日志,也找不到任何conf目录来查看日志或其他配置。
种子种子/文件文件夹为空。structr.conf文件(如原始帖子所示)只有1KB,不知道是否遗漏了什么

远程数据库可能没有配置管理员用户。请查看logs/structr.log以确定是否创建了管理员用户。应该是这样的

11:35:24.856 [main] INFO  org.structr.core.graph.NodeService - Checking if seed file should be imported..
11:35:26.179 [main] INFO  org.structr.core.graph.NodeService - Found initial seed file and no application nodes, applying initial seed..
11:35:26.921 [main] INFO  org.structr.core.graph.SyncCommand - Imported 1 nodes and 0 rels, committing transaction..
您应该能够使用以下curl语句创建用户:

curl -HX-User:superadmin -HX-Password:yourpassword http://localhost:8082/structr/rest/User -d '{ name: admin, password: admin, isAdmin: true }'
curl -HX-User:superadmin -HX-Password:yourpassword http://localhost:8082/structr/rest/User -d '{ name: admin, password: admin, isAdmin: true }'

对于unix bash以外的shell,您可能需要调整上述命令中的引号。

远程数据库可能没有配置管理员用户。请查看logs/structr.log以确定是否创建了管理员用户。应该是这样的

11:35:24.856 [main] INFO  org.structr.core.graph.NodeService - Checking if seed file should be imported..
11:35:26.179 [main] INFO  org.structr.core.graph.NodeService - Found initial seed file and no application nodes, applying initial seed..
11:35:26.921 [main] INFO  org.structr.core.graph.SyncCommand - Imported 1 nodes and 0 rels, committing transaction..
您应该能够使用以下curl语句创建用户:

curl -HX-User:superadmin -HX-Password:yourpassword http://localhost:8082/structr/rest/User -d '{ name: admin, password: admin, isAdmin: true }'
curl -HX-User:superadmin -HX-Password:yourpassword http://localhost:8082/structr/rest/User -d '{ name: admin, password: admin, isAdmin: true }'

对于unix bash以外的shell,您可能需要调整上述命令中的引号。

我认为根本原因是数据库中没有用户可以登录。您应该能够使用以下curl语句创建一个:

curl -HX-User:superadmin -HX-Password:yourpassword http://localhost:8082/structr/rest/User -d '{ name: admin, password: admin, isAdmin: true }'
curl -HX-User:superadmin -HX-Password:yourpassword http://localhost:8082/structr/rest/User -d '{ name: admin, password: admin, isAdmin: true }'

我认为根本原因是数据库中没有用户可以登录。您应该能够使用以下curl语句创建一个:

curl -HX-User:superadmin -HX-Password:yourpassword http://localhost:8082/structr/rest/User -d '{ name: admin, password: admin, isAdmin: true }'
curl -HX-User:superadmin -HX-Password:yourpassword http://localhost:8082/structr/rest/User -d '{ name: admin, password: admin, isAdmin: true }'

您可以检查原始帖子中的“Edit-1”吗?Structr登录凭据与Neo4j中使用的凭据不同。您将无法使用在Neo4j中设置的凭据登录Structr,您需要在Structr中创建一个用户对象(或使用从初始种子导入的admin/admin实体)。我使用的是admin/admin,但它不起作用。令人惊讶的是,它工作得更早,但conf文件要大得多。从Structr 2.1开始,Structr.conf只包含与默认配置不同的条目,这就是为什么文件如此小的原因。如果Neo4j数据库中没有用户对象,您将无法登录Structr,因此我们必须找到创建一个用户对象的方法。您可以使用curl或任何其他命令行HTTP客户端吗?或者其他一些HTTP客户机可以创建对Structr REST接口的HTTP POST请求?我认为根本原因是数据库中没有用户可以登录。您应该能够使用以下curl语句创建一个:curl-HX User:superadmin-HX Password:yourspassword-d{name:admin,Password:admin,isAdmin:true}您可以检查原始帖子中的“Edit-1”吗?structor登录凭据与Neo4j中使用的凭据不同。您将无法使用在Neo4j中设置的凭据登录Structr,您需要在Structr中创建一个用户对象(或使用从初始种子导入的admin/admin实体)。我使用的是admin/admin,但它不起作用。令人惊讶的是,它工作得更早,但conf文件要大得多。从Structr 2.1开始,Structr.conf只包含与默认配置不同的条目,这就是为什么文件如此小的原因。如果Neo4j数据库中没有用户对象,您将无法登录Structr,因此我们必须找到创建一个用户对象的方法。您可以使用curl或任何其他命令行HTTP客户端吗?或者其他一些HTTP客户机可以创建对Structr REST接口的HTTP POST请求?我认为根本原因是数据库中没有用户可以登录。您应该能够使用以下curl语句创建一个:curl-HX User:superadmin-HX Password:yourspassword-d'{name:admin,Password:admin,isAdmin:true}'