You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/03/03 00:15:30 UTC

[GitHub] [couchdb] natcohen opened a new issue #2630: Unable to run Clouseau after following the documentation

natcohen opened a new issue #2630: Unable to run Clouseau after following the documentation
URL: https://github.com/apache/couchdb/issues/2630
 
 
   [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ )
   
   ## Description
   
   Unable to run Clouseau even after following the installation procedure.
   
   [NOTE]: # ( Describe the problem you're encountering. )
   [TIP]:  # ( Do NOT give us access or passwords to your actual CouchDB! )
   
   ## Steps to Reproduce
   
   After carefully following the procedure [here][1] I'm unable to get it working on CentOS 8. Here is what I have done:
   
    - Installed Java 8 as described [here][2]. 
    - Unzipped the [Clouseau release][3] in folder `/opt/clouseau` and added the `clouseau.ini`
      `log4j.properties` files (as described in the procedure) in the same folder.
      
    - Added the classpath:
   
   ```sh
       export CLASSPATH=/opt/clouseau/*`
   ```
   
    - Tried to run it with the following command:
   
   ```sh
       java -server \
            -Xmx2G \
            -Dsun.net.inetaddr.ttl=30 \
            -Dsun.net.inetaddr.negative.ttl=30 \
            -Dlog4j.configuration=file:/opt/clouseau/log4j.properties \
            -XX:OnOutOfMemoryError=\"kill -9 %p\" \
            -XX:+UseConcMarkSweepGC \
            -XX:+CMSParallelRemarkEnabled \
            com.cloudant.clouseau.Main \
            /opt/clouseau/clouseau.ini
   ```
   
   But I'm getting the following error:
   
   ```sh
   Unrecognized option: -9
   Error: Could not create the Java Virtual Machine.
   Error: A fatal exception has occurred. Program will exit.
   ```
   
   In addition, I can see in the default.ini file of CouchDB some reference to dreyfus. Does it mean that I should add a configuration to CouchDB?
   
   Also
   
   ```ini
   cookie=monster
   ```
   
   is described as "; set this to the same distributed Erlang cookie used by the CouchDB nodes" but I don't know where to find that.
   
   [NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. )
   
   ## Expected Behaviour
   
   The Clouseau configuration should be easier to setup (probably by improving the documentation)
   
   [NOTE]: # ( Tell us what you expected to happen. )
   
   ## Your Environment
   
   [TIP]:  # ( Include as many relevant details about your environment as possible. )
   [TIP]:  # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. )
   
   * CouchDB version used: 3.0
   * Browser name and version: N/A
   * Operating system and version: CentOS 8
   
   ## Additional Context
   
   [TIP]:  # ( Add any other context about the problem here. )
   
   
     [1]: https://docs.couchdb.org/en/master/install/search.html#install-search
     [2]: https://linuxize.com/post/install-java-on-centos-8/#installing-openjdk-8
     [3]: https://github.com/cloudant-labs/clouseau/releases

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] natcohen edited a comment on issue #2630: Unable to run Clouseau after following the documentation

Posted by GitBox <gi...@apache.org>.
natcohen edited a comment on issue #2630: Unable to run Clouseau after following the documentation
URL: https://github.com/apache/couchdb/issues/2630#issuecomment-594001594
 
 
   It also works without escaping the scopes:
   
   ```
   -XX:OnOutOfMemoryError="kill -9 %p" \
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] natcohen commented on issue #2630: Unable to run Clouseau after following the documentation

Posted by GitBox <gi...@apache.org>.
natcohen commented on issue #2630: Unable to run Clouseau after following the documentation
URL: https://github.com/apache/couchdb/issues/2630#issuecomment-594086924
 
 
   @kocolosk Thanks for your help!
   
   Does it mean that escaping with backslashes depends on the server/OS? This could definitely be added to the documentation if we can  determine which OS require escaping

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] natcohen commented on issue #2630: Unable to run Clouseau after following the documentation

Posted by GitBox <gi...@apache.org>.
natcohen commented on issue #2630: Unable to run Clouseau after following the documentation
URL: https://github.com/apache/couchdb/issues/2630#issuecomment-594169855
 
 
   I will close this since it's not a real but but more a documentation issue...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] natcohen commented on issue #2630: Unable to run Clouseau after following the documentation

Posted by GitBox <gi...@apache.org>.
natcohen commented on issue #2630: Unable to run Clouseau after following the documentation
URL: https://github.com/apache/couchdb/issues/2630#issuecomment-594140718
 
 
   @kocolosk I am having some really hard time creating a systemd service in CentOS to be able to start Clouseau on server startup. 
   
   I have created the following start.sh script:
   ```sh
   export CLASSPATH=/opt/clouseau/lib/*
     
   /usr/bin/java -server -Xmx2G -Dsun.net.inetaddr.ttl=30 -Dsun.net.inetaddr.negative.ttl=30 -Dlog4j.configuration=file:/opt/clouseau/log4j.properties -XX:OnOutOfMemoryError="kill -9 %p" -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled com.cloudant.clouseau.Main /opt/clouseau/clouseau.ini
   ```
   
   starting this script from the command line works but when invoking it in the service, it automatically stops it without notice:
   ```sh
   [Unit]
   Description=Clouseau
   After=network.target
   
   [Service]
   Type=simple
   User=root
   WorkingDirectory=/opt/clouseau
   ExecStart=/opt/clouseau/start.sh
   Restart=on-abort
   
   [Install]
   WantedBy=multi-user.target
   ```
   
   It's a bit out of scope but it's been few hours I'm trying to find a solution and I can't find any help...Also this thread can help others create a service in unix for Clouseau
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] natcohen commented on issue #2630: Unable to run Clouseau after following the documentation

Posted by GitBox <gi...@apache.org>.
natcohen commented on issue #2630: Unable to run Clouseau after following the documentation
URL: https://github.com/apache/couchdb/issues/2630#issuecomment-593999710
 
 
   @kocolosk Great, without this line, it seems to work (I will do some tests).
   
   BTW, should we remove this line from the documentation? Also should we explain where this setcookie value is taken from?
   
   In addition, once I run clouseau, do I have to restart CouchDB? Do I have to do anything within CouchDB (from the fresh install)?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] natcohen removed a comment on issue #2630: Unable to run Clouseau after following the documentation

Posted by GitBox <gi...@apache.org>.
natcohen removed a comment on issue #2630: Unable to run Clouseau after following the documentation
URL: https://github.com/apache/couchdb/issues/2630#issuecomment-594140718
 
 
   @kocolosk I am having some really hard time creating a systemd service in CentOS to be able to start Clouseau on server startup. 
   
   I have created the following start.sh script:
   ```sh
   export CLASSPATH=/opt/clouseau/lib/*
     
   /usr/bin/java -server -Xmx2G -Dsun.net.inetaddr.ttl=30 -Dsun.net.inetaddr.negative.ttl=30 -Dlog4j.configuration=file:/opt/clouseau/log4j.properties -XX:OnOutOfMemoryError="kill -9 %p" -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled com.cloudant.clouseau.Main /opt/clouseau/clouseau.ini
   ```
   
   starting this script from the command line works but when invoking it in the service, it automatically stops it without notice:
   ```sh
   [Unit]
   Description=Clouseau
   After=network.target
   
   [Service]
   Type=simple
   User=root
   WorkingDirectory=/opt/clouseau
   ExecStart=/opt/clouseau/start.sh
   Restart=on-abort
   
   [Install]
   WantedBy=multi-user.target
   ```
   
   It's a bit out of scope but it's been few hours I'm trying to find a solution and I can't find any help...Also this thread can help others create a service in unix for Clouseau
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] natcohen commented on issue #2630: Unable to run Clouseau after following the documentation

Posted by GitBox <gi...@apache.org>.
natcohen commented on issue #2630: Unable to run Clouseau after following the documentation
URL: https://github.com/apache/couchdb/issues/2630#issuecomment-594001594
 
 
   It also works without the escaping the scopes:
   
   ```
   -XX:OnOutOfMemoryError="kill -9 %p" \
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] kocolosk commented on issue #2630: Unable to run Clouseau after following the documentation

Posted by GitBox <gi...@apache.org>.
kocolosk commented on issue #2630: Unable to run Clouseau after following the documentation
URL: https://github.com/apache/couchdb/issues/2630#issuecomment-594006362
 
 
   You shouldn't need to restart CouchDB, any request that needs a Clouseau process will try to establish a connection to it if one does not already exist.
   
   I do think we could improve the documentation based on your experience, especially the bit about the Erlang magic cookie. I'm not sure about removing the `kill -9` direction altogether; it has been our recommended practice to set that flag to help the system quickly recover from any condition that could cause the JVM memory to balloon.
   
   It'd be nice if we could find a way to make that easier to invoke, e.g. by including a script that starts / stops the Clouseau service. But I'm not sure anyone is ready to pick that up. Will need to give it some thought.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] natcohen closed issue #2630: Unable to run Clouseau after following the documentation

Posted by GitBox <gi...@apache.org>.
natcohen closed issue #2630: Unable to run Clouseau after following the documentation
URL: https://github.com/apache/couchdb/issues/2630
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] natcohen edited a comment on issue #2630: Unable to run Clouseau after following the documentation

Posted by GitBox <gi...@apache.org>.
natcohen edited a comment on issue #2630: Unable to run Clouseau after following the documentation
URL: https://github.com/apache/couchdb/issues/2630#issuecomment-594169855
 
 
   I will close this since it's not a real bug but more a documentation issue...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] kocolosk commented on issue #2630: Unable to run Clouseau after following the documentation

Posted by GitBox <gi...@apache.org>.
kocolosk commented on issue #2630: Unable to run Clouseau after following the documentation
URL: https://github.com/apache/couchdb/issues/2630#issuecomment-593994933
 
 
   Hi @natcohen, thanks for the report.
   
   The distributed Erlang cookie can be set a few different ways. The `etc/vm.args` file has a line that starts with `-setcookie`; this is probably the one that's in effect. It defaults to the same `monster` value above.
   
   The `-9` error looks like a problem with quoting in the shell. I'll confess that I tend to get that sort of thing working by trial and error 🙄 As a test you could remove the entire line:
   
   >          -XX:OnOutOfMemoryError=\"kill -9 %p\" \
   
   and see if that gets you going.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services