Discussion:
VNC refused connection
(too old to reply)
RobH
2019-11-20 16:09:41 UTC
Permalink
I have been following this project:

https://www.makeuseof.com/tag/build-a-motion-capture-security-system-using-a-raspberry-pi/

and when I enter the pi's ip address: 192.168.0.19:8080 into a web
browser, I get connection refused.
It is the same even on the raspberry pi, it refused to connect.

I've also tried using VNC Viewer with the ip address, and still get
connection refused.

It looks like it obviously something on the raspberry pi, but I don't
know what.

Any ideas?
Andy Burns
2019-11-20 16:21:09 UTC
Permalink
when I enter the pi's ip address: 192.168.0.19:8080 into a web browser,
I get connection refused
is the pi listening?

netstat -pant | grep :8080
RobH
2019-11-20 16:41:00 UTC
Permalink
Post by Andy Burns
Post by RobH
when I enter the pi's ip address: 192.168.0.19:8080 into a web
browser, I get connection refused
is the pi listening?
netstat -pant | grep :8080
***@raspberrypi:/ $ netstat -pant | grep :8080
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:8080 0.0.0.0:*
LISTEN -
***@raspberrypi:/ $ sudo netstat -pant | grep :8080
tcp 0 0 127.0.0.1:8080 0.0.0.0:*
LISTEN 452/motion
***@raspberrypi:/ $

Putting 127.0.0.1 into a web browser on the pi shows a kind of picture
from the Microsoft Livecam HD 3000, but you can't make anything out.

Still refused connection in VNC Viewer

Also, according to the project write up, I was under the impression that
captured pictures would be saved in the /media folder, but none are so far.
Roger Bell_West
2019-11-20 16:49:53 UTC
Permalink
Post by RobH
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:8080 0.0.0.0:*
LISTEN -
The daemon is only listening on localhost. You'll need to configure it
to listen on more interfaces. How you do this is determined by the
configuration of the specific daemon you're running.

R
Andy Burns
2019-11-20 17:47:08 UTC
Permalink
Post by Roger Bell_West
The daemon is only listening on localhost. You'll need to configure it
to listen on more interfaces. How you do this is determined by the
configuration of the specific daemon you're running.
The magic line, from the makeuseof URL, would seem to be

set "webcam_localhost off"

Rob, did you enter that in /etc/motion/motion.conf ?
RobH
2019-11-20 18:35:18 UTC
Permalink
Post by Andy Burns
Post by Roger Bell_West
The daemon is only listening on localhost. You'll need to configure it
to listen on more interfaces. How you do this is determined by the
configuration of the specific daemon you're running.
The magic line, from the makeuseof URL, would seem to be
    set "webcam_localhost off"
Rob, did you enter that in /etc/motion/motion.conf ?
No I din't actaully, I must have missed that.

But thanks
Andy Burns
2019-11-20 16:56:38 UTC
Permalink
Post by Andy Burns
is the pi listening?
tcp        0      0 127.0.0.1:8080          0.0.0.0:* LISTEN
OK, so it's only listening locally, you need to configure the motion
software to either listen on all interfaces, or just the NIC with
192.168.0.19 address
RobH
2019-11-20 17:02:53 UTC
Permalink
Post by Andy Burns
Post by Andy Burns
is the pi listening?
tcp        0      0 127.0.0.1:8080          0.0.0.0:* LISTEN
OK, so it's only listening locally, you need to configure the motion
software to either listen on all interfaces, or just the NIC with
192.168.0.19 address
Putting the ip address into VNC viewer with 8080, just returns
connection refused.

Given that the picture is rubbish, I'll go for some other project.
I just wanted to try it to see how it works, but not to my satisfaction.

Thanks
Andy Burns
2019-11-20 17:30:25 UTC
Permalink
Post by RobH
Putting the ip address into VNC viewer
VNC viewer running *on* the pi? or somewhere else?
Post by RobH
with 8080, just returns connection refused.
assuming the former, try using localhost:8080, instead of 192.168.0.19:8080

that said, port 8080 is an unusual number to be running something that
expects to speak vnc/rfb, sounds more like a non-standard http port, and
you should be pointing a web browser on the pi to localhost:8080
The Natural Philosopher
2019-11-21 08:32:43 UTC
Permalink
Post by Andy Burns
Post by RobH
Putting the ip address into VNC viewer
VNC viewer running *on* the pi? or somewhere else?
Post by RobH
with 8080, just returns connection refused.
assuming the former, try using localhost:8080, instead of 192.168.0.19:8080
that said, port 8080 is an unusual number to be running something that
expects to speak vnc/rfb, sounds more like a non-standard http port, and
you should be pointing a web browser on the pi to localhost:8080
8080 is default proxy web server port
--
In todays liberal progressive conflict-free education system, everyone
gets full Marx.
Andy Burns
2019-11-21 10:09:51 UTC
Permalink
Post by The Natural Philosopher
Post by Andy Burns
that said, port 8080 is an unusual number to be running something that
expects to speak vnc/rfb, sounds more like a non-standard http port,
and you should be pointing a web browser on the pi to localhost:8080
8080 is default proxy web server port
Only unofficially, it tends to also get used by anything else wanting to
using http where port 80 is already in use.
Eli the Bearded
2019-11-21 21:56:43 UTC
Permalink
Post by Andy Burns
Post by The Natural Philosopher
Post by Andy Burns
that said, port 8080 is an unusual number to be running something that
expects to speak vnc/rfb, sounds more like a non-standard http port,
and you should be pointing a web browser on the pi to localhost:8080
8080 is default proxy web server port
Only unofficially, it tends to also get used by anything else wanting to
using http where port 80 is already in use.
I use 8000 (http) or 8443 (https) myself. Andy's point I think is that
vnc is usually on port 5900 (or 5900 + N for the (N-1)th instance), so
are you (OP) really sure it is supposed to be vnc traffic?

Elijah
------
see N > 0 cases regularly at $WORK
Martin Gregorie
2019-11-22 00:12:30 UTC
Permalink
Post by Eli the Bearded
Post by Andy Burns
Post by The Natural Philosopher
Post by Andy Burns
that said, port 8080 is an unusual number to be running something
that expects to speak vnc/rfb, sounds more like a non-standard http
port, and you should be pointing a web browser on the pi to
localhost:8080
8080 is default proxy web server port
Only unofficially, it tends to also get used by anything else wanting
to using http where port 80 is already in use.
I use 8000 (http) or 8443 (https) myself. Andy's point I think is that
vnc is usually on port 5900 (or 5900 + N for the (N-1)th instance), so
are you (OP) really sure it is supposed to be vnc traffic?
In case you haven't heard about it, most Linux distros, including
Raspbian, have a copy of the file /etc/service

This is a plaintext ASCII file that lists all the well-defined network
services and the ports they are expected to use.
--
Martin | martin at
Gregorie | gregorie dot org
The Natural Philosopher
2019-11-22 03:49:42 UTC
Permalink
Post by Martin Gregorie
Post by Eli the Bearded
Post by Andy Burns
Post by The Natural Philosopher
Post by Andy Burns
that said, port 8080 is an unusual number to be running something
that expects to speak vnc/rfb, sounds more like a non-standard http
port, and you should be pointing a web browser on the pi to
localhost:8080
8080 is default proxy web server port
Only unofficially, it tends to also get used by anything else wanting
to using http where port 80 is already in use.
I use 8000 (http) or 8443 (https) myself. Andy's point I think is that
vnc is usually on port 5900 (or 5900 + N for the (N-1)th instance), so
are you (OP) really sure it is supposed to be vnc traffic?
In case you haven't heard about it, most Linux distros, including
Raspbian, have a copy of the file /etc/service
/etc/service*s*
Post by Martin Gregorie
This is a plaintext ASCII file that lists all the well-defined network
services and the ports they are expected to use.
And 8080 is alt http or http caching
--
The theory of Communism may be summed up in one sentence: Abolish all
private property.

Karl Marx
Eli the Bearded
2019-11-23 21:56:04 UTC
Permalink
Post by Martin Gregorie
Post by Eli the Bearded
I use 8000 (http) or 8443 (https) myself. Andy's point I think is that
vnc is usually on port 5900 (or 5900 + N for the (N-1)th instance), so
are you (OP) really sure it is supposed to be vnc traffic?
In case you haven't heard about it, most Linux distros, including
Raspbian, have a copy of the file /etc/service
/etc/services is not a Linux thing, it's a Unix thing. I recall editing
it for adding "well known" service names for the in-house software back
when I was working with Solaris desktop computers.
Post by Martin Gregorie
This is a plaintext ASCII file that lists all the well-defined network
services and the ports they are expected to use.
That said, 8080 is convention, not law. My current /etc/services is
system stock and does not have 8443, but you can find lots of people
using it if you search. And my ISP offers Privoxy as a service. It's a
privacy oriented HTTP proxy. They run it on ports 8008 and 8118, in
two configurations (8118 blocks more stuff).

Make TCP you friend and you will understand when to use the well-known
ports, when to use your own ports, and a good feel for why to use one
or the other.

Elijah
------
finds only three "http" ports in /etc/services but many more in reality
Martin Gregorie
2019-11-23 23:05:33 UTC
Permalink
Post by Eli the Bearded
/etc/services is not a Linux thing, it's a Unix thing. I recall editing
it for adding "well known" service names for the in-house software back
when I was working with Solaris desktop computers.
Of course. I only omitted mentioning that because we're not talking about
and of the other Unices.

====
As for documentation, I still think that, old is it is, there's little
better than "Unix System Programming for SVR4" if you're serious about
writing programs for Unix and its modern descendents.

And add a copy of "Linux/Unix in a Nutshell" to get you up to speed on
general system organisation and use.
--
Martin | martin at
Gregorie | gregorie dot org
druck
2019-11-20 20:36:14 UTC
Permalink
Post by RobH
Putting the ip address into VNC viewer with 8080, just returns
connection refused.
VNC servers normally work on port 5900+

---druck
Tauno Voipio
2019-11-20 17:41:41 UTC
Permalink
Post by RobH
https://www.makeuseof.com/tag/build-a-motion-capture-security-system-using-a-raspberry-pi/
and when I enter the pi's ip address: 192.168.0.19:8080 into a web
browser, I get connection refused.
It is the same even on the raspberry pi, it refused to connect.
I've also tried using VNC Viewer with the ip address, and still get
connection refused.
It looks like it obviously something on the raspberry pi, but I don't
know what.
Any ideas?
Standard VNC runs on port 5900 (+ display number).
--
-TV
RobH
2019-11-20 17:53:37 UTC
Permalink
Post by Tauno Voipio
Post by RobH
https://www.makeuseof.com/tag/build-a-motion-capture-security-system-using-a-raspberry-pi/
and when I enter the pi's ip address: 192.168.0.19:8080 into a web
browser, I get connection refused.
It is the same even on the raspberry pi, it refused to connect.
I've also tried using VNC Viewer with the ip address, and still get
connection refused.
It looks like it obviously something on the raspberry pi, but I don't
know what.
Any ideas?
Standard VNC runs on port 5900 (+ display number).
Thanks but I have swapped out the sd card for another project now, and
as the webcam picture was rubbish , I am sending it back.
Continue reading on narkive:
Loading...