# Neo4j service start is probably broken by change to "Xenial as the default build environment"

**URL:** <https://travis-ci.community/t/neo4j-service-start-is-probably-broken-by-change-to-xenial-as-the-default-build-environment/5381>\
**Category:** Environments\
**Created:** [October 10, 2019, 7:04am UTC](https://travis-ci.community/t/neo4j-service-start-is-probably-broken-by-change-to-xenial-as-the-default-build-environment/5381 "2019-10-10T07:04:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![OkThought](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/okthought/32/2864_2.png) [@OkThought](https://travis-ci.community/u/OkThought)\
**Post date:** [October 10, 2019, 7:04am UTC](https://travis-ci.community/t/neo4j-service-start-is-probably-broken-by-change-to-xenial-as-the-default-build-environment/5381/1 "2019-10-10T07:04:14Z")

</div>

I have a travis config with neo4j service enabled as described in the documentation:  
`services:`  
` - neo4j`

However neo4j service began failing to start when its starting command changed from  
`sudo service neo4j start`  
to  
`sudo systemctl start neo4j`  
and failed with the following message:  
`Failed to start neo4j.service: Unit neo4j.service not found.`  
Specifying `dist: trusty` fixed the issue. But it should work on all environments, isn’t it?

For a better search of this topic, here’s the error i’ve been getting in the build logs:  
`neo4j.exceptions.ServiceUnavailable: Failed to establish connection to ('127.0.0.1', 7687) (reason 111)`

---

<div class="post-metadata">

**Author:** ![TechInquest](https://avatars.discourse-cdn.com/v4/letter/t/65b543/32.png) [@TechInquest](https://travis-ci.community/u/TechInquest)\
**Post date:** [February 3, 2020, 9:03pm UTC](https://travis-ci.community/t/neo4j-service-start-is-probably-broken-by-change-to-xenial-as-the-default-build-environment/5381/2 "2020-02-03T21:03:53Z")

</div>

I’m facing similar issues with Xenial, Bionic. But it works with Trusty.

I hope Travis fix it soon.

On Xenial:

```auto
# Services
Failed to start neo4j.service: Unit neo4j.service not found.

```

On Bionic:

```auto
# Services
Failed to start neo4j.service: Unit neo4j.service not found.

```

On Trusty:

```auto
Active database: graph.db
Directories in use:
  home: /usr/local/neo4j-3.2.7
  config: /usr/local/neo4j-3.2.7/conf
  logs: /usr/local/neo4j-3.2.7/logs
  plugins: /usr/local/neo4j-3.2.7/plugins
  import: /usr/local/neo4j-3.2.7/import
  data: /usr/local/neo4j-3.2.7/data
  certificates: /usr/local/neo4j-3.2.7/certificates
  run: /usr/local/neo4j-3.2.7/run
Starting Neo4j.
WARNING: Max 30000 open files allowed, minimum of 40000 recommended. See the Neo4j manual.
Started neo4j (pid 4021). It is available at http://localhost:7474/
There may be a short delay until the server is ready.
See /usr/local/neo4j-3.2.7/logs/neo4j.log for current status.

```

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [February 3, 2020, 9:49pm UTC](https://travis-ci.community/t/neo4j-service-start-is-probably-broken-by-change-to-xenial-as-the-default-build-environment/5381/3 "2020-02-03T21:49:54Z")

</div>

Please link to an affected build, and the last successful build if applicable. Otherwise, there’s insufficient information for diagnostics.

---

<div class="post-metadata">

**Author:** ![JDRomano2](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jdromano2/32/3927_2.png) [@JDRomano2](https://travis-ci.community/u/JDRomano2)\
**Post date:** [February 29, 2020, 6:01am UTC](https://travis-ci.community/t/neo4j-service-start-is-probably-broken-by-change-to-xenial-as-the-default-build-environment/5381/4 "2020-02-29T06:01:39Z")

</div>

I can confirm this issue exists and hasn’t been resolved.

See [https://travis-ci.org/JDRomano2/comptox\_ai/builds/656455702#L162](https://travis-ci.org/JDRomano2/comptox_ai/builds/656455702#L162)  
(disregard the rough state of the rest of the build)

I can’t test on Trusty due to lack of a Python 3.7 archive.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [February 29, 2020, 10:58pm UTC](https://travis-ci.community/t/neo4j-service-start-is-probably-broken-by-change-to-xenial-as-the-default-build-environment/5381/5 "2020-02-29T22:58:31Z")

</div>

[Neo4j server needs to be installed from a 3rd-party Apt repository.](https://neo4j.com/docs/operations-manual/current/installation/linux/debian/)

It looks like Trusty had it preinstalled but newer images don’t.
