Hi Federico.
This is my actual configuration
root@IspBDC2:~# uci show openwisp
openwisp.http=controller
openwisp.http.url='https://192.168.2.217'
openwisp.http.verify_ssl='0'
openwisp.http.shared_secret='NuevaPass'
openwisp.http.mac_interface='eth1'
openwisp.http.merge_config='1'
openwisp.http.unmanaged='system.@led' 'network.loopback' 'network.@switch'
'network.@switch_vlan'
The version of OpenWISP is
root@IspBDC2:~# openwisp_config --version
openwisp-config 0.4.6a
And complete syslog after reboot is:
root@IspBDC2:~# logread | grep openwisp
Mon Mar 13 15:20:45 2017 user.emerg syslog: openwisp: OpenWISP config agent
started
Mon Mar 13 15:20:45 2017 daemon.info openwisp: OpenWISP config agent started
Mon Mar 13 15:20:45 2017 daemon.info openwisp: Registering device...
Mon Mar 13 15:20:45 2017 daemon.err openwisp: Failed to connect to
controller during registration: curl exit code 7
Mon Mar 13 15:21:15 2017 daemon.info openwisp: Registering device...
Mon Mar 13 15:21:26 2017 daemon.err openwisp: Registration failed!
Mon Mar 13 15:21:31 2017 daemon.info openwisp: Registering device...
Mon Mar 13 15:21:31 2017 daemon.err openwisp: Registration failed!
Mon Mar 13 15:21:36 2017 daemon.info openwisp: Registering device...
Mon Mar 13 15:21:36 2017 daemon.err openwisp: Registration failed!
Mon Mar 13 15:21:41 2017 daemon.info openwisp: Registering device...
Mon Mar 13 15:21:42 2017 daemon.err openwisp: Registration failed!
Mon Mar 13 15:21:47 2017 daemon.info openwisp: Registering device...
Mon Mar 13 15:21:47 2017 daemon.err openwisp: Registration failed!
Mon Mar 13 15:21:52 2017 daemon.info openwisp: Registering device...
Mon Mar 13 15:21:52 2017 daemon.err openwisp: Registration failed!
Mon Mar 13 15:21:52 2017 daemon.info procd: Instance
openwisp_config::instance1 s in a crash loop 6 crashes, 0 seconds since
last crash
At the start, seems it can't connect with the controller (curl exit code 7)
but by itself try to reconnect and it's when the register fail.
Controller logs show this messages:
==> /opt/openwisp2/log/uwsgi.log <==
[pid: 743|app: 0|req: 5/11] 192.168.2.184 () {38 vars in 538 bytes} [Mon
Mar 13 14:09:33 2017] POST /controller/register/ => generated 168 bytes in
66 msecs (HTTP/1.1 400) 3 headers in 112 bytes (1 switches on core 0)
[pid: 742|app: 0|req: 7/12] 192.168.2.184 () {38 vars in 538 bytes} [Mon
Mar 13 14:09:39 2017] POST /controller/register/ => generated 168 bytes in
56 msecs (HTTP/1.1 400) 3 headers in 112 bytes (1 switches on core 0)
[pid: 742|app: 0|req: 8/13] 192.168.2.184 () {38 vars in 538 bytes} [Mon
Mar 13 14:09:44 2017] POST /controller/register/ => generated 168 bytes in
61 msecs (HTTP/1.1 400) 3 headers in 112 bytes (1 switches on core 1)
[pid: 742|app: 0|req: 9/14] 192.168.2.184 () {38 vars in 538 bytes} [Mon
Mar 13 14:09:49 2017] POST /controller/register/ => generated 168 bytes in
67 msecs (HTTP/1.1 400) 3 headers in 112 bytes (1 switches on core 0)
[pid: 742|app: 0|req: 10/15] 192.168.2.184 () {38 vars in 538 bytes} [Mon
Mar 13 14:09:54 2017] POST /controller/register/ => generated 168 bytes in
57 msecs (HTTP/1.1 400) 3 headers in 112 bytes (1 switches on core 1)
[pid: 742|app: 0|req: 11/16] 192.168.2.184 () {38 vars in 538 bytes} [Mon
Mar 13 14:09:59 2017] POST /controller/register/ => generated 168 bytes in
59 msecs (HTTP/1.1 400) 3 headers in 112 bytes (1 switches on core 0)
==> /opt/openwisp2/log/nginx.access.log <==
192.168.2.184 - - [13/Mar/2017:15:09:34 +0100] "POST /controller/register/
HTTP/1.1" 400 179 "-" "curl/7.40.0"
192.168.2.184 - - [13/Mar/2017:15:09:39 +0100] "POST /controller/register/
HTTP/1.1" 400 179 "-" "curl/7.40.0"
192.168.2.184 - - [13/Mar/2017:15:09:44 +0100] "POST /controller/register/
HTTP/1.1" 400 179 "-" "curl/7.40.0"
192.168.2.184 - - [13/Mar/2017:15:09:49 +0100] "POST /controller/register/
HTTP/1.1" 400 179 "-" "curl/7.40.0"
192.168.2.184 - - [13/Mar/2017:15:09:54 +0100] "POST /controller/register/
HTTP/1.1" 400 179 "-" "curl/7.40.0"
192.168.2.184 - - [13/Mar/2017:15:09:59 +0100] "POST /controller/register/
HTTP/1.1" 400 179 "-" "curl/7.40.0"
Thanks for all. I'll continue testing.
Fernando.
El domingo, 12 de marzo de 2017, 14:45:48 (UTC+1), Fernando Pizarro
escribió:
>
> Hi all.
>
> Recently, I installed OpenWISP2 controller following the Github tutorial¹
> on Debian Jessie (8.7). This is my hosts file:
> [openwisp2]
> 192.168.2.217
>
> And this is my playbook file
> - hosts: openwisp2
> roles:
> - openwisp.openwisp2
> vars:
> openwisp2_shared_secret: NuevaPass
>
> I created a simple template with the timezone and a device configuration
> associated to the template but I can't register the device using the shared
> secret or the UUID/Keys configuration options.
>
> I'm using OpenWRT (15.05) with openwisp-config-nossl (0.4.6a/latest²)
> without susscess. My configration file using shared secret is:
> config controller 'http'
> option url '192.168.2.217'
> option verify_ssl '0'
> option shared_secret 'NuevaPass'
> option uuid ''
> option key ''
> list unmanaged 'system.@led'
> list unmanaged 'network.loopback'
> list unmanaged 'network.@switch'
> list unmanaged 'network.@switch_vlan'
>
> And using UUID/Key options:
> config controller 'http'
> option url '192.168.2.217'
> option verify_ssl '0'
> option uuid '11af3cd7eb0345e3b1b49836c11f4dc1'
> option key '2E1KNRWA4glgm7LnbwyIlLlVQlQQW1GQ'
> list unmanaged 'system.@led'
> list unmanaged 'network.loopback'
> list unmanaged 'network.@switch'
> list unmanaged 'network.@switch_vlan'
>
> Using the shared secret option, the logs of the controller is:
> [...] "POST /controller/register/ HTTP/1.1" 301 184 "-" "curl/7.40.0"
>
> In OpenWRT:
> [...] daemon.info openwisp: Registering device...
> [...] daemon.err openwisp: Invalid url: missing X-Openwisp-Controller
> header
> [...] daemon.info procd: Instance openwisp_config::instance1 s in a crash
> loop 6 crashes, 0 seconds since last crash
>
> Using the UUID/Key options, logs in the controller:
> [...] "GET
> /controller/checksum/11af3cd7eb0345e3b1b49836c11f4dc1/?key=2E1KNRWA4glgm7LnbwyIlLlVQlQQW1GQ
>
> HTTP/1.1" 301 184 "-" "curl/7.40.0"
>
> And in OpenWRT:
> [...] daemon.err openwisp: Failed to retrieve checksum: HTTP/1.1 301 Moved
> Permanently
>
> What I'm doing wrong? I searched the log messages and I found this thread³
> with the same behaviour but it doesn't comment how to solved it. Somebody
> can I help me with this problem?
>
> Thanks for all.
> Fernando.
>
> Links:
> 1 - https://github.com/openwisp/ansible-openwisp2
> 2 - http://downloads.openwisp.org/openwisp-config/latest/
> 3 -
> https://groups.google.com/forum/#!msg/openwisp/PXS1ltknNf4/jjOXa8wNAQAJ
>
--
You received this message because you are subscribed to the Google Groups
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.