Compiling the LoRa App Server source-code


#42

Yeah it worked once that path was resolved. Thanks!


#43

I have successfully compiled source code and build is generated but when running this command to launch lora app server it is not working

sudo ./lora_app_server --postgres-dns “postgres://loraserver_as:dbpassword@localhost/loraserver_as?sslmode=disable” --jwt-secret XXXXXXXXX --http-tls-cert /etc/lora-app-server/certs/http.pem --http-tls-key /etc/lora-app-server/certs/http-key.pem --db-automigrate --http-bind 0.0.0.0:8080

Output
sudo: ./lora_app_server: command not found

Can any one please help me what i am doing wrong


#44

In another compilation with Docker i am facing postgres connectivity issue , it will be helpfull if can get help either of them

appserver_1 | time=“2018-09-08T07:37:26Z” level=error msg="ping database error, will retry in 2s: pq: Could not detect default username. Please provide one explicitly"


#45

Finally I was able to compile the source and this is the output

make requirements ui-requirements

echo “Installing development tools”
Installing development tools
go get -u github.com/golang/lint/golint
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
go get -u github.com/golang/protobuf/protoc-gen-go
go get -u github.com/elazarl/go-bindata-assetfs/
go get -u github.com/jteeuwen/go-bindata/
go get -u github.com/kisielk/errcheck
go get -u github.com/smartystreets/goconvey
go get -u golang.org/x/tools/cmd/stringer
go get -u github.com/golang/dep/cmd/dep
go get -u github.com/goreleaser/goreleaser
dep ensure -v
Installing UI requirements
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

up to date in 11.687s


make clean
Cleaning up workspace


make api
Generating API code from .proto files


make test

Generating combined Swagger JSON
Generating static files
Generating static files
Running tests
? github.com/brocaar/lora-app-server/cmd/lora-app-server [no test files]
? github.com/brocaar/lora-app-server/cmd/lora-app-server/cmd [no test files]
=== RUN TestAPI
time=“2018-09-13T12:28:33Z” level=error msg=“ping database error, will retry in 2s: pq: password authentication failed for user “root””
time=“2018-09-13T12:28:35Z” level=error msg=“ping database error, will retry in 2s: pq: password authentication failed for user “root””
^CFAIL github.com/brocaar/lora-app-server/internal/api 2.985s
Makefile:18: recipe for target ‘test’ failed
make: *** [test] Error 1


make build
Generating combined Swagger JSON
Generating static files
Generating static files
mkdir -p build
go build -ldflags “-s -w -X main.version=2.1.0-7-g0981ad9” -o build/lora-app-server cmd/lora-app-server/main.go

And when Opening in browser i see only this

Can any one let me know what can be the issue I am not able to understand
all other service is in running state !