• 3 Posts
  • 14 Comments
Joined 3Y ago
cake
Cake day: Jan 08, 2022

help-circle
rss


I bet that was a high-adrenaline click.

And a big smile when it succeeded :)


It will work if you suffix the url with the file extension.

Such as “.jpg” or “.png”

In your example, that would be https://i.ibb.co/ctm60Cx/i2660690070.webp


That is true.

I’m asking if anyone uses an external host for pictrs - to ease load on the server and free up space?


Could it help to move Pictrs to a 3rd-party host? (like AWS or similar)

Is anyone running Pictrs on a 3rd-party host? Does it help?


Thank you, the fix worked.

I should’ve posted that update sooner. I wrote it last week, but didn’t want to send til I tried everything.

It was a blessing in disguise though - got me to rummage the Lemmy files and ansible code MANY times!

Thank you sincerely for taking the time.


Sir Dessalines the rev,

I did a FRESH lemmy-ansible install on a new VPS.

  • I only modified the host file (did not edit config).

Homepage shows the same UI and error message:

  • “Found. Redirecting to /404?err=FetchError: invalid json response body at http:/lemmy:8536/api/v3/post/list?page=1&limit=20&sort=Active&type_=Local&saved_only=false reason: Unexpected token N in JSON at position 0”

Clicking “Login” or “Sign Up” gives the same error:

  • client.js: Uncaught TypeError: Cannot read properties of undefined (reading ‘site’)

And the same docker error:

  • lemmy_server:::root_span_builder:NotFound

I haven’t modified anything - it is still a fresh ansible-install.


Here are the configs/logs for this NEW lemmy instance (pretty-fied).

I haven’t changed anything (database / ports / config) beyond what ansible did.


If you have a chance to consider this, I am very grateful.

I’ve read all the docs and I don’t know what else to try.


NOTE: The GOOD news is - I’m making a “Lemmy Install for Noobs” guide as I go (detailing every small step)…

When I finally get Lemmy running, I’ll share the guide for community review/benefit.


I installed with ansible, but you are right, I modified the config a ton (tryin to make it work).

I’ll wipe the VM, reinstall with an unedited config, and go from there. Thank you


Yes thank you, I did it just like that. I appreciate the reply.


Hey thanks for the recommendation.

Here are the new privatebin links:

Docker logs (2 errors)

  • TL-DR (the 2 errors):
  • lemmy_server:::root_span_builder:NotFound
  • lemmy_server:::root_span_builder:captcha_incorrect

Lemmy config

Nginx config (/nginx/sites-enabled/ggg.com.conf)

It seems to be having a problem connecting to the server. I appreciate your response.


Thank you for the reply. I updated the 3 docs to paste bin.

You’re right because if I curl localhost (while SSHed into the server), it shows the NGINX setup page.

“If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.”

Could be an issue with the NGINX config (I’m not sure which port mappings to change)

For example, this section:

# frontend
location / {
# The default ports:
# lemmy_ui_port: 1235
# lemmy_port: 8536

set $proxpass "http://0.0.0.0:29201";
if ($http_accept ~ "^application/.*$") {
set $proxpass "http://0.0.0.0:17161";
}

if ($request_method = POST) {
set $proxpass "http://0.0.0.0:17161";
}

Am I meant to change those ports?

And is # lemmy_ui_port: 1235 and # lemmy_port: 8536 just listed for reference (or am I meant to add those elements)?

Thank you again.


Here are the new pastebin links:

Docker logs (2 errors)

  • TL-DR (the 2 errors):
  • lemmy_server:::root_span_builder:NotFound
  • lemmy_server:::root_span_builder:captcha_incorrect

Lemmy config

Nginx config (/etc/nginx/sites-enabled/ggg.com.conf)

I would still create an issue if you like.


Thank you for the reply. Sorry about the google docs. I updated the 3 docs to paste bin.

A curl to that URL says “Not Found”.

Yeah it does seem to be a fail in the backend call.

nginx -t gives OK, but I may not have the right port mapping in the Nginx config (/etc/nginx/sites-enabled/ggg.com.conf).


In the lemmy docs, there was a detailed nginx setup, but it 404s now:Lemmy nginx config

Could be beneficial to repost a functioning NGINX config file / Lemmy config file (with placeholder info).

(Just an idea, I’m grateful for the docs and code as it is. It’s great.)


Lemmy Homepage Fail (with details)
UPDATE: [HERE IS THE ANSWER](https://lemmy.ml/post/153893/comment/114220) ^^^^^^^ *** Hi, Lemmy is awesome. I’m having trouble launching my instance. Here is a home page screenshot: ![](https://i.imgur.com/fM0jeoG.png) HERE'S THE FULL ERROR: ``` “Found. Redirecting to /404?err=FetchError: invalid json response body at http://lemmy:8536/api/v3/post/list?page=1&limit=20&sort=Active&type_=Local&saved_only=false reason: Unexpected token N in JSON at position 0” ``` IF YOU CLICK ‘SIGN UP’, CONSOLE SAYS: ``` client.js:formatted:60298 Uncaught TypeError: Cannot read properties of undefined (reading 'site') at n.get (client.js:formatted:60298) at n.get (client.js:formatted:60293) at n.a.render (client.js:formatted:59987) at Ae (client.js:formatted:7378) at Pe (client.js:formatted:7410) at client.js:formatted:7420 at Ve (client.js:formatted:7423) at client.js:formatted:7495 at Ue (client.js:formatted:7497) at qe (client.js:formatted:7819) ``` *** OFTEN REQUESTED LOGS / CONFIGS: (pastebin) [Docker logs (2 errors)](https://privatebin.at/?8ea9aed44ac1a028#MkogusvxLi8FyapC6KEsmphk8jhKgYdMUKY4V9Zrj3X) - TL-DR (the 2 errors): - lemmy_server:::root_span_builder:NotFound - lemmy_server:::root_span_builder:captcha_incorrect [Lemmy config]( https://privatebin.at/?b87425cb369c0d40#9pxVfgvpLp6go6qMPRLavvMHBUKF6X6iaP4TJiJNCvG5) [Nginx config (/etc/nginx/sites-enabled/ggg.com.conf)](https://privatebin.at/?e8a53873c71fe293#BCzUQhf9K8RhBuJHvSniU4iGnEDAZLs8dfZjbYj5g6sK) *** PORTS I have the following ports open on the server (maybe too many): - 22, 80, 443, 8536, 5432, 1235 And the following rules in IPTABLES (maybe too many) - A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT - A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT - A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT - A INPUT -p tcp -m state --state NEW -m tcp --dport 8536 -j ACCEPT - A INPUT -p tcp -m state --state NEW -m tcp --dport 5432 -j ACCEPT - A INPUT -p tcp -m state --state NEW -m tcp --dport 1235 -j ACCEPT *** I've failed at several 'fixes'. If anyone knows what to do, I’d really appreciate the guidance. If any more info is needed, I'll gladly provide. Thank you
fedilink

Thanks for the reply. Yeah I have ansible on local.

Thus I’m guessing ‘git lemmy-ansible’ also goes on local (isn’t specified in the docs)


Clarifying the Ansible Instructions - 2 Questions
A couple questions about the [lemmy-ansible](https://github.com/LemmyNet/lemmy-ansible) instructions: *** **Step 1 - “Clone this repo: /lemmy-ansible.git”** *QUESTION 1* - Clone it to my local machine, correct? (not directly onto the VPS) ***ANSWER: - Yes, clone lemmy-ansible to local.*** *** **Step 2 - “Edit the config file”** *QUESTION 2* - By default, config.hjson has values like hostname: "{{ domain }}" - and - password: "{{ postgres_password }}". - Are those “{{values}}” automatically pulled from the hosts file? - or just directly edit them in the config.hjson file? ***ANSWER: - Edit them directly in the config.hjson file.*** *** Thank you for your patience. I want to do it right / understand. ***UPDATE: Installed Lemmy on VPS via SSH***
fedilink

2 Noob Questions - lemmy File Location / Migration
Hello Lemmy people, I’m trying to wrap my head around where editable files ultimately ‘live’ after Ansible install to a VPS. For example: 1. If you want to modify a specific cell in a Postgres table using Arctype (or another SQL GUI) - would you be: - directly modifying the VPS instance? - or modifying a mirrored database on your local computer? *** 2. If you setup Lemmy using a ‘1 year free trial’ from a VPS (like digital ocean)...and then want to migrate the Lemmy instance to another VPS (like Hetzner), would you be: - ‘pushing’ the custom Lemmy instance from your local computer to a new VPS? - or directly migrating the files from one VPS to the other? --- I realize these are noob questions. Thank you for your patience. Lemmy looks really cool.
fedilink