65 Replies
(context)
I asked the user to try running it manually to see what's going on
----------
can you give me the contents of
/lib/systemd/system/coder.service
? I wanna be sure of somethingWhat information would you like?
wrong file
I want to know if coder runs a separate user
which it clearly does just to be sure
alright
sudo -u coder /usr/bin/coder server
btw, any more logs using journalctl -xe coder
?ok tons of errors when I tried going on tyhe domain š¤
any clue, @Phorcys?
sorry I am kinda busy
I answer when I can
so
you should change your access URL but there's no reason for it to crash
send me the full log please
yeah sorry I didn't have the time, I'll take a look later
which ones btw
try this too
Okayokayokay, so I got it up and working with the
--tunnel
, but without it doesn't work š¤
Then I get this:
I changed the access url to: http://myip:3000
btw ^^
I discovered my issue I am pretty sure.
PS: It wasnt the issue lolit clearly is
also please post the entire log when asked to
I can't troubleshoot anything if you just send portions of the log
I fixed the permission denied, but it looks like there is an issue with postgres:
lsof -i :35635
So after a lot of digging.
These are my errors:
It looks like its something with postgresql not connecting properly and the ports are open + not used š¤
I use the built-in postgresql db with the url given by:
Any clue on what that can be causing this issue?
The website works fine when tunneling, but when using:
I get this error:
The config is all correct and the access url is not
127.0.0.1
š¤;the access url is 127.0.0.1:3000
postgres aint running
at least not on that port
Not in the config?
doesn't matter what you think it is
your access url is http://127.0.0.1:3000
How do I change the access url then?
using the
CODER_ACCESS_URL=http://whatever
env variableIn the config?
no
in the environment variables
what do you call the config
Coder.env file
In
etc/coder.d/
alright, so that file define environment variables too but they only apply to coder, but it should still function properly in that case
can you show me that file ?
coder reads your access url as this, so it's likely to be a config error
oh yeah it might not be using that env file when running it manually
Thats what I am also worried about, it works when tunneling, but not when doing it alone?
yeah because tunnelling overwrites your access url
Yeah, so how would I fix this/check if it runs that?
I would say it doesn't
does
coder server --help
say anything about specifying a config file ?
I'm pretty sure the service itself is eating from that config
using EnvironmentFile=
in the SystemD serviceyeah I checked
anyways
you should just try to do
systemctl start coder
and we would debug using journalctl -xe coder
because that would use the env fileSystemctl indeed uses the env file ( checked the service file ).
I did:
And got this:
oh yeah
still the same issue
your postgres somehow isn't running
Neither on port:
35635
or 5432
maybe you should use the built-in postgres ? idk
how did you install postgres
I am
I am using the built-in
Yeah?
I don't know honestly
since this is just normal
@sharkymark any idea ?
and what if you don't specify the port ?
I can try
Give me 2 sec
Okok, so I got postgres working with:
And then it ran fine, but when I go on
https://coder.stilaugamer.com
, I get an 404?that's because you're listening on 3000
and also it's probably not even using your config
So I would need to do:
https://coder.stilaugamer.com:3000
well
no
can just set port to 443
Where? š¤š¤
CODER_ADDRESS
well, if it actually cares about that one
you can edit your service file to add
postgres-builtin-serve
at the endSo basicslly:
yes
I get already in use š¤
Port already in use
are you running nginx/apache/any other web server ?
Nginx
why not run coder in http and reverse-proxy it then?
How would I do that to be exact?
What I've done is basically:
Take ip and port and make it https
NGINX Reverse Proxy
Configure NGINX as a reverse proxy for HTTP and other protocols, with support for modifying request headers and fine-tuned buffering of responses.
using the
proxy_pass
directive
and you would also make coder http
basically nginx would handle the SSLSo something like this:
@Phorcys Would I just leave:
CODER_TLS_CERT_FILE
and CODER_TLS_KEY_FILE
empty and have CODER_TLS_ENABLE
as false and then reverse proxy it with nginx?
Would basically be:
yes but no
š¤
close enough though
Ah ok, I was close š
I'll give it a try
IT WORKS :HAPPY:
It works on:
coder.stilaugamer.com
now, but ssl hasn't came yet.
Sometimes takes a lil before it comes.
But it works! Thanks!
Finally it works :HAPPY:But the agent is just saying connecting š¤
@Phorcys Any clue on why its just connecting?
oh yeah you have to proxy websockets too
check out the pinned message in #Websocket connection failed (nginx websocket passthrough)
This is my current location thingy:
Would it be smth like this?
( I am unsure of what to set in the top
header
with the X-Real-IP $remote_addr
)
Wouldn't it be smth like this ^^
I resolved the issue and not facing anymore problems š