Adding chart through UI results in error.
Logs:
ui_1 | 2019/04/05 04:22:01.082 [uploadChart.go:15] UploadFile ui_1 | 2019/04/05 04:22:01.082 [uploadChart.go:25] fileName:/tmp/redis-6.4.4.tgz ui_1 | 2019/04/05 04:22:01.082 [uploadChart.go:32] going into uploadChart() chartmuseum_1 | 2019-04-05T04:22:01.092Z DEBUG [5] Incoming request: /api/charts {"reqID": "83095714-c363-4adc-be32-56a2383ad2ff"} chartmuseum_1 | 2019-04-05T04:22:01.093Z DEBUG [5] Adding package to storage {"package": "redis-6.4.4.tgz", "reqID": "83095714-c363-4adc-be32-56a2383ad2ff"} chartmuseum_1 | 2019-04-05T04:22:01.094Z ERROR [5] Request served {"path": "/api/charts", "comment": "", "latency": "1.600581ms", "clientIP": "172.20.0.2", "method": "POST", "statusCode": 500, "reqID": "83095714-c363-4adc-be32-56a2383ad2ff"} ui_1 | 2019/04/05 04:22:01.095 [chartmuseum.go:36] combined out: ui_1 | % Total % Received % Xferd Average Speed Time Time Time Current ui_1 | Dload Upload Total Spent Left Speed 100 20285 100 59 100 20226 8297 2777k --:--:-- --:--:-- --:--:-- 2821k ui_1 | {"error":"open /charts/redis-6.4.4.tgz: permission denied"} ui_1 | 2019/04/05 04:22:01.095 [C] [asm_amd64.s:522] the request url is /receive/ ui_1 | 2019/04/05 04:22:01.095 [C] [asm_amd64.s:522] Handler crashed with error can't find templatefile in the path:views/uploadchartcontroller/post.tpl ui_1 | 2019/04/05 04:22:01.095 [C] [asm_amd64.s:522] /usr/local/go/src/runtime/asm_amd64.s:522 ui_1 | 2019/04/05 04:22:01.095 [C] [asm_amd64.s:522] /usr/local/go/src/runtime/panic.go:513 ui_1 | 2019/04/05 04:22:01.095 [C] [asm_amd64.s:522] /go/src/quickstart/vendor/github.com/astaxie/beego/template.go:73 ui_1 | 2019/04/05 04:22:01.095 [C] [asm_amd64.s:522] /go/src/quickstart/vendor/github.com/astaxie/beego/controller.go:264 ui_1 | 2019/04/05 04:22:01.095 [C] [asm_amd64.s:522] /go/src/quickstart/vendor/github.com/astaxie/beego/controller.go:215 ui_1 | 2019/04/05 04:22:01.095 [C] [asm_amd64.s:522] /go/src/quickstart/vendor/github.com/astaxie/beego/controller.go:195 ui_1 | 2019/04/05 04:22:01.095 [C] [asm_amd64.s:522] /go/src/quickstart/vendor/github.com/astaxie/beego/router.go:859 ui_1 | 2019/04/05 04:22:01.095 [C] [asm_amd64.s:522] /usr/local/go/src/net/http/server.go:2741 ui_1 | 2019/04/05 04:22:01.095 [C] [asm_amd64.s:522] /usr/local/go/src/net/http/server.go:1847 ui_1 | 2019/04/05 04:22:01.095 [C] [asm_amd64.s:522] /usr/local/go/src/runtime/asm_amd64.s:1333 ui_1 | 2019/04/05 04:22:01.095 [server.go:2977] [HTTP] http: multiple response.WriteHeader calls ui_1 | 2019/04/05 04:22:01.112 [main.go:16] I'm alive chartmuseum_1 | 2019-04-05T04:22:01.114Z DEBUG [6] Incoming request: /api/charts {"reqID": "87bbf3e4-519f-41fd-9bde-8da532399ee0"} chartmuseum_1 | 2019-04-05T04:22:01.114Z DEBUG [6] Entry found in cache store {"repo": "", "reqID": "87bbf3e4-519f-41fd-9bde-8da532399ee0"} chartmuseum_1 | 2019-04-05T04:22:01.114Z DEBUG [6] Fetching chart list from storage {"repo": "", "reqID": "87bbf3e4-519f-41fd-9bde-8da532399ee0"} chartmuseum_1 | 2019-04-05T04:22:01.114Z DEBUG [6] No change detected between cache and storage {"repo": "", "reqID": "87bbf3e4-519f-41fd-9bde-8da532399ee0"} chartmuseum_1 | 2019-04-05T04:22:01.114Z INFO [6] Request served {"path": "/api/charts", "comment": "", "latency": "172.076µs", "clientIP": "172.20.0.2", "method": "GET", "statusCode": 200, "reqID": "87bbf3e4-519f-41fd-9bde-8da532399ee0"} ui_1 | 2019/04/05 04:22:01.115 [D] [server.go:2741] | 172.20.0.1| 200 | 2.288606ms| match| GET / r:/ ui_1 | 2019/04/05 04:22:01.132 [D] [server.go:2741] | 172.20.0.1| 304 | 43.906µs| match| GET /static/js/reload.min.js ui_1 | 2019/04/05 04:22:01.185 [D] [server.go:2741] | 172.20.0.1| 304 | 86.623µs| match| GET /static/img/plus.png ui_1 | 2019/04/05 04:22:01.207 [D] [server.go:2741] | 172.20.0.1| 304 | 38.257µs| match| GET /static/img/logo_white.png
I'm using the following docker-compose file:
version: '2.0' services: ui: image: idobry/chartmuseumui:latest environment: CHART_MUSESUM_URL: "http://chartmuseum:8080" ports: - 3000:8080 chartmuseum: image: chartmuseum/chartmuseum:latest volumes: - /home/user/Desktop/test:/charts restart: always environment: PORT: 8080 DEBUG: 1 STORAGE: local STORAGE_LOCAL_ROOTDIR: /charts ports: - 8080:8080
The file is currently set to 0777 with 1000:1000 ownership.
Hi @gabrielcalderon!
I couldn't represent your problem. Here is my docker-compose file:
version: '2.0'
services:
ui:
image: idobry/chartmuseumui:latest
environment:
CHART_MUSESUM_URL: "http://chartmuseum:8080"
ports:
- 3000:8080
chartmuseum:
image: chartmuseum/chartmuseum:latest
volumes:
- ~/Documents/test/charts:/charts
restart: always
environment:
PORT: 8080
DEBUG: 1
STORAGE: local
STORAGE_LOCAL_ROOTDIR: /charts
ports:
- 8080:8080
➜ test docker logs 38bc0381b526
2019/04/10 07:42:57.414 [I] [asm_amd64.s:1333] http server Running on http://:8080
2019/04/10 08:03:56.670 [main.go:16] I'm alive
2019/04/10 08:03:56.680 [D] [server.go:2741] | 172.18.0.1| 200 | 10.7256ms| match| GET / r:/
2019/04/10 08:03:56.802 [D] [server.go:2741] | 172.18.0.1| 200 | 213.9µs| match| GET /static/js/reload.min.js
2019/04/10 08:03:56.808 [D] [server.go:2741] | 172.18.0.1| 200 | 669.1µs| match| GET /static/img/plus.png
2019/04/10 08:03:57.081 [D] [server.go:2741] | 172.18.0.1| 200 | 321.4µs| match| GET /static/img/logo_white.png
2019/04/10 08:03:57.250 [D] [server.go:2741] | 172.18.0.1| 200 | 2.1174ms| match| GET /static/img/logo.png
2019/04/10 08:04:03.506 [uploadChart.go:15] **UploadFile**
2019/04/10 08:04:03.506 [uploadChart.go:25] fileName:/tmp/mychart-0.1.0.tgz
2019/04/10 08:04:03.507 [uploadChart.go:32] going into uploadChart()
2019/04/10 08:04:03.601 [chartmuseum.go:36] combined out:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2000 100 14 100 1986 894 123k --:--:-- --:--:-- --:--:-- 138k
{"saved":true}
2019/04/10 08:04:03.601 [C] [asm_amd64.s:522] the request url is /receive/
2019/04/10 08:04:03.601 [C] [asm_amd64.s:522] Handler crashed with error can't find templatefile in the path:views/uploadchartcontroller/post.tpl
2019/04/10 08:04:03.601 [C] [asm_amd64.s:522] /usr/local/go/src/runtime/asm_amd64.s:522
2019/04/10 08:04:03.601 [C] [asm_amd64.s:522] /usr/local/go/src/runtime/panic.go:513
2019/04/10 08:04:03.601 [C] [asm_amd64.s:522] /go/src/quickstart/vendor/github.com/astaxie/beego/template.go:73
2019/04/10 08:04:03.601 [C] [asm_amd64.s:522] /go/src/quickstart/vendor/github.com/astaxie/beego/controller.go:264
2019/04/10 08:04:03.601 [C] [asm_amd64.s:522] /go/src/quickstart/vendor/github.com/astaxie/beego/controller.go:215
2019/04/10 08:04:03.601 [C] [asm_amd64.s:522] /go/src/quickstart/vendor/github.com/astaxie/beego/controller.go:195
2019/04/10 08:04:03.601 [C] [asm_amd64.s:522] /go/src/quickstart/vendor/github.com/astaxie/beego/router.go:859
2019/04/10 08:04:03.601 [C] [asm_amd64.s:522] /usr/local/go/src/net/http/server.go:2741
2019/04/10 08:04:03.601 [C] [asm_amd64.s:522] /usr/local/go/src/net/http/server.go:1847
2019/04/10 08:04:03.601 [C] [asm_amd64.s:522] /usr/local/go/src/runtime/asm_amd64.s:1333
2019/04/10 08:04:03.601 [server.go:2977] [HTTP] http: multiple response.WriteHeader calls
2019/04/10 08:04:03.928 [main.go:16] I'm alive
2019/04/10 08:04:03.947 [D] [server.go:2741] | 172.18.0.1| 200 | 19.7626ms| match| GET / r:/
2019/04/10 08:04:03.998 [D] [server.go:2741] | 172.18.0.1| 200 | 305.1µs| match| GET /static/img/icon_default.png
2019/04/10 08:04:04.000 [D] [server.go:2741] | 172.18.0.1| 304 | 296.6µs| match| GET /static/js/reload.min.js
2019/04/10 08:04:04.002 [D] [server.go:2741] | 172.18.0.1| 304 | 198.1µs| match| GET /static/img/plus.png
2019/04/10 08:04:04.069 [D] [server.go:2741] | 172.18.0.1| 304 | 101µs| match| GET /static/img/logo_white.png
As you see I have the same error "[C] [asm_amd64.s:522] Handler crashed with error can't find templatefile in the path:views/uploadchartcontroller/post.tpl", but Im able to upload and download chart file and there is no any access exceptions
➜ test ls -la
total 8
drwxr-xr-x 4 max staff 128 Apr 10 10:40 .
drwx------+ 18 max staff 576 Apr 10 10:37 ..
drwxr-xr-x 4 max staff 128 Apr 10 11:04 charts
-rw-r--r-- 1 max staff 412 Apr 10 10:42 docker-compose.yaml
➜ test ls -la charts
total 16
drwxr-xr-x 4 max staff 128 Apr 10 11:04 .
drwxr-xr-x 4 max staff 128 Apr 10 10:40 ..
-rw-r--r-- 1 max staff 370 Apr 10 11:04 index-cache.yaml
-rw-r--r-- 1 max staff 1986 Apr 10 11:04 mychart-0.1.0.tgz
How do you run compose file?
sudo docker-compose up -d
I will give this a try again this weekend.
I've encounter the same error, I'm just trying visit the ingress url.
@chinglinwen I encountered that same error when chartmuseum had basic auth enabled. Do you have that enabled as well? If you do, you'll have to disable basic auth
@hugocortes Here's my kubernetes yaml: https://pastebin.com/gcJpSQrm
By this line, https://sourcegraph.com/github.com/chartmuseum/ui/-/blob/routers/router.go#L29:25 os.Getenv("BASIC_AUTH_USERS") I think I haven't enabled basic auth.
I have experienced the same issue after setting permissions on the volume folder on the host system it was working again: chmod 777 /home/user/Desktop/test