[
https://issues.apache.org/jira/browse/ZOOKEEPER-2625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15647827#comment-15647827
]
Arne Bachmann commented on ZOOKEEPER-2625:
------------------------------------------
I found the issue. As I suspected, the reason for data? is actually a data^M
which translates into a \r character.
The following code executed in the bin/ folder resolved the issue:
perl -p -i -e "s/\r//g" *.sh
This converts line endings from Windows mode into Linux mode, which one would
expect to find in the zk.tar.gz anyway.
I'm not sure if I should create a pull request or patch, as this seems to be
more of a problem with the developer's build chain, rather a simple code fix.
If anybody is interested, I can zip my Vagrant code that sets up distributed
zookeeper instances inside Virtualbox containers (which may be a bad practice,
as there is only ephemeral disk storage).
> zkServer.sh creates PID file in the folder data?/ instead of data/
> ------------------------------------------------------------------
>
> Key: ZOOKEEPER-2625
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2625
> Project: ZooKeeper
> Issue Type: Bug
> Components: scripts
> Affects Versions: 3.5.2
> Environment: Linux vagrant-ubuntu-trusty-32 3.13.0-100-generic
> #147-Ubuntu SMP Tue Oct 18 16:49:53 UTC 2016 i686 i686 i686 GNU/Linux
> Reporter: Arne Bachmann
> Priority: Minor
>
> I provision a vagrant vm that installs zookeeper into /home/vagrant/zk and
> adjusts all owner and read/write rights.
> With the vagrant user, I start zookeeper as bin/zkServer.sh start
> /vagrant/data/zoo.cfg
> However, the folder data? (or data^M) gets created with the PID inside,
> instead of putting it into the data folder, which contains the version-2
> folder.
> Since I'm using the official start scripts, I'm at a loss.
> Also, the data? folder comes with root:root ownership, which is strange, as
> zKServer.sh is executed from the vagrant user.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)