0

We run neo4j (3.5.21) in an EC2 instance. Today, after I restarted the server, noticed this error:

Expected hostname at index 7: bolt://:7687". Starting Neo4j failed: Component 'org.neo4j.server.AbstractNeoServer$ServerComponentsLifecycleAdapter@75401424' was successfully initialized, but failed to start

Service start logs:

Active database: graph.db
Directories in use:
  home:         /var/lib/neo4j
  config:       /etc/neo4j
  logs:         /var/log/neo4j
  plugins:      /var/lib/neo4j/plugins
  import:       /var/lib/neo4j/import
  data:         /var/lib/neo4j/data
  certificates: /var/lib/neo4j/certificates
  run:          /var/run/neo4j
Starting Neo4j.
WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manual.
Started neo4j (pid 22577). It is available at http://0.0.0.0:7474/
There may be a short delay until the server is ready.
See /var/log/neo4j/neo4j.log for current status.

This is what I see in neo4j.log:

    2022-12-03 20:29:49.886+0000 INFO  Bolt enabled on 0.0.0.0:7687.
    2022-12-03 20:29:51.968+0000 INFO  Started.
    2022-12-03 20:29:52.121+0000 INFO  Stopping...
    2022-12-03 20:29:52.231+0000 INFO  Stopped.
    2022-12-03 20:29:52.233+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.AbstractNeoServer$ServerComponentsLifecycleAdapter@75401424' was successfully initialized, but failed to start. Please see the attached cause exception "Expected hostname at index 7: bolt://:7687". Starting Neo4j failed: Component 'org.neo4j.server.AbstractNeoServer$ServerComponentsLifecycleAdapter@75401424' was successfully initialized, but failed to start. Please see the attached cause exception "Expected hostname at index 7: bolt://:7687".
    org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.AbstractNeoServer$ServerComponentsLifecycleAdapter@75401424' was successfully initialized, but failed to start. Please see the attached cause exception "Expected hostname at index 7: bolt://:7687".
        at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:45)
        at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:187)
        at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:124)
        at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:91)
        at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:32)
    Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.AbstractNeoServer$ServerComponentsLifecycleAdapter@75401424' was successfully initialized, but failed to start. Please see the attached cause exception "Expected hostname at index 7: bolt://:7687".
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:473)
        at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
        at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:180)
        ... 3 more
    Caused by: org.neo4j.graphdb.config.InvalidSettingException: Unable to construct bolt discoverable URI using '' as hostname: Expected hostname at index 7: bolt://:7687
        at org.neo4j.server.rest.discovery.DiscoverableURIs$Builder.add(DiscoverableURIs.java:133)
        at org.neo4j.server.rest.discovery.DiscoverableURIs$Builder.lambda$addBoltConnectorFromConfig$1(DiscoverableURIs.java:155)
        at java.util.Optional.ifPresent(Optional.java:159)
        at org.neo4j.server.rest.discovery.DiscoverableURIs$Builder.addBoltConnectorFromConfig(DiscoverableURIs.java:145)
        at org.neo4j.server.rest.discovery.CommunityDiscoverableURIs.communityDiscoverableURIs(CommunityDiscoverableURIs.java:38)
        at org.neo4j.server.CommunityNeoServer.lambda$createDBMSModule$0(CommunityNeoServer.java:99)
        at org.neo4j.server.modules.DBMSModule.start(DBMSModule.java:59)
        at org.neo4j.server.AbstractNeoServer.startModules(AbstractNeoServer.java:249)
        at org.neo4j.server.AbstractNeoServer.access$700(AbstractNeoServer.java:102)
        at org.neo4j.server.AbstractNeoServer$ServerComponentsLifecycleAdapter.start(AbstractNeoServer.java:541)
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
        ... 5 more
    Caused by: java.net.URISyntaxException: Expected hostname at index 7: bolt://:7687
        at java.net.URI$Parser.fail(URI.java:2847)
        at java.net.URI$Parser.failExpecting(URI.java:2853)
        at java.net.URI$Parser.parseHostname(URI.java:3389)
        at java.net.URI$Parser.parseServer(URI.java:3235)
        at java.net.URI$Parser.parseAuthority(URI.java:3154)
        at java.net.URI$Parser.parseHierarchical(URI.java:3096)
        at java.net.URI$Parser.parse(URI.java:3052)
        at java.net.URI.<init>(URI.java:673)
        at org.neo4j.server.rest.discovery.DiscoverableURIs$Builder.add(DiscoverableURIs.java:128)
        ... 15 more
    2022-12-03 20:29:52.243+0000 INFO  Neo4j Server shutdown initiated by request

EC2: t3.large

OS: Ubuntu 18.04.5 LTS (GNU/Linux 5.4.0-1092-aws x86_64)

I have already tried restarting the server, restarting the service multiple times without any success. We have not changed anything on the networking (vpc, subnet, security groups, network interface, etc)

Curious if there's a config I am missing. Any help will be much appreciated.

Purusottam
  • 611
  • 6
  • 19

0 Answers0