linkedin / linkedin/ambry

Errors installing Ambry on a Windows based machine

Open
#1,805 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.8k
Forks
298
Avg merge
21h 43m
Merged PRs (30d)
9

Description

Hi everyone,

I'm new here and I'm trying to install Ambry on my machine. These are the steps that I executed:
$ git clone https://github.com/linkedin/ambry.git
$ cd ambry
$ ./gradlew allJar
$ cd target
$ mkdir logs

Then, when I try to execute the following:
$ nohup java -Dlog4j.configuration=file:../config/log4j.properties -jar ambry.jar --serverPropsFilePath ../config/server.properties --hardwareLayoutFilePath ../config/HardwareLayout.json --partitionLayoutFilePath ../config/PartitionLayout.json > logs/server.log &
I get the following error:

$ cat logs/server.log
[2021-03-17 20:30:33,859] ERROR Exception during bootstrap of AmbryServer (com.github.ambry.server.AmbryMain)
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.github.ambry.utils.Utils.getObj(Utils.java:662)
at com.github.ambry.server.AmbryMain.main(AmbryMain.java:45)
Caused by: java.lang.IllegalStateException: Mount path has to be an absolute path.
at com.github.ambry.clustermap.Disk.validateMountPath(Disk.java:128)
at com.github.ambry.clustermap.Disk.validate(Disk.java:135)
at com.github.ambry.clustermap.Disk.(Disk.java:58)
at com.github.ambry.clustermap.DataNode.(DataNode.java:78)
at com.github.ambry.clustermap.Datacenter.(Datacenter.java:53)
at com.github.ambry.clustermap.HardwareLayout.(HardwareLayout.java:58)
at com.github.ambry.clustermap.StaticClusterAgentsFactory.(StaticClusterAgentsFactory.java:58)
... 6 more
[2021-03-17 20:30:33,863] INFO Exiting AmbryMain (com.github.ambry.server.AmbryMain)
[1]+ Exit 1 nohup java -Dlog4j.configuration=file:../config/log4j.properties -jar ambry.jar --serverPropsFilePath ../config/server.properties --hardwareLayoutFilePath ../config/HardwareLayout.json --partitionLayoutFilePath ../config/PartitionLayout.json > logs/server.log

I see that it says that mount path has to be an absolute path, so I adjusted my command to be:
$ nohup java -Dlog4j.configuration=file:/d/users/sameeras/ambry2/config/log4j.properties -jar ambry.jar --serverPropsFilePath /d/users/sameeras/ambry2/config/server.properties --hardwareLayoutFilePath /d/users/sameeras/ambry2/config/HardwareLayout.json --partitionLayoutFilePath /d/users/sameeras/ambry2/config/PartitionLayout.json > logs/server.log &

And the result is:

$ cat logs/server.log
log4j:ERROR Could not read configuration file from URL [file:/d/users/sameeras/ambry2/config/log4j.properties].
java.io.FileNotFoundException: \d\users\sameeras\ambry2\config\log4j.properties (The system cannot find the path specified)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(Unknown Source)
at java.base/java.io.FileInputStream.(Unknown Source)
at java.base/java.io.FileInputStream.(Unknown Source)
at java.base/sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
at java.base/sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:557)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
at org.apache.log4j.LogManager.(LogManager.java:127)
at org.slf4j.impl.Log4jLoggerFactory.(Log4jLoggerFactory.java:66)
at org.slf4j.impl.StaticLoggerBinder.(StaticLoggerBinder.java:72)
at org.slf4j.impl.StaticLoggerBinder.(StaticLoggerBinder.java:45)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
at com.github.ambry.server.AmbryMain.(AmbryMain.java:33)
log4j:ERROR Ignoring configuration file [file:/d/users/sameeras/ambry2/config/log4j.properties].
log4j:WARN No appenders could be found for logger (com.github.ambry.server.AmbryMain).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[1]+ Exit 1 nohup java -Dlog4j.configuration=file:/d/users/sameeras/ambry2/config/log4j.properties -jar ambry.jar --serverPropsFilePath /d/users/sameeras/ambry2/config/server.properties --hardwareLayoutFilePath /d/users/sameeras/ambry2/config/HardwareLayout.json --partitionLayoutFilePath /d/users/sameeras/ambry2/config/PartitionLayout.json > logs/server.log

Does anyone have any idea what could I be missing? Thanks in advance!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the launch from the reported Windows commands, then inspect config/HardwareLayout.json, config/server.properties, and config/log4j.properties alongside Disk.validateMountPath and AmbryMain. Done means identifying whether the documented setup or the Windows path handling must change and verifying that Ambry starts with valid absolute paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.