Comments (13)
@irundaia I made a fix, do you want to try with the following files?
from armor.
@vishr, somehow, a step earlier in the setup process goes wrong, the stack trace below is logged. Also, when I manually run the curl command above, I still get the same error.
I'm running the server as:
sudo ~/Downloads/armor/armor-0.4.0-dev_darwin-64 -c config.json
The stacktrace:
echo: http: panic serving 89.99.198.124:62513: runtime error: invalid memory address or nil pointer dereference
goroutine 6 [running]:
net/http.(*conn).serve.func1(0xc4201ec280)
/usr/local/opt/go/libexec/src/net/http/server.go:1697 +0xd0
panic(0x15f7c40, 0x19fbc20)
/usr/local/opt/go/libexec/src/runtime/panic.go:491 +0x283
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP(0x0, 0x19c38c0, 0xc420218150, 0xc42018e300)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:560 +0x26
github.com/labstack/armor/http.Init.func2(0x19ce880, 0xc4202181c0, 0xc4201e2fc0, 0xc4200153c0)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/http/http.go:86 +0xe9
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).Add.func1(0x19ce880, 0xc4202181c0, 0x3, 0xc4200153c4)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:479 +0x87
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP.func1(0x19ce880, 0xc4202181c0, 0x0, 0x0)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:576 +0x108
github.com/labstack/armor/http.Init.func1.1(0x19ce880, 0xc4202181c0, 0xc4201c8538, 0x169aba0)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/http/http.go:73 +0xea
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP(0xc4201c84e0, 0x19c3d40, 0xc420012380, 0xc42018e300)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:585 +0x28a
net/http.serverHandler.ServeHTTP(0xc420193450, 0x19c3d40, 0xc420012380, 0xc42018e300)
/usr/local/opt/go/libexec/src/net/http/server.go:2619 +0xb4
net/http.(*conn).serve(0xc4201ec280, 0x19c4780, 0xc420058780)
/usr/local/opt/go/libexec/src/net/http/server.go:1801 +0x71d
created by net/http.(*Server).Serve
/usr/local/opt/go/libexec/src/net/http/server.go:2720 +0x288
echo: http: panic serving 89.99.198.124:62514: runtime error: invalid memory address or nil pointer dereference
goroutine 8 [running]:
net/http.(*conn).serve.func1(0xc4201ec320)
/usr/local/opt/go/libexec/src/net/http/server.go:1697 +0xd0
panic(0x15f7c40, 0x19fbc20)
/usr/local/opt/go/libexec/src/runtime/panic.go:491 +0x283
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP(0x0, 0x19c38c0, 0xc420218150, 0xc42018e400)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:560 +0x26
github.com/labstack/armor/http.Init.func2(0x19ce880, 0xc4202181c0, 0xc4201e2fc0, 0xc4200156a0)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/http/http.go:86 +0xe9
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).Add.func1(0x19ce880, 0xc4202181c0, 0x3, 0xc4200156a4)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:479 +0x87
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP.func1(0x19ce880, 0xc4202181c0, 0x0, 0x0)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:576 +0x108
github.com/labstack/armor/http.Init.func1.1(0x19ce880, 0xc4202181c0, 0xc4201c8538, 0x169aba0)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/http/http.go:73 +0xea
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP(0xc4201c84e0, 0x19c3d40, 0xc420012460, 0xc42018e400)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:585 +0x28a
net/http.serverHandler.ServeHTTP(0xc420193450, 0x19c3d40, 0xc420012460, 0xc42018e400)
/usr/local/opt/go/libexec/src/net/http/server.go:2619 +0xb4
net/http.(*conn).serve(0xc4201ec320, 0x19c4780, 0xc4200588c0)
/usr/local/opt/go/libexec/src/net/http/server.go:1801 +0x71d
created by net/http.(*Server).Serve
/usr/local/opt/go/libexec/src/net/http/server.go:2720 +0x288
echo: http: panic serving 89.99.198.124:62515: runtime error: invalid memory address or nil pointer dereference
goroutine 10 [running]:
net/http.(*conn).serve.func1(0xc4201ec3c0)
/usr/local/opt/go/libexec/src/net/http/server.go:1697 +0xd0
panic(0x15f7c40, 0x19fbc20)
/usr/local/opt/go/libexec/src/runtime/panic.go:491 +0x283
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP(0x0, 0x19c38c0, 0xc420218150, 0xc42018e500)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:560 +0x26
github.com/labstack/armor/http.Init.func2(0x19ce880, 0xc4202181c0, 0x0, 0xc42003efd0)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/http/http.go:86 +0xe9
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).Add.func1(0x19ce880, 0xc4202181c0, 0x3, 0xc42001b154)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:479 +0x87
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP.func1(0x19ce880, 0xc4202181c0, 0x0, 0x0)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:576 +0x108
github.com/labstack/armor/http.Init.func1.1(0x19ce880, 0xc4202181c0, 0xc4201c8538, 0x169aba0)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/http/http.go:73 +0xea
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP(0xc4201c84e0, 0x19c3d40, 0xc420012540, 0xc42018e500)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:585 +0x28a
net/http.serverHandler.ServeHTTP(0xc420193450, 0x19c3d40, 0xc420012540, 0xc42018e500)
/usr/local/opt/go/libexec/src/net/http/server.go:2619 +0xb4
net/http.(*conn).serve(0xc4201ec3c0, 0x19c4780, 0xc420058a40)
/usr/local/opt/go/libexec/src/net/http/server.go:1801 +0x71d
created by net/http.(*Server).Serve
/usr/local/opt/go/libexec/src/net/http/server.go:2720 +0x288
echo: http: panic serving 89.99.198.124:62516: runtime error: invalid memory address or nil pointer dereference
goroutine 12 [running]:
net/http.(*conn).serve.func1(0xc4201ec460)
/usr/local/opt/go/libexec/src/net/http/server.go:1697 +0xd0
panic(0x15f7c40, 0x19fbc20)
/usr/local/opt/go/libexec/src/runtime/panic.go:491 +0x283
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP(0x0, 0x19c38c0, 0xc420218150, 0xc42018e600)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:560 +0x26
github.com/labstack/armor/http.Init.func2(0x19ce880, 0xc4202181c0, 0xc4201e2fc0, 0xc420015c00)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/http/http.go:86 +0xe9
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).Add.func1(0x19ce880, 0xc4202181c0, 0x3, 0xc420015c04)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:479 +0x87
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP.func1(0x19ce880, 0xc4202181c0, 0x0, 0x0)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:576 +0x108
github.com/labstack/armor/http.Init.func1.1(0x19ce880, 0xc4202181c0, 0xc4201c8538, 0x169aba0)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/http/http.go:73 +0xea
github.com/labstack/armor/vendor/github.com/labstack/echo.(*Echo).ServeHTTP(0xc4201c84e0, 0x19c3d40, 0xc420012620, 0xc42018e600)
/Users/vishrana/Projects/go/src/github.com/labstack/armor/vendor/github.com/labstack/echo/echo.go:585 +0x28a
net/http.serverHandler.ServeHTTP(0xc420193450, 0x19c3d40, 0xc420012620, 0xc42018e600)
/usr/local/opt/go/libexec/src/net/http/server.go:2619 +0xb4
net/http.(*conn).serve(0xc4201ec460, 0x19c4780, 0xc420058bc0)
/usr/local/opt/go/libexec/src/net/http/server.go:1801 +0x71d
created by net/http.(*Server).Serve
/usr/local/opt/go/libexec/src/net/http/server.go:2720 +0x288
from armor.
We use yaml
for config in the recent versions, try with that - the schema remains the same.
from armor.
I've converted the json
to yaml
, the results stay the same
from armor.
Can you provide trim down version of your config to reproduce the issue?
from armor.
I think this is the relevant part of the config.yaml
:
hosts:
cloud.<host>:
plugins:
- name: proxy
targets:
- name: cloud
url: "http://localhost:9090"
from armor.
I am able to run with the following config
address: ":80"
plugins:
- name: https-redirect
hosts:
cloud.<host>:
plugins:
- name: proxy
targets:
- name: cloud
url: http://localhost:9090
build.<host>:
plugins:
- name: proxy
targets:
- name: build
url: http://localhost:9000
Are you getting exception while starting the server?
from armor.
@irundaia I need some more time to work on it.
from armor.
@irundaia can you try this binary?
from armor.
@vishr, with this binary, something goes wrong with parsing the config. On startup it crashes with the following stacktrace:
$ sudo ~/Downloads/armor/armor-0.4.0-dev-darwin-10.8-amd64 -c config.yaml
panic: json: unsupported type: map[interface {}]interface {}
goroutine 1 [running]:
github.com/labstack/armor/plugin.RawPlugin.Bytes(0xc420184e10, 0xc420184e10, 0x47d7de4, 0x4)
/go/src/github.com/labstack/armor/plugin/plugin.go:119 +0x82
main.savePlugins(0xc4201aec30)
/go/src/github.com/labstack/armor/cmd/armor/main.go:69 +0x418
main.main()
/go/src/github.com/labstack/armor/cmd/armor/main.go:207 +0x3e3
This is my whole config:
address: ":80"
tls:
address: ":443"
cert_file: signed.crt
key_file: domain.key
auto: true
hosts:
cloud.<host>:
plugins:
- name: proxy
targets:
- name: cloud
url: "http://localhost:9090"
from armor.
Can you try to use the latest release and see the result?
from armor.
@vishr, the last release fixed all of my issues! Thanks a bunch!
from armor.
👍
from armor.
Related Issues (20)
- Embed serf
- Add password for admin
- Is there a way to use it with appengine?
- Store / Postgres doc HOT 7
- Support for backend in proxy plugin
- User management
- Display localhost, intranet & internet IP with the banner
- Fastcgi support in proxy plugin
- Support multiple arguments HOT 1
- Status of this project HOT 1
- PHP support via FastCGI or in some other way
- Create Packages for Linux Distributions HOT 1
- Configuration not reliable HOT 20
- Account creation on ACMEv1 is disabled
- Host blocks don't appear to work?
- some problem about gzip writer not use sync pool in `middleware/compress.go`
- Is it possible to enable auto TLS without 443 (maybe HTTP-01 Challenge ?)
- Trying to get in touch regarding a security issue
- @irundaia I made a fix, do you want to try with the following files?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from armor.