this post was submitted on 10 Apr 2022
7 points (100.0% liked)

Lemmy Support

4659 readers
40 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

Hey All,

I am receiving this error message when running the ansible playbook run command and reviewing the docker logs shows this error message:

lemmy_1     | 2022-04-10T13:01:23.105192Z ERROR r2d2: could not connect to server: Connection refused
lemmy_1     | 	Is the server running on host "localhost" (127.0.0.1) and accepting
lemmy_1     | 	TCP/IP connections on port 5432?
lemmy_1     | could not connect to server: Address not available
lemmy_1     | 	Is the server running on host "localhost" (::1) and accepting
lemmy_1     | 	TCP/IP connections on port 5432?
lemmy_1     |     
lemmy_1     | 2022-04-10T13:01:23.105247Z ERROR r2d2: could not connect to server: Connection refused
lemmy_1     | 	Is the server running on host "localhost" (127.0.0.1) and accepting
lemmy_1     | 	TCP/IP connections on port 5432?
lemmy_1     | could not connect to server: Address not available
lemmy_1     | 	Is the server running on host "localhost" (::1) and accepting
lemmy_1     | 	TCP/IP connections on port 5432?


Here is my lemmy.hjson file.

{
  # settings related to the postgresql database
  database: {
    user: "lemmy"
    password: "<password>"
    host: "localhost"
    port: 5432
    database: "lemmy"
    pool_size: 5
  }
  # rate limits for various user actions, by user ip
  rate_limit: {
    # Maximum number of messages created in interval
    message: 180
    # Interval length for message limit, in seconds
    message_per_second: 60
    # Maximum number of posts created in interval
    post: 6
    # Interval length for post limit, in seconds
    post_per_second: 600
    # Maximum number of registrations in interval
    register: 3
    # Interval length for registration limit, in seconds
    register_per_second: 3600
    # Maximum number of image uploads in interval
    image: 6
    # Interval length for image uploads, in seconds
    image_per_second: 3600
    # Maximum number of comments created in interval
    comment: 6
    # Interval length for comment limit, in seconds
    comment_per_second: 600
    search: 6
    # Interval length for search limit, in seconds
    search_per_second: 600
  }
  # Settings related to activitypub federation
  federation: {
    # Whether to enable activitypub federation.
    enabled: false
    # Allows and blocks are described here:
    # https://join-lemmy.org/docs/en/federation/administration.html///instance-allowlist-and-blocklist
    # 
    # list of instances with which federation is allowed
    strict_allowlist: true
    # Number of workers for sending outgoing activities. Search logs for Activity queue stats to
    # see information. If running number is consistently close to the worker_count, you should
    # increase it.
    worker_count: 64
  }
  captcha: {
    # Whether captcha is required for signup
    enabled: true
    # Can be easy, medium, or hard
    difficulty: "hard"
  }
  # Email sending configuration. All options except login/password are mandatory
  email: {
    # Hostname and port of the smtp server
    smtp_server: "localhost:25"
    # Login name for smtp server
    smtp_login: "string"
    # Password to login to the smtp server
    smtp_password: "string"
    # Address to send emails from, eg noreply@your-instance.com
    smtp_from_address: "noreply@example.com"
    # Whether or not smtp connections should use tls. Can be none, tls, or starttls
    tls_type: "none"
  }
 # the domain name of your instance (mandatory)
  hostname: "forum.thewhiteranger.com"
  # Address where lemmy should listen for incoming requests
  bind: "0.0.0.0"
  # Port where lemmy should listen for incoming requests
  port: 8536
  # Whether the site is available over TLS. Needs to be true for federation to work.
  tls_enabled: true
  # Address where pictrs is available (for image hosting)
  pictrs_url: "http://localhost:8080"
  # Maximum length of local community and user names
  actor_name_max_length: 20
  # Maximum number of HTTP requests allowed to handle a single incoming activity (or a single object fetch through the search).
  http_fetch_retry_limit: 25
}

When running ansible it erors out at realoding the nginx service.

TASK [reload nginx with new config] ***********************************************************************************************************************************************************************
fatal: [<my domain>]: FAILED! => {"changed": true, "cmd": "nginx -s reload", "delta": "0:00:00.002792", "end": "2022-04-10 09:01:25.494773", "msg": "non-zero return code", "rc": 127, "start": "2022-04-10 09:01:25.491981", "stderr": "/bin/sh: 1: nginx: not found", "stderr_lines": ["/bin/sh: 1: nginx: not found"], "stdout": "", "stdout_lines": []}
you are viewing a single comment's thread
view the rest of the comments
[–] Tryp@fuckreddit.tryp.digital 2 points 2 years ago* (last edited 2 years ago) (1 children)

I would also change smtp_server and pictrs_url the following

smtp_server: "postfix:25"

pictrs_url: "http://pictrs:8080"

I would also edit your no reply address to your domain if that's not a place holder you put there.

[–] joshuafooter@lemmy.ml 2 points 2 years ago (1 children)

Thanks a lot, this has fixed the issue.

[–] Tryp@fuckreddit.tryp.digital 1 points 2 years ago

You're welcome! Let me know if you have any more issues!