Installation de Ğchange-pod

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

Vérifie les permissions du dossier /home/admin/gchange-pod-1.7.1/logs/

chmod 755 /home/admin/gchange-pod-1.7.1/logs/ -R
1 Like

Salut merci pour la réponse, j’ai déjà tenté ça mais j’obtiens la même erreur.
Bertrand m’a guidé pour attribué le fichier à un autre utilisateur mais idem…
Je pense que j’ai aussi un conflit avec le noeud Césium+ existant sur la même machine, j’en sais rien…

Cette nuit j’ai recommencé du début sur un autre petit serveur raspberry Pi sur lequel je n’ai qu’un petit site, la synchronisation s’est lancée.
Je viens de lancer le pod je n’ai pas eu d’erreur, je vais de ce pas voir s’il apparaît dans gchange, ou s’il faut que je fasse encore des réglages pour qu’il soit visible. :slight_smile:

1 Like

Bon le pods est lancé, il est accessible depuis l’extérieur, mais malgré une énième synchro qui semble s’être bien passé, je n’ai que 8923 documents et du coup seul 6 annonces récentes s’affichent… :sleepy:
Je précise que le Raspberry Pi est le modèle 3B+ à 1 Go de RAM peut-être n’est-ce pas assez suffisant ?
Mais bon là, ma console ne s’est pas figée au bout d’une demi heure de synchro, et il me semble que c’est allé au bout puisque c’est revenu en attente d’une prochaine commande normal comme si l’opération était terminée…
Je suis dubitatif, je sens bien que je suis proche de réussir mais quelque chose cloche encore ! :rage:

Adresse du pod gchange.data.pcandcom.com

Salut !

Alors oui 1Go il faut tenter, mais ça risque d’être court. A voir.

Pour sa synchro, pourra tu envoyer ton logo (ou au moins les.lignes de synchro).

Vérifie aussi que le noeud Duniter sur lequel tu es est bien synchro également.

1 Like

Bonsoir,
j’ai retenté de synchroniser le Pod Gchange, cette fois-ci j’obtiens un peu plus de 30000 documents, mais uniquement 15 annonces s’affichent…
Mon Pod n’apparraît pas lorsque je suis connecté sur celui de base, par contre si je le rentre à la main et que j’actualise la page, Gchange le prend en compte : gchange.data.pcandcom.com mais j’ai remarqué au bout d’un moment pendant la synchronisation, il passe plusieurs étapes, puis sur l’indexation des messages la console se fige à 99%… du coup ça ne va pas au bout je pense.

Je ne sais pas comment exporter depuis ma console le fichier .log, Oops ! :sweat_smile:
Merci pour ton aide.