Structr,现有的Neo4j安装

时间:2017-10-01 19:37:46

标签: structr

had this working以前的快照版本的structr - 我希望通过Structr和NOT Structr的嵌入式图形db使用现有的Neo4j安装。

设置为:

  • Windows 10
  • Neo4j 3.2.5
  • Structr 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

现在,当我启动structr时,管理员凭据不起作用,控制台说:

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 *********

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

enter image description here

启动structr时的控制台输出:

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,想知道是否遗漏了任何内容!

2 个答案:

答案 0 :(得分:2)

远程数据库可能未配置管理员用户。请查看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 }'

您可能需要在上面的命令中为unix bash以外的shell调整引号。

答案 1 :(得分:2)

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

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