How to use custom config with docker - Avoid exit code 70

2,508 views
Skip to first unread message

Kilian

unread,
Feb 20, 2017, 2:20:10 AM2/20/17
to ClickHouse
Hi,
I am trying to start clickhouse with docker with my custom config.
I'm using the following command from your docker page with additional port-mapping.

docker run -p 8123:8123 -p 9000:9000 -p 9009:9009 -d --name some-clickhouse-server --ulimit nofile=262144:262144 -v /home/user/config.xml:/etc/clickhouse-server/config.xml yandex/clickhouse-server

My own config.xml is based on the conifg.xml on github .

I've only edited some lines:

I added my zookeeper
<!-- <zookeeper incl="zookeeper-servers" optional="true" /> -->
   
<zookeeper-servers>
       
<node>
           
<host>ned</host>
           
<port>2181</port>
       
</node>
   
</zookeeper-servers>

and commented out the "incl" line.

And furthermore i added my servers for replication:
<remote_servers incl="clickhouse_remote_servers" />-->
   
<remote_servers>
       
<test_cluster>
           
<shard>
               
<replica>
                   
<host>ned</host>
                   
<port>9000</port>
                 
</replica>
                 
<replica>
                   
<host>todd</host>
                   
<port>9000</port>
                 
</replica>
                 
<replica>
                   
<host>rod</host>
                   
<port>9000</port>
                 
</replica>
           
</shard>
       
</test_cluster>
   
</remote_servers>

and i edited the "macro"-lines for replicated mergetree..
<!-- <macros incl="macros" optional="true" /> -->
   
<macros>
       
<layer>01</layer>
       
<shard>01</shard>
       
<replica>ned</replica>
       
<!--<replica>todd</replica>
        <replica>rod</replica>-->

   
</macros>

Now everytime i try to run my docker, it stops with exitcode 70.
But i don't now why?

I would be very happy about some ideas what I could try to avoid this error.

Additional: ned, todd and rod are the host-names in my vpn


Dmitry

unread,
Feb 20, 2017, 7:24:21 PM2/20/17
to ClickHouse
Use config.d instead.
Create custom config replacement, example:
<yandex>
<path replace="replace">./</path>
<tmp_path replace="replace">./tmp/</tmp_path>
</yandex>


-v <your-config>: /etc/clickhouse-server/config.d/config.xml

Kilian

unread,
Feb 21, 2017, 2:00:40 AM2/21/17
to ClickHouse
Hi thanks,

I'am not sure if i understand you clearly.

I'll create my custom-config that only includes new necessary things of mine, like replication, macros, ...
There i will add replace="replace" to these elements (macro, replication, ...)?
If I understand the documentation in the right way, I wouldn't have to add the replace, since user-config will override automaticly??

Next Step: I start my docker, but now i map the config.xml inside the config.d path to my user-path.

Kilian

unread,
Feb 21, 2017, 2:14:40 AM2/21/17
to ClickHouse
EDIT:
I read the docu again and now I am not sure anymore.

Every Element I want to replace/Set has the attribute "incl" specified.
The following sentence is written in the docu.

By default, the path to the file with substitutions is '/etc/metrika.xml'. This can be changed in the config in the 'include_from' element. The substitution values are specified in '/yandex/substitution_name' elements of this file.

 Do I have to change now this path and where do I find the include_from element?

Reply all
Reply to author
Forward
0 new messages