A thinking Meat

Linuxoid

  • 738 Posts
  • 74 Comments
Joined 2Y ago
cake
Cake day: Dec 03, 2021

help-circle
rss
Precision & Recall
Got me thinking about monitoring alerts

A short tutorial on strace
Nice intro into strace and similar tools







well probably you are right about the user error, but from the logs it seems that it cannot reach other instances - can you enter the shell of the container and check if you are able to ping/curl https://group.lt for example? and network isolation is a checkbox in portainer, according to docs.

for the federation itself i have also experienced it not working, when my nginx config was pointing wrongly to lemmy and lemmy-ui depending on the headers.

as i have said before - i can reach your instance from my lemmy, but don’t receive anything back.


also pictrs: { url: “http://pictrs:8080/” # api_key: “API_KEY” }

about tls setting - don’t remember why i have removed it, but group.lt federates fine. not sure about what you mean instance set to ALL.

what about network isolation in portainer? maybe it is on?


from the logs it seems that lemmy docker does not communicate with outside servers.

also i have a bit different config for lemmy.hjson

{
  # for more info about the config, check out the documentation
  # https://join-lemmy.org/docs/en/administration/configuration.html

  setup: {
    # username for the admin user
    admin_username: "adminuser"
    # password for the admin user
    admin_password: "adminpassword"
    # name of the site (can be changed later)
    site_name: "group.lt"
  }

  opentelemetry_url: "http://otel:4317"



  # the domain name of your instance (eg "lemmy.ml")
  hostname: "group.lt"
  # address where lemmy should listen for incoming requests
  bind: "0.0.0.0"
  # port where lemmy should listen for incoming requests
  port: 8536
  # settings related to the postgresql database
  # address where pictrs is available
pictrs: {
    url: "http://pictrs:8080/"
    # api_key: "API_KEY"
}
  database: {
    # name of the postgres database for lemmy
    database: "lemmy"
    # username to connect to postgres
    user: "lemmy"
    # password to connect to postgres
    password: "lemmy"
    # host where postgres is running
    host: "postgres"
    # port where postgres can be accessed
    port: 5432
    # maximum number of active sql connections
    pool_size: 5
  }
#  # optional: email sending configuration
  email: {
#    # hostname and port of the smtp server
    smtp_server: "postfix:25"
    smtp_from_address: "from@group.lt"
    tls_type: false
  }


}

also check in admin interface if federation is enabled and you do not blacklist instances

(https://lemmy.bulwarkob.com/admin) and maybe you can try to enable federation debug mode for awhile


you can have two nginx proxy instances, one as a front (serving other sites besides lemmy instance) and another - coupled with lemmy instance. in such case the first one can be configured minimally with basic proxy stuff to internal lemmy one, no need for this fancy lemmy and lemmy-ui proxying.

location /{
   proxy_pass http://nginx-lemmy-docker:someport;
}

you can define it as environment variables in https://github.com/LemmyNet/lemmy-ansible/blob/main/templates/docker-compose.yml i.e mine contains these lines:

  postfix:
    image: mwader/postfix-relay
    environment:
      - POSTFIX_myhostname=group.lt
      - POSTFIX_inet_protocols=ipv4
      - POSTFIX_smtp_sasl_auth_enable=yes
      - POSTFIX_smtp_sasl_password_maps=static:smtp_username:smtp_password
      - POSTFIX_smtp_tls_security_level=may
      - POSTFIX_smtp_sasl_security_options=noanonymous
      - POSTFIX_relayhost=sendgridsmtpserver:serverport
      - OPENDKIM_DOMAINS=group.lt
    restart: "always"

you should be able to use any mail gateway that supports smtp. one way to do it is to configure postfix to use sendgrid as relayhost - https://docs.sendgrid.com/for-developers/sending-email/postfix


Reminded me of Kevin Kelly's book [Out of Control](https://kk.org/outofcontrol/)

from the log it seems that lemmy cannot reach https://midwest.social/ - if you have more such operation timed outs - probably there is some networking issue with outgoing requests - maybe you have some kind of firewall? i can reach your instance from other direction: https://group.lt/c/bulwarkob@lemmy.bulwarkob.com

probably the easiest way to setup lemmy and another front facing reverse proxy is to use nginx that comes with lemmy on another port and setup simple reverse proxying with NPM to it. i myself using caddy for reverse proxying, using this config: https://join-lemmy.org/docs/en/administration/caddy.html


Homeserver version: Synapse 1.85.1
Fix bug in schema delta that broke upgrades for some deployments. Introduced in v1.85.0. (#15738, #15739)

okay, i don’t know how npm works, could you check this tutorial to see if you have set it up similarly?

https://youtu.be/6lQFZvCCe7U

also - check docker-compose.yml settings to remove port for lemmy host and i think you need to set use https to true as it is provided by npm


try to look here for the config file:

include /etc/nginx/conf.d/*.conf;
	include /data/nginx/default_host/*.conf;
	include /data/nginx/proxy_host/*.conf;
	include /data/nginx/redirection_host/*.conf;
	include /data/nginx/dead_host/*.conf;
	include /data/nginx/temp/*.conf;

btw, i think port in lemmy.bulwarkob.com:1236 in docker-compose is not needed for you, should be just lemmy.bulwarkob.com


yeah, nginx config for lemmy is not very straighforward. you need to mimic this:

worker_processes  1;
events {
    worker_connections  1024;
}
http {
    upstream lemmy {
        server "lemmy:8536";
    }
    upstream lemmy-ui {
        server "lemmy-ui:1234";
    }
    server {
      listen       1236;
      server_name  localhost;

      # frontend
      location / {
        set $proxpass "http://lemmy-ui";
        if ($http_accept = "application/activity+json") {
          set $proxpass "http://lemmy";
        }
        if ($http_accept = "application/ldr+json; profile=\"https://www.w3.org/ns/activitystreams\"") {
          set $proxpass "http://lemmy";
        }
        if ($request_method = POST) {
          set $proxpass "http://lemmy";
        }
        proxy_pass $proxpass;

        rewrite ^(.+)/+$ $1 permanent;

        # Send actual client IP upstream
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      }

      # backend
      location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
        proxy_pass "http://lemmy";
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        # Add IP forwarding headers
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      }
    }
}

also - can you check if all containers are running? just do docker-compose ps in the lemmy dir.


it seems there is no config for lemmy nginx here… might be in other files?


nginx config and lemmy.hjson would be useful as well


hi, can you post your docker-compose.yaml, nginx config and screenshots/logs of failures?









Robert Shea's son has generously released all of his father's novels on the internet under a Creative Commons license.

>As the flagship track at QCon, Architectures You've Always Wondered About showcases real-world examples of innovator companies pushing the limits with modern software systems.

cross-posted from: https://group.lt/post/81058 > Free pdf inside

Free pdf inside

I realize that if I would be reading non-stop - I would not finish all books I have. Just a passing thought before buying a new one. ;D


Open Source Surveillance
>Gather Real-Time Intelligence from Social Media, Cameras, Internet of Things, Industrial Control System devices. In addition search Wifi or Bluetooth networks and look for planes, cruises and city traffic

Actually I was reading mostly technical or professional literature, but after some friends advice started to mix more fiction, just in enjoy life more.


Seems to be an interesting book

Great article on Illuminatus!

Always interesting to see real life design choices.

Seems like sound principles and suggestions

I liked the point of view and feel it has lots of truth in it.

More Memory, More Problems
The single Postgres setting that almost took down our database


Some books listed
3



>Heidi Siegmund Cuda interviews Pekka Kallioniemi, the Finnish creator of ‘Vatnik Soup’ - a Twitter series and website where he identifies pro-Russian actors and propagandists from around the world

Kaip tik šį rytą pradėjau su šituo skaitiniu - labai tinka Nubo Dūmo temai panagrinėt ;)



Some review of the changes

Challenges with the traditional network stack Packet flow in the kernel with XDP The mechanics of XDP programs How to build a simple XDP program Conclusion References
1

>At Google, there was a document put together by Jeff Dean, the legendary engineer, called Numbers every Engineer should know. It’s really useful to have a similar set of numbers for LLM developers to know that are useful for back-of-the envelope calculations.




An example of LLM prompting for programming
>...account of an internal chat with Xu Hao, where he shows how he drives ChatGPT to produce useful self-tested code. His initial prompt primes the LLM with an implementation strategy (chain of thought prompting). His prompt also asks for an implementation plan rather than code (general knowledge prompting). Once he has the plan he uses it to refine the implementation and generate useful sections of code.




I have it - it is pretty cheap and stats are nice




There are many ways to play with it - one of them is https://github.com/nomic-ai/gpt4all . As for the strangeness, I would say it depends on the prompt (input).


Still, Sourcegraph is on fire.


Very cool character and story


tik šortus reikės rodyt ;)




great success!! (not). homeserver address has changed to https://matrix.group.lt - please relogin in your clients. accounts still are using base server group.lt - no changes required.

sorry for the inconvenience



A perspective for something that is happening in the mind.


actually there is a ipfs mirror for that, albeit just a dump of the file: /ipfs/QmVCjhoEFC9vwvaa8bKyJgwAByP4MXSogcyDGoz4Lkc3ox


Worth noting - article is written with regard to “native” AWS encryption, but if you use LUKS or other disk encryption setup - AWS can still snapshot running VMs. It is all about the trust. :(


love these kind of unexpected information transfers


maybe we can host the dump somehow in ipfs or similar storage?




when the last user will stop using it


Who knew? Remember - most of the data in most apps is managed so poorly that almost anybody can access it in the org.