Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
zblesk
@zblesk:zble.sk
[m]
Also i don't see the image name in your db compose? What are you using?
1 reply
Amit Kumar
@kamit-transient
@zblesk:zble.sk looks like due to your help, I found the solution! let me try and will confirm back.
Amit Kumar
@kamit-transient

Solution:
The hostname should be name of your database container name.

In my case it should be huginn_mysql , Now its working.

Thanks @zblesk:zble.sk

zblesk
@zblesk:zble.sk
[m]
Yeah 👍🏻
Glad it worked out!
Btw is the external_links necessary? I'm not using it, and I had no issues
And do you plan to run additional workers? (Seeing as you're using the single thread container)
Amit Kumar
@kamit-transient
certain properties vary from docker-compose version to version, Here external_links is NOT required but the network under the service key is required.

For reference for other people, I am providing my complete docker-compose files:

If you are using MySQL:

version: '3.1'

services:

  mysql:
    container_name: mysql_server
    image: mysql
    restart: always
    networks:
     - mysql_network
    environment:
      MYSQL_ROOT_PASSWORD: huginn 
      MYSQL_DATABASE: huginn
      MYSQL_USER: huginn
      MYSQL_PASSWORD: huginn


  adminer:
    image: adminer
    networks:
     - mysql_network
    restart: always
    ports:
      - 8989:8080

networks:
 mysql_network:
  external: 
   name: mysql_network
docker-compose for postgresql:
version: '3.1'

services:
  postresql:
    container_name: postgresql_server
    image: postgres
    restart: always
    networks:
     -  postgres-network
    volumes:
      - ./pgdata:/var/lib/postgresql/data
      - ./pgconf:/etc/postgresql
      - ./pglog:/var/log/postgresql
    environment:
      POSTGRES_PASSWORD: huginn
      POSTGRES_USER: huginn
      POSTGRES_DB: huginn


  adminer:
    image: adminer
    networks:
     -  postgres-network
    restart: always
    ports:
      - 8899:8080
networks:
 postgres-network:
  external: true

docker-compose for huginn using postgres, for Mysql uncomment the commented part and comment the PostgreSQL lines:

version: '3'
services:
 huginn:
   container_name: huginn_web
   networks:
    - postgres-network
#    external_links:
#      - 'postgresql_server:postgres'
   ports:
     - '3333:3000'
   environment:
     DATABASE_USERNAME: huginn 
     DATABASE_NAME: huginn
     DATABASE_PASSWORD: huginn
     DATABASE_HOST: postgresql_server
     DATABASE_ADAPTER: postgresql 
     RAILS_ENV: production
     REQUIRE_CONFIRMED_EMAIL: 'true'
     IMPORT_DEFAULT_SCENARIO_FOR_ALL_USERS: 'false'
     SMTP_DELIVERY_METHOD: sendmail
     SEND_EMAIL_IN_DEVELOPMENT: 'true'
     EMAIL_FROM_ADDRESS: 'HealthTiiips@gmail.com'
     ENABLE_INSECURE_AGENTS: 'true'
   image: huginn/huginn-single-process
# version: '3.3'
# services:
#     huginn_web:
#         container_name: huginn_web
#         links:
#             - 'huginn_mysql:mysql'
#         ports:
#             - '3000:3000'
#         networks:
#          - mysql_network
#         environment:
#             - DATABASE_NAME=huginn
#             - DATABASE_HOST= mysql_server
#             - DATABASE_USERNAME=huginn
#             - DATABASE_PASSWORD=somethingsecret
#         image: huginn/huginn-single-process
networks:
 postgres-network:
  external:
   name: postgres-network

Thanks.

zblesk
@zblesk:zble.sk
[m]
Nice of you!
So you are just running a single process
Does anyone ose postgres? I wanted to, but it seemed not to be directly supported,so I didn't want to risk it..
1 reply
Amit Kumar
@kamit-transient
as of now yes, will be spanning it multi-thread. I am testing it as of now, for some of the use cases, if that works then will move this to production with multi thread enabled
zblesk
@zblesk:zble.sk
[m]
Yeah, I keep having issues with threading/system load. Hope it works out better for you
The Doctor
@virtadpt
@zblesk:zble.sk I was able to mitigate that by using multiple delayed_job workers instead of threads.
2 replies
Amit Kumar
@kamit-transient
Would some please share any example on How to use JavaScript Agent with data scrapped using Website Agent ?
zblesk
@zblesk:zble.sk
[m]
Is that it? Or is there something else I'm missing?
zblesk
@zblesk:zble.sk
[m]
Is that documented somewhere?
zblesk
@zblesk:zble.sk
[m]
I don't get how it works at all. I made some chnges when I had load issues; they sometimes still appear, and sometimes huginn just silently stops working
I'm using the huginn-single-process container everywhere:
  • one for the web ui
  • one with the command: /scripts/init bin/threaded.rb
  • a few with the command: /scripts/init script/delayed_job -i 1 run
    (with various values in -i)
but right now, the delayed_job workers are taking as much cpu as allocation lets them (and probably have for 2 days, since I last checked), the web is up and responsive, but... 0 events were processed lately, and 10 000 items in queue are waiting...
jedis
@jedis_gitlab
hello. is there a way to access the triggering regex rule for the trigger agent?
{
  "expected_receive_period_in_days": "30",
  "keep_event": "false",
  "rules": [
    {
      "type": "regex",
      "value": [
        "test1",
        "test2"
      ],
      "path": "$.text"
    }
  ],
  "message": "Triggered by: {sfsfsd}"
}
I want to have it show if test1 or test2 triggered it
The Doctor
@virtadpt
@zblesk:zble.sk Take a look at this:
huginn/huginn#2662
The Doctor
@virtadpt
Has anyone here ever tried using Redis as a caching layer for MySQL (on the back-end of Huginn)?
Amit Kumar
@kamit-transient

is there any alternative to this readability agent ? here is the link: https://github.com/kreuzwerker/DKT.huginn_readability_agent/pulls

From the given RSS URL, I want to fetch the main content of the article, and for that, I thought to use this agent.

Friends any suggestions on this/or any alternate approach to fetching the main content of the article?

1 reply
zblesk
@zblesk:zble.sk
[m]
I have a few; one is RSSHub, the others I don't remember rn, ping me later if RSSH doesn't do what you need
(i could look it up once I get home)
Amit Kumar
@kamit-transient
intresting. is it possible to get actual content (full text) using RSSHub? I think its only return description.
zblesk
@zblesk:zble.sk
[m]
This is the second one, probably better for your use case: https://github.com/feedocean/rss2full
The Doctor
@virtadpt

Can somebody please help me look into this? I just ran into it again. I'm not sure my database schema has been updated since January of last year.

huginn/huginn#2942

The Doctor
@virtadpt
I'm starting to worry about that bug a little bit..
The Doctor
@virtadpt
In other news, I've been trying to troubleshoot this particular bug, where Huginn won't start or run on Ubuntu 22.04: huginn/huginn#3149
Unfortunately, I've been able to replicate it by upgrading my server and then accidentally blowing my Huginn install up.
The genesis of the bug is when anything that contacts MySQL2 issues a connect() to the database server and segfaults:
/home/drwho/.rvm/gems/ruby-2.7.0/gems/mysql2-0.5.4/lib/mysql2/client.rb:95: [BUG ] Segmentation fault at 0x0000000000000000 ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
This happens for any rake task that involves the database - migrations, purging old events, whatever.
This happens with accounts that both do and do not have passwords.
The Doctor
@virtadpt
I think it has to do with OpenSSL. I found a way to both install the OpenSSL compatibility library (rvm pkg install openssl) and compile Ruby against it (rvm install 2.7.0 -C --with-openssl-dir=/home/drwho/.rvm/usr), but the same thing happens with every version of Ruby I've tried to install (v2.6.x v2.7.x, and v3.x).
The Doctor
@virtadpt
I think it's because the mysql2 gem references the natively built mysql2.so library it compiles, which itself references the system-wide libcrypto.so.3 library, when it should be linked against the ~/.rvm/usr/lib/libcrypto.so library.
The Doctor
@virtadpt
I've been working all night on this, I might need some help.
The Doctor
@virtadpt
It fails reliably on rake db:migrate and undle exec rails runner "Event.cleanup_expired!" RAILS_ENV=production. Basically, anything that contacts the database.
The Doctor
@virtadpt
I'm updating this ticket: huginn/huginn#3149
Is anybody around?
The Doctor
@virtadpt
I guess not.
The Doctor
@virtadpt
I think this is going to be a full system rebuild.
I'd best get to it.
The Doctor
@virtadpt
Yep. Full system rebuild.