Hmm, I've been trying to replicate using the steps in #1513 (comment) (except I used 3.1.0 instead of 3.0.2) but it always works for me so far.
Do you see any output from code-server after applying the update? (If you're using systemd I imagine it'll be in the journal by default.)
According to that other issue you installed code-server in /var/www/code-server/ right? Do you see any other directories in there? It's supposed to rename the directory and then copy in the new files from the update so you should see something like code-server-3.1.0-linux-x86_64.1587056609700 which would be the old version.
I change the permissions to the code-server : chmod -R 777 ~/code-server
with the user "root" i create a "systemctl service file" : nano /lib/systemd/system/code-server.service
special attention to the path of "ExecStart" = /var/www/code-server/code-server-3.1.0-linux-x86_64/code-server special attention to "User" = gregoryweb
(Maybe this path and this user are problems for update...???)
Finally I change the config in Nginx to make a reverse proxy:
server {
#listen 80 default_server;
#listen [::]:80 default_server;
# SSL configuration
#
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/letsencrypt/live/code.gregvanko.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/code.gregvanko.com/privkey.pem;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name code.aaaaaaaaaaa.com;
resolver 192.168.1.1;
location / {
set $target "http://localhost:8080";
proxy_set_header Host $host;
proxy_pass $target;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
proxy_set_header Accept-Encoding gzip;
}
location ~ /\.ht {
deny all;
}
}
@code-asher where is my mistake?
Thank you very much for your help, I really appreciate to work with code-server
Hi,
solution found :-)
=> folder /tmp/code-server was not accessible by the code-server user (permission dined)... :-(
I changed the permission to the temp folder and after that code-server was able to update to 3.1.1
Ahhhh, /tmp is where it downloads and extracts the update. I'm glad you figured it out! I'll make a fix so it properly gives a good error message when that happens.
I'm still having getting 'update failed'. Have sudo chown -R coder:users /tmp The update seems to start running but ultimately failed. Are there any other directories that the update uses that might have the incorrect permissions?
I'm not sure. I'm using a docker build and in Help -> About it shows:
Version: 1.43.2
Commit: e480f65
Date: 2020-04-01T23:37:57.354Z
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15
In the Docker container code-server is installed in /usr/local/lib so the coder user would need permissions there.
3.0.2 has a bug where it'll say update failed even though the update succeeded, but it should ask you to refresh the window and after that if you run code-server --version in the terminal you should see 3.1.1.
Can confirm ran sudo chown -R coder:users /usr/local/lib ran the update and after a little while got shown the 'Updated failed' message box then shortly after it asked me to refresh the page. Upon doing so ran code-server --version and was given 3.1.1. Thanks for the speedy response!
Activity
Troubadoure commented on Apr 15, 2020
I'm getting the same error trying to update mine.
code-asher commented on Apr 16, 2020
Hmm, I've been trying to replicate using the steps in #1513 (comment) (except I used 3.1.0 instead of 3.0.2) but it always works for me so far.
Do you see any output from code-server after applying the update? (If you're using systemd I imagine it'll be in the journal by default.)
According to that other issue you installed code-server in /var/www/code-server/ right? Do you see any other directories in there? It's supposed to rename the directory and then copy in the new files from the update so you should see something like code-server-3.1.0-linux-x86_64.1587056609700 which would be the old version.
gregoryvanko commented on Apr 16, 2020
thank you for the quick answer.
Hmm strange...
here is my complete config and installation:
My user is "gregoryweb" and my Home folder is "/var/www"
i create a folder "code-server" with "root" user in my Home directory
I install "code-server 3-1-0" with "gregoryweb" user (download version and unzip) in "code-server" folder :
here is the content of the folder "code-server-3.1.0-linux-x86_64":
I change the permissions to the code-server : chmod -R 777 ~/code-server
with the user "root" i create a "systemctl service file" : nano /lib/systemd/system/code-server.service
the content of this file is :
special attention to the path of "ExecStart" = /var/www/code-server/code-server-3.1.0-linux-x86_64/code-server
special attention to "User" = gregoryweb
(Maybe this path and this user are problems for update...???)
Finally I change the config in Nginx to make a reverse proxy:
server { #listen 80 default_server; #listen [::]:80 default_server; # SSL configuration # listen 443 ssl; listen [::]:443 ssl; ssl_certificate /etc/letsencrypt/live/code.gregvanko.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/code.gregvanko.com/privkey.pem; # Add index.php to the list if you are using PHP index index.html index.htm index.nginx-debian.html; server_name code.aaaaaaaaaaa.com; resolver 192.168.1.1; location / { set $target "http://localhost:8080"; proxy_set_header Host $host; proxy_pass $target; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection upgrade; proxy_set_header Accept-Encoding gzip; } location ~ /\.ht { deny all; } }@code-asher where is my mistake?
Thank you very much for your help, I really appreciate to work with code-server
gregoryvanko commented on Apr 17, 2020
Hi,
solution found :-)
=> folder /tmp/code-server was not accessible by the code-server user (permission dined)... :-(
I changed the permission to the temp folder and after that code-server was able to update to 3.1.1
thank you
code-asher commented on Apr 17, 2020
Ahhhh, /tmp is where it downloads and extracts the update. I'm glad you figured it out! I'll make a fix so it properly gives a good error message when that happens.
Troubadoure commented on Apr 17, 2020
I'm still having getting 'update failed'. Have sudo chown -R coder:users /tmp The update seems to start running but ultimately failed. Are there any other directories that the update uses that might have the incorrect permissions?
code-asher commented on Apr 17, 2020
Are you updating from 3.1.0 or a different version?
Troubadoure commented on Apr 17, 2020
I'm not sure. I'm using a docker build and in Help -> About it shows:
Version: 1.43.2
Commit: e480f65
Date: 2020-04-01T23:37:57.354Z
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15
code-asher commented on Apr 17, 2020
In the Docker container code-server is installed in /usr/local/lib so the coder user would need permissions there.
3.0.2 has a bug where it'll say update failed even though the update succeeded, but it should ask you to refresh the window and after that if you run code-server --version in the terminal you should see 3.1.1.
Troubadoure commented on Apr 17, 2020
Can confirm ran sudo chown -R coder:users /usr/local/lib ran the update and after a little while got shown the 'Updated failed' message box then shortly after it asked me to refresh the page. Upon doing so ran code-server --version and was given 3.1.1. Thanks for the speedy response!
Improve request error handling