Related to #535
After installing with docker, the webUI comes up blank with nothing but a white page. Here's what I've done to troubleshoot.
curl --insecure -vvv --user test:test https://127.0.0.1:3000
* Rebuilt URL to: https://127.0.0.1:3000/
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 3000 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 597 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
* server certificate verification SKIPPED
* server certificate status verification SKIPPED
* error fetching CN from cert:The requested data were not available.
* common name: (does not match '127.0.0.1')
* server certificate expiration date FAILED
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #1
* subject: C=AU,ST=Some-State,O=Internet Widgits Pty Ltd
* start date: Thu, 22 Dec 2016 21:03:25 GMT
* expire date: Fri, 22 Dec 2017 21:03:25 GMT
* issuer: C=AU,ST=Some-State,O=Internet Widgits Pty Ltd
* compression: NULL
* ALPN, server did not agree to a protocol
* Server auth using Basic with user 'test'
> GET / HTTP/1.1
> Host: 127.0.0.1:3000
> Authorization: Basic dGVzdDp0ZXN0
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Connection: keep-alive
< Accept-Ranges: bytes
< Vary: Accept-Encoding
< Cache-Control: public, max-age=0
< Content-Type: text/html; charset=UTF-8
< Content-Length: 0
<
* Connection #0 to host 127.0.0.1 left intact
Tried leaving username and password as NULL in the dockerfile so I can use http.
curl -vvv --insecure http://127.0.0.1:3000
* Rebuilt URL to: http://127.0.0.1:3000/
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 3000 (#0)
> GET / HTTP/1.1
> Host: 127.0.0.1:3000
> User-Agent: curl/7.47.0
> Accept: */*
>
* Empty reply from server
* Connection #0 to host 127.0.0.1 left intact
curl: (52) Empty reply from server
Here's the output of docker logs -f Ksh. A lot of stuff coming from the server but no complaints about the client
07:30:26.624423 GW COINBASE WS Streaming book levels.
│ 07:30:37.450531 UI authorization attempt from 172.17.0.1.
│ 07:30:40.820853 UI authorization success from 172.17.0.1.
│ 07:30:55.271231 PG TBP: 51% = 3.72220343 ETH, pDiv: 12% = 0.90000000 ETH.
│ 07:31:28.956372 UI authorization success from 172.17.0.1.
│ 07:31:40.718681 UI authorization success from 172.17.0.1.
│ 07:31:57.709233 PG TBP: 51% = 3.74935252 ETH, pDiv: 12% = 0.90000000 ETH.
│ 07:32:58.586846 PG TBP: 51% = 3.77513077 ETH, pDiv: 12% = 0.90000000 ETH.
│ 07:34:00.639148 PG TBP: 52% = 3.79959502 ETH, pDiv: 12% = 0.90000000 ETH.
Docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c8bb24d6d21b ksh "./K.sh" About a minute ago Up About a minute 0.0.0.0:3000->3000/tcp, 5000/tcp Ksh
Thanks.
umf Content-Length: 0 is cruel; i never saw this but let me review the docker installation (is long time i dont do it)
many thanks for all the outputs'''''
Hello,
I have the same issue with a manual install (not using Docker).
starting the server with ./K.sh ==> logs OK but nothing is displayed when reaching https://127.0.0.1:3000 on browser (tested with Chrome, Firefox, Opera on Android O device).
curl confirms an blank http response with status 200:
[root@localhost K]# curl -vvvk https://127.0.0.1:3000 * About to connect() to 127.0.0.1 port 3000 (#0) * Trying 127.0.0.1... * Connected to 127.0.0.1 (127.0.0.1) port 3000 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * skipping SSL peer certificate verification * SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 * Server certificate: * subject: O=Internet Widgits Pty Ltd,ST=Some-State,C=AU * start date: Dec 22 21:03:25 2016 GMT * expire date: Dec 22 21:03:25 2017 GMT * common name: (nil) * issuer: O=Internet Widgits Pty Ltd,ST=Some-State,C=AU > GET / HTTP/1.1 > User-Agent: curl/7.29.0 > Host: 127.0.0.1:3000 > Accept: / > < HTTP/1.1 200 OK < Connection: keep-alive < Accept-Ranges: bytes < Vary: Accept-Encoding < Cache-Control: public, max-age=0 < Content-Type: text/html; charset=UTF-8 < Content-Length: 0 < * Connection #0 to host 127.0.0.1 left intact
Any clue why this could be happening?
@amasu can you share your $ uname -a? thanks''
also i never used the bot under root user, not sure if it even works from root
under manual installation i never saw this, i will try to look at Docker first and see if i can understand something useful :dancer:
I have the same problem.
Docker version 17.09.1-ce (OSX)
uname-a output:
Linux 8b4d08b76e76 4.9.49-moby #1 SMP Fri Dec 8 13:40:02 UTC 2017 x86_64 GNU/Linux
Troubleshooting done so far without any success:
Changed the Docker file node:9-stretch and building it
tcpdump from container. After the initial login, nothing gets sent.
Upgraded npm angular packages
Added a kbot user to Dockerfile so that K would be installed under that user, but it fails when it tries to copy x86_64-linux-gnu-g++ files.
Got the docker image working, when changing the base image to phusion/baseimage
So change the Dockerfile beginning to (this should be included before the "RUN git clone -b" command):
FROM phusion/baseimage
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
git \
sudo \
make \
automake \
gcc \
build-essential \
g++ \
cpp \
libc6-dev \
man-db \
autoconf \
pkg-config \
wget \
python-dev \
nodejs
..and the Dockerfile continues with:
RUN git clone -b master https://github.com/ctubio/Krypto-trading-bot.git K and so on..
I had the same issue on a non-docker install on a custom CentOS VPS image (3.10.0-693.11.6.el7.x86_64 ... x86_64 x86_64 x86_64 GNU/Linux). Everything worked except I got a blank 200 response when loading the client.
I tracked the issue down to the lack of xxd on the system resulting in, I think, a bad symlink to the client directory (see image). Installing vim-common added xxd (yum install vim-common -y), then running make install made the client work as normal.

Thanks @h2rrisson , your workaround worked for me. I only had to make a slight change of moving the curl to below apt-get install.
I removed some packages from initial apt-get, since they get installed after the git clone.
Working Dockerfile looks like this:
FROM phusion/baseimage
RUN apt-get update && apt-get install -y sudo
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
RUN apt-get install -y --no-install-recommends \
git \
make \
nodejs
# Feel free to choose the branch you want to build:
RUN git clone -b master https://github.com/ctubio/Krypto-trading-bot.git K
WORKDIR K
# Remove the ssl certificate (GUI accessible over plain HTTP, not recommended):
#RUN rm -rf etc/sslcert/server.*
RUN make docker
EXPOSE 3000 5000
# See examples and descriptions of the
# following variables at etc/K.sh.dist.
ENV OPTIONAL_ARGUMENTS --colors
ENV UI_USERNAME NULL
ENV UI_PASSWORD NULL
ENV UI_OPENPORT 3000
ENV API_EXCHANGE NULL
ENV API_CURRENCY BTC/USD
ENV API_KEY NULL
ENV API_SECRET NULL
ENV API_PASSPHRASE NULL
ENV API_USERNAME NULL
ENV API_HTTP_ENDPOINT NULL
ENV API_WSS_ENDPOINT NULL
CMD ["./K.sh"]
from here works fine as-is currently so ima not update the Dockerfile, just will add the --naked argument cos in Kitematic ncurses looks horrible :S
many thanks for the fixes, maybe if someday endups failing here will make use of it :D
I guys, thank you!! It helped me as well.
I had "content length 0". Now I have "< Content-Length: 756", but still blank page :'(
That is the only error I see : this._allKeys = new Map --> undefined variable: Map
any ideas please? :'(
thank you
lets try to merge this since seems the current Dockerfile is useless for many ppl
the error about this._allKeys is an error in the js of the web browser? if so what web browser are you using?
Looks like it is indeed browser related
Safari --> KO
Opera --> KO
Firefox --> KO
Chrome (v63) --> OK
:-)
@h2rrisson did I read this correctly that you got K working on OSX with docker?! I'm asking because I tried with the manual installation and could not get it working on OSX, but haven't tried docket yet.
since last commit K runs natively on OSX; no need docker
closing cos im not able yet to reproduce this; someone on irc suggested to disable any antivirus cos there is a XMR miner that may be blocked and end up in a blank screen
about the browsers many thanks for the report'¡ soOn will rebuild the frontend :dancer:
Most helpful comment
Thanks @h2rrisson , your workaround worked for me. I only had to make a slight change of moving the curl to below apt-get install.