Installation de Ğchange-pod

J’ai installé Ğchange-pod selon la doc, mais il y a un problème avec Java :

$ ./elasticsearch
Unrecognized VM option 'UseParNewGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

J’ai installé le paquet openjdk-11-jre sur Debian Buster. Il semblerait que l’option UseParNewGC ait été supprimée dans openjdk 10, or le 9 a été supprimé des dépôts Debian.

@kimamila est-il possible de corriger ça ?

Sinon j’avais peur au début, mais en fait c’est très simple, pour l’instant. :slight_smile:

il faut enlever l option

1 Like

Ah merci, ça marche. J’ai commenté la ligne avec cette option dans bin/elasticsearch.in.sh. Je pensais que c’était une option de compilation.

Là il prend beaucoup de CPU et de disque dur, apparemment le nœud officiel est arrêté donc il ne doit pas pouvoir se synchroniser.

Je le relance de suite… (pb de certificat SSL…)

2 Likes

Mon nœud :
http://txmn.tk:9200
https://txmn.tk:9240

D’ailleurs, dans les paramètres de Ğchange, le nœud Ğchange est appelé « nœud Duniter »…

C’est qu’en fait gchange utilise des accès à BMA (pour les paramètres de BC, le montant du DU, etc.)
L’API spécifique à gchange sont isole, dans le code, et utilise le noeud présent ans les options avancé.

Mais… j’ai ajouté progressivement au Pod Gchange tout ce qu’il fallait de BMA, pour maintenant pouvoir accéder uniquement à un pod ghange.
Il me reste donc à fusionner, dans les paramètres, le deux champs “noeud Duniter” et “noeud Gchange”. C’est sur ma liste de trucs à faire. Mais comme elle est longue… :slight_smile:

J’ai ajouté ce problème et son contournement dans la doc : https://github.com/duniter-gchange/gchange-pod/blob/master/src/site/markdown/install.md#troubleshooting

@tuxmain et @Frederic_Renault pourrez vous aider ceux qui veulent monter un pod ? Par exemple ici : https://forum.monnaie-libre.fr/t/gchange-acces-technique-api-aux-annonces/12949/15?u=kimamila
Merci !

1 Like

Dans Ğchange, les requêtes websocket vers mon nœud (txmn.tk:9200) font une erreur 400. Pourtant je n’ai pas de reverse-proxy qui pourrait filtrer ça, j’ai mis 0.0.0.0 comme adresse d’écoute. Il y a un reverse-proxy (stunnel4) pour https sur le port 9240.

Je crois qu’il faut forcer ton nginx a passer en http 1.1, comme pour les ws de Duniter.

Ça marche !

Il n’a pas toutes les annonces (par exemple, la seule annonce que j’ai publiée et qu’il a date de 10 mois, alors qu’il y en a des plus récentes). Ça se synchronise tout seul au cours du temps ou pas ? Il faut peut-être le redémarrer pour qu’il se resynchronise, maintenant que la config réseau fonctionne ?

Config Apache
<VirtualHost *:9200 [::]:9200>
    ServerName txmn.tk
    ServerAdmin tuxmain@txmn.tk
    Protocols h2 http/1.1
    
    RewriteEngine On
    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteRule /(.*) ws://127.0.0.1:9199/$1 [P,L]
    
    ProxyPreserveHost On
    ProxyRequests Off
    ProxyTimeout 600
    
    ProxyPass /ws/ ws://127.0.0.1:9199
    <Location />
        ProxyPass http://127.0.0.1:9199/
    </Location>
    
    ErrorLog ${APACHE_LOG_DIR}/gchangepod.error.log
    CustomLog ${APACHE_LOG_DIR}/gchangepod.access.log common env=!dontlog
</VirtualHost>

<IfModule mod_ssl.c>
    <VirtualHost *:9240 [::]:9240>
        ServerName txmn.tk
        ServerAdmin tuxmain@txmn.tk
        Protocols h2 http/1.1
        
        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/txmn.tk/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/txmn.tk/privkey.pem
        
        RewriteEngine On
        RewriteCond %{HTTP:Upgrade} websocket [NC]
        RewriteRule /(.*) ws://127.0.0.1:9199/$1 [P,L]
        
        ProxyPreserveHost On
        ProxyRequests Off
        ProxyTimeout 600
        
        ProxyPass /ws/ ws://127.0.0.1:9199
        <Location />
            ProxyPass http://127.0.0.1:9199/
        </Location>
        
        ErrorLog ${APACHE_LOG_DIR}/gchangepod.error.log
        CustomLog ${APACHE_LOG_DIR}/gchangepod.access.log common env=!dontlog
    </VirtualHost>
</IfModule>

Ne pas oublier d’activer les modules :

sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod proxy_wstunnel

Tu peux tenter oui, un redémarrage.
Voir si ça ne marche pas, supprimer dans data/ puis relancer.

Au final ton pod a fonctionné avec un JDK 11 ?

Non, du coup j’ai abandonné… mais je peux réessayer sur mon RPi 4 (Raspbian Buster).

Cela ne m’étonne pas, du coup. Il faut une JDK 1.8.
Cf la doc :slight_smile:

Ce qui a bien marché pour moi, c’est d’installer openjdk-8-jre en suivant les indications données sur ce site :

Sous debian c’est facile d’ajouter le dépôt pour apt, pour les autres OS il y a aussi toutes les indications.

1 Like

Ce weekend, je vais installer l’ensemble de l’environnement de dev pour les pods Cs+/Gchange ainsi que les clients gchange et Cs en mode dev.

J’ai fait un pad pour m’organiser dans cette installation en mode dev, que j’alimenterai au fur et à mesure:

https://pad.p2p.legal/axiom-g1_datapod

Je vous tiendrais au courant de mes échecs/réussites ici du coup :slight_smile:

4 Likes

J’ai mis à jour mon pad.

1 Like

Salut.

Du coup, existe-t’il actuellement d’autres installations (“instances”) de Ğchange que www.gchange.fr ? Il y a t’il une liste ?

Instance web ? Ou Pod ?
Il y a deux Pod pour le site gchange.fr

Et une instance web www.gchange.es avec un pod pour l’Espagne

Je reviens ici car j’essaie d’installer un Pod Gchange.
J’ai suivi la procédure idem que pour mon Noeud Césium+
Mais j’obtiens une erreur que voici :

./elasticsearch
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /home/admin/gchange-pod-1.7.1/logs/gchange-pod-adn-life.log (Permission non accordée)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
	at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
	at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
	at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
	at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
	at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
	at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
	at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
	at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
	at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
	at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
	at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:440)
	at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:128)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:259)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:45)
log4j:ERROR Either File or DatePattern options are not set for appender [file].
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /home/admin/gchange-pod-1.7.1/logs/gchange-pod-adn-life_deprecation.log (Permission non accordée)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
	at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
	at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
	at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
	at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
	at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
	at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
	at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
	at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
	at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:672)
	at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:516)
	at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:440)
	at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:128)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:259)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:45)
log4j:ERROR Either File or DatePattern options are not set for appender [deprecation_log_file].
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /home/admin/gchange-pod-1.7.1/logs/gchange-pod-adn-life_index_indexing_slowlog.log (Permission non accordée)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
	at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
	at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
	at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
	at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
	at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
	at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
	at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
	at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
	at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:672)
	at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:516)
	at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:440)
	at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:128)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:259)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:45)
log4j:ERROR Either File or DatePattern options are not set for appender [index_indexing_slow_log_file].
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /home/admin/gchange-pod-1.7.1/logs/gchange-pod-adn-life_index_search_slowlog.log (Permission non accordée)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
	at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
	at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
	at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
	at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
	at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
	at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
	at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
	at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
	at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:672)
	at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:516)
	at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:440)
	at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:128)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:259)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:45)
log4j:ERROR Either File or DatePattern options are not set for appender [index_search_slow_log_file].
[2021-11-21 14:44:41,191][INFO ][node                     ] [node-gchange-adn-life] version[2.4.6], pid[1478], build[5376dca/2017-07-18T12:17:44Z]
[2021-11-21 14:44:41,192][INFO ][node                     ] [node-gchange-adn-life] initializing ...
[2021-11-21 14:44:41,625][INFO ][plugins                  ] [node-gchange-adn-life] modules [reindex, lang-expression, lang-groovy], plugins [mapper-attachments, cesium-plus-pod-core, cesium-plus-pod-subscription, cesium-plus-pod-user, gchange-pod-es-plugin], sites []
Exception in thread "main" java.lang.IllegalStateException: Failed to created node environment
Likely root cause: java.nio.file.AccessDeniedException: /home/admin/gchange-pod-1.7.1/data
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
	at java.nio.file.Files.createDirectory(Files.java:674)
	at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
	at java.nio.file.Files.createDirectories(Files.java:767)
	at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:169)
	at org.elasticsearch.node.Node.<init>(Node.java:165)
	at org.elasticsearch.node.Node.<init>(Node.java:140)
	at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:143)
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:194)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:45)
Refer to the log for complete error details.

Voilà si @kimamila @bpresles passent par là, merci pour votre retour d’infos.
Amicalement,
Francis

1 Like