Closed mstormi closed 3 years ago
What is hostname:port ?
Can you just use localIP:port
?
What is hostname:port ?
a local DNS (resolvable) or IP, I tried both. Port is 8005 (where server is started on). Below is the log of a fresh start, at 00:35:20 I've started learning on the app, that made it crash. Now that I was able to reproduce it I believe it was because of file access rights to the DB files in data/*. Deleted those and started again as root, now it's no longer crashing.
So much for that one, BUT... ... now it's running but does not generating any DB data. I see HTTP requests going only when I start/restart learning via app, there's no data files to appear in data/*
[00:35:07] openhabian@devpi:~/go/src/github.com/schollz/find3/server/main$ ./main -debug -port 8005 2020-07-16 00:35:11 [DEBUG] [PID-14652] mode.go Run:61 current families: [diestorms] 2020-07-16 00:35:11 [INFO] [PID-14652] server.go Run:579 Running on 0.0.0.0:8005 2020-07-16 00:35:20 [INFO] [PID-14652] server.go func1:1360 192.168.178.43:56608 GET /ws?family=diestorms&device=myprism 504.071µs 2020-07-16 00:35:20 [DEBUG] [PID-14652] db.go getRows:1055 getting columns 2020-07-16 00:35:20 [DEBUG] [PID-14652] db.go getRows:1062 getting sensorstringsizer 2020-07-16 00:35:20 [DEBUG] [PID-14652] db.go getRows:1079 getting locations 2020-07-16 00:35:20 [DEBUG] [PID-14652] db.go getRows:1085 got locations panic: interface conversion: interface {} is string, not []uint8
goroutine 51 [running]: github.com/schollz/find3/server/main/src/database.(Database).getRows(0x2036020, 0x2518370, 0x2518370, 0x1, 0x2518370, 0x0, 0x0) /home/openhabian/go/src/github.com/schollz/find3/server/main/src/database/db.go:1097 +0xbcc github.com/schollz/find3/server/main/src/database.(Database).GetAllFromPreparedQuery(0x2036020, 0x769b90, 0x46, 0x1c41e6c, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, ...) /home/openhabian/go/src/github.com/schollz/find3/server/main/src/database/db.go:1044 +0x10c github.com/schollz/find3/server/main/src/database.(*Database).GetLatest(0x2036020, 0x24fcec0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /home/openhabian/go/src/github.com/schollz/find3/server/main/src/database/db.go:641 +0xcc github.com/schollz/find3/server/main/src/server.sendOutLocation(0x24fceaf, 0x9, 0x24fcec0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /home/openhabian/go/src/github.com/schollz/find3/server/main/src/server/server.go:870 +0x98 created by github.com/schollz/find3/server/main/src/server.wshandler /home/openhabian/go/src/github.com/schollz/find3/server/main/src/server/websockets.go:66 +0x318
fixed after reinstall although cannot tell for sure what it was
I tried to setup an own server on Raspbian (no Docker desired) but came across a number of difficulties. The installation instruction are pretty sparse. They neither explain the alternatives (make production ?) nor show how to use them.
1) scipy needs to be a recent version. I've created PR #201 to fix
[ I think I now know it has to see a specific number of measurements 2) Starting in $GOPATH/src/github.com/schollz/find3/server/main, the main server sometimes creates a xxxxxx.sqlite3.db file in data/, but not always ... I only saw it with GPS on and enough samples, but I have not found out what's really needed to make it create it. ]
3) I used http://hostname:port/ in the app (note the trailing slash) from my mobile to be in the same (WiFi) LAN and no proxy inbetween for my testing. The request shows up as
Note the two leading slashes. I think does not work - when I insert a NGINX into the path I can see that find is responding with a 404.
When I remove the trailing slash however, main crashes, giving
4) I cannot access the dashboard. Accessing the web interface via proxy or direct results in a download file that is empty, plus the server giving an error about interface conversion (attached below). Seems find3 might be having trouble to convert DNS names or IP addresses ?