# Standalone confluent schema registry not starting

**URL:** <https://forum.confluent.io/t/standalone-confluent-schema-registry-not-starting/8884>\
**Category:** Schema Registry\
**Created:** [16 October 2023 22:33 UTC](https://forum.confluent.io/t/standalone-confluent-schema-registry-not-starting/8884 "2023-10-16T22:33:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravikumaraju](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/ravikumaraju/32/3267_2.png) [@ravikumaraju](https://forum.confluent.io/u/ravikumaraju)\
**Post date:** [16 October 2023 22:33 UTC](https://forum.confluent.io/t/standalone-confluent-schema-registry-not-starting/8884/1 "2023-10-16T22:33:09Z")

</div>

I see below error in my /var/log when I start Standalone schema registry. I have the Apache Zookeeper and Kafka server up and running. I have java location in profile path and java home variables.

[Oct 5 16:18:18 chn-vm-operaxd1 systemd: Started RESTful Avro schema registry for Apache Kafka.  
Oct 5 16:18:18 chn-vm-operaxd1 schema-registry-start: /usr/bin/schema-registry-run-class: line 174: exec: java: not found  
Oct 5 16:18:18 chn-vm-operaxd1 systemd: confluent-schema-registry.service: main process exited, code=exited, status=127/n/a  
Oct 5 16:18:18 chn-vm-operaxd1 systemd: Unit confluent-schema-registry.service entered failed state.  
Oct 5 16:18:18 chn-vm-operaxd1 systemd: confluent-schema-registry.service failed.

---

<div class="post-metadata">

**Author:** ![dtroiano](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dtroiano/32/1961_2.png) [@dtroiano](https://forum.confluent.io/u/dtroiano)\
**Post date:** [18 October 2023 17:55 UTC](https://forum.confluent.io/t/standalone-confluent-schema-registry-not-starting/8884/2 "2023-10-18T17:55:48Z")

</div>

Hi @ravikumaraju,

What user are you starting it as, and does that user have `JAVA_HOME` configured properly? Double check that `$JAVA_HOME/bin/java -version` succeeds when run as that user.

What deployment method are you using for ZooKeeper, Kafka, and Schema Registry? i.e., which docs page are you following?

HTH,  
Dave

---

<div class="post-metadata">

**Author:** ![ravikumaraju](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/ravikumaraju/32/3267_2.png) [@ravikumaraju](https://forum.confluent.io/u/ravikumaraju)\
**Post date:** [18 October 2023 20:59 UTC](https://forum.confluent.io/t/standalone-confluent-schema-registry-not-starting/8884/3 "2023-10-18T20:59:45Z")

</div>

Hi Dave,  
Thank you for your response,  
I’m starting the schema registry service as root user.  
I double checked and the $JAVA\_HOME is configured properly, below is the output from root user,

$JAVA\_HOME/bin/java -version  
java version “11.0.7” 2020-04-14 LTS  
Java™ SE Runtime Environment 18.9 (build 11.0.7+8-LTS)  
Java HotSpot™ 64-Bit Server VM 18.9 (build 11.0.7+8-LTS, mixed mode)

Yes, the deployment method is ZooKeeper, Kafka and Schema Registry. I have the ZooKeper and Kafka server up and running.

The document page I’m following is,

> **[Installing and Upgrading the Confluent Schema Registry](https://www.clairvoyant.ai/blog/installing-and-upgrading-the-confluent-schema-registry)**
>
> A guide on installation and upgrade process for Confluent Schema Registry for Apache Kafka that provides a RESTful interface for Apache Avro® schemas.

When I run the step 6 ( Start Schema Registry), I’m getting my error (confluent-schema-registry.service failed.) .

Regards  
Ravi

---

<div class="post-metadata">

**Author:** ![dtroiano](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dtroiano/32/1961_2.png) [@dtroiano](https://forum.confluent.io/u/dtroiano)\
**Post date:** [20 October 2023 20:55 UTC](https://forum.confluent.io/t/standalone-confluent-schema-registry-not-starting/8884/4 "2023-10-20T20:55:50Z")

</div>

Hi Ravi,

I’d recommend following the latest docs from Confluent [here](https://docs.confluent.io/platform/current/installation/installing_cp/rhel-centos.html#systemd-rhel-centos-install).

This still seems like a java install / config issue. Since the service runs as `cp-schema-registry`:

```auto
# cat /lib/systemd/system/confluent-schema-registry.service

...

[Service]
Type=simple
User=cp-schema-registry
Group=confluent

...

```

You might ensure that java works for that user, e.g.:

```auto
# sudo su -l cp-schema-registry -s /bin/bash
Last login: Fri Oct 20 20:47:01 UTC 2023 on pts/0

[cp-schema-registry@localhost ~]$ java -version
openjdk version "11.0.21" 2023-10-17 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.21.0.9-1) (build 11.0.21+9-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.21.0.9-1) (build 11.0.21+9-LTS, mixed mode, sharing)

```

HTH,  
Dave

---

<div class="post-metadata">

**Author:** ![ravikumaraju](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/ravikumaraju/32/3267_2.png) [@ravikumaraju](https://forum.confluent.io/u/ravikumaraju)\
**Post date:** [23 October 2023 18:37 UTC](https://forum.confluent.io/t/standalone-confluent-schema-registry-not-starting/8884/5 "2023-10-23T18:37:28Z")

</div>

Hi Dave,  
I’m able to verify that the Java works for cp-schema-registry user, here is the output,

![image](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/2X/3/3bb822cce3d370c2df540bd5c557242201df79d4.png)

Do you think it probably has issue with java version I have installed ? Is there a recommended java version for schema registry.

Thank you for your valuable inputs.

Regards  
Ravi

---

<div class="post-metadata">

**Author:** ![dtroiano](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dtroiano/32/1961_2.png) [@dtroiano](https://forum.confluent.io/u/dtroiano)\
**Post date:** [24 October 2023 13:52 UTC](https://forum.confluent.io/t/standalone-confluent-schema-registry-not-starting/8884/6 "2023-10-24T13:52:20Z")

</div>

Hi Ravi,

That version of Java is OK. Java 17 is recommended but 8 and 11 are also supported.

Did you start from scratch following the Confluent docs? If you haven’t, I’d recommend doing that (and installing v 7.5) since I see some differences between the latest docs and [this](https://www.clairvoyant.ai/blog/installing-and-upgrading-the-confluent-schema-registry) page that you were following.

Another thing you could try is to explicitly set `JAVA_HOME` in `/lib/systemd/system/confluent-schema-registry.service`. For example, if the `java` executable is located at `/usr/lib/jvm/java-11-openjdk-11.0.21.0.9-2.el9.x86_64/bin/java`, you’d add this line to the service file:

```auto
Environment="JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.21.0.9-2.el9.x86_64/"

```

Then run `systemctl daemon-reload` to reload the service definition and then try starting Schema Registry again.

Dave
