UPDATE: HERE IS THE ANSWER
^^^^^^^
Hi,
Lemmy is awesome.
I’m having trouble launching my instance.
Here is a home page screenshot:
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)
Nginx config (/etc/nginx/sites-enabled/ggg.com.conf)
PORTS
I have the following ports open on the server (maybe too many):
And the following rules in IPTABLES (maybe too many)
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
Support / questions about Lemmy.
It says your site isn’t set up yet, and going to the homepage should be redirecting you to the setup page. Open up an issue for this on the github and I’ll verify that this is an issue.
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.
Could be an issue with the NGINX config (I’m not sure which port mappings to change)
For example, this section:
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)
Lemmy config
Nginx config (/etc/nginx/sites-enabled/ggg.com.conf)
I would still create an issue if you like.
How did you install lemmy, docker or ansible? This seems like a highly edited config, so I’m guessing docker. Yes you do need to add the correct ports if you did manually. I also need the docker compose.yml
You also need to start from scratch, because your site didn’t get set up properly. I suggest using the ansible, with an unedited config at first.
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
No probs.
Sir Dessalines the rev,
I did a FRESH lemmy-ansible install on a new VPS.
Homepage shows the same UI and error message:
Clicking “Login” or “Sign Up” gives the same error:
And the same docker error:
I haven’t modified anything - it is still a fresh ansible-install.
Here are the configs/logs for this NEW lemmy instance (pretty-fied).
DOCKER ERROR LOG
DOCKER-COMPOSE.YML
LEMMY CONFIG
NGINX CONFIG (/etc/nginx/sites-enabled/ggg.com.conf)
iptables
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 can confirm this is a bug that creeped in with
0.15.1
. Check here for instructions on a short term fix:https://github.com/LemmyNet/lemmy/issues/2064
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.
No probs! Its my bad for deploying broken code without testing it haha. And thank you for finding this.
Go to
https:://your-domain.com/api/v3/post/list
and see what it says. Most likely a problem with the backend, but the google links dont work for me.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.)
I don’t know about your error but maybe it would be easier to help you if you posted your logs and confs in text format, bonus points if you avoid google.
I suggest you use some pastebin, it would be much easier to read, you can choose any privatebin instance for example.
Hey thanks for the recommendation.
Here are the new privatebin links:
Docker logs (2 errors)
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.