Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web server not running on Docker Image #159

Open
G8YTZ opened this issue Aug 19, 2022 · 8 comments
Open

Web server not running on Docker Image #159

G8YTZ opened this issue Aug 19, 2022 · 8 comments

Comments

@G8YTZ
Copy link

G8YTZ commented Aug 19, 2022

Good afternoon!

I have installed galmon using the published Docker image (also with Portainer) on a Pi 4. The image runs, but I can’t see the galmon web interface. The Docker networking is ok and there is no port clash (the Docker install on a Pi4 is virgin). It looks like the web server is not running on the image. A port scan of the Pi 4 shows nothing on 10000, just 22 (SSH) and 9000 (Portainer).

I'm using the cheap Ali Express GPS Rx right now, I'll upgrade this later on. I have confirmed it is ok by running the code in the terminal window and observing the GPS data.

I used this command to import the image prior to receiving my server credentials for the project: docker run -it --rm --device=/dev/ttyACM0 -p 10000:10000 berthubert/galmon

I'd appreciate any suggestions, but it looks like an issue with the current galmon Docker image
Screenshot 2022-08-19 at 12 57 43
.

@kahara
Copy link

kahara commented Aug 19, 2022

I may be observing the same thing, nothing seems to be listening on that HTTP port. This is from the container:

# cat /proc/net/tcp
  sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode                                                     
   0: 0815010A:A648 ED445256:73A3 01 00000000:00000000 00:00000000 00000000     0        0 22723736 1 ffff57e1bc272300 24 4 30 2 7

My command line is:

ubxtool \
  --wait \
  --port /dev/ttyACM0 \
  --baud 9600 \
  --newbaud 115200 \
  --gps --galileo --glonass \
  --destination <server hostname> \
  --station <station ID> \
  --owner <callsign> \
  --remark <remark>

@kahara
Copy link

kahara commented Aug 19, 2022

Although now that I took a closer look at the instructions, it become apparent that running just the ubxtool isn't enough to get the web UI going. 🤦‍♂️

@G8YTZ
Copy link
Author

G8YTZ commented Aug 19, 2022

The s/w is certainly running in the container. Any idea how I get the Web UI working too?

Screenshot 2022-08-19 at 20 15 11

@kahara
Copy link

kahara commented Aug 23, 2022

Tried running navparse by adding | navparse --bind [::1]:10000 to the command, but couldn't get the web UI to load.

@kahara
Copy link

kahara commented Aug 23, 2022

Ach you gotta add --stdout flag to the ubxtool command.

Also using navparse --bind 127.0.0.1:10000 instead of navparse --bind [::1]:10000 obviously helps getting things going over IPv4.

So now I have this running (curly braces are Helm templates):

/bin/bash -c 'ubxtool --wait --port {{ .Values.galmon.device }} --baud 9600 --newbaud 115200 --gps --galileo --glonass --destination submit.galmon.eu --station {{ .Values.galmon.station }} --owner {{ .Values.galmon.owner }} --remark {{ .Values.galmon.remark }} --stdout | navparse --bind 127.0.0.1:10000'

This way I'm at least getting a response, but for some reason it's not still not working (the port is what gets forwarded to 10000 on the container):

$ curl -v http://localhost:40789/
*   Trying 127.0.0.1:40789...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 40789 (#0)
> GET / HTTP/1.1
> Host: localhost:40789
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 File Not Found
< Date: Tue, 23 Aug 2022 20:03:45 GMT
< Connection: keep-alive
< Content-Length: 9
< Server: h2o/2.2.5
< content-type: text/plain; charset=utf-8
< 
* Connection #0 to host localhost left intact
not found

@kahara
Copy link

kahara commented Aug 23, 2022

Looking at navparse.cc gives the clue that the --html parameter, pointing to where the static files live, needs to be added to the navparse command.

So now it's:

/bin/bash -c 'ubxtool --wait --port {{ .Values.galmon.device }} --baud 9600 --newbaud 115200 --gps --galileo --glonass --destination submit.galmon.eu --station {{ .Values.galmon.station }} --owner {{ .Values.galmon.owner }} --remark {{ .Values.galmon.remark }} --stdout | navparse --bind 127.0.0.1:10000 --html /galmon/share/package/galmon/html/'

This gives me the web UI:

$ curl -v http://localhost:33161/
*   Trying 127.0.0.1:33161...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 33161 (#0)
> GET / HTTP/1.1
> Host: localhost:33161
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Tue, 23 Aug 2022 20:24:16 GMT
< Connection: keep-alive
< Content-Length: 6086
< Server: h2o/2.2.5
< content-type: text/html
< last-modified: Sat, 13 Nov 2021 12:00:28 GMT
< etag: "618fa8dc-17c6"
< accept-ranges: bytes
< 
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>galmon.eu</title>
  <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
...

@G8YTZ
Copy link
Author

G8YTZ commented Aug 23, 2022

OK, I'm a bit lost here. I'm running galmon using the docker image, sure I can log on to the console and run

./ubxtool --wait --port /dev/ttyACM0 --station 1 --stdout --galileo | ./navdump and this works fine, I can see the messages on the console.

I've tried playing with your code, but nothing will run. my galmon network is 172.17.0.3/16 BTW (default)

@kahara
Copy link

kahara commented Aug 25, 2022

The command is navparse, not navdump, see https://github.com/berthubert/galmon#tooling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants