Page 1 of 2

Need some help configuring remote access for zmviewer

Posted: Thu Jun 10, 2010 1:27 pm
by vectorm12

I'm currently trying out Zone Minder ver. 1.24.2-1 using the svn version of ZMLarch LiveCD.

I've installed the system on my server and everything is running great locally. I can connect to the mysql DB locally without any issues and automatic probing of my Axis 207W works perfectly.

However I would also like to be able to connect to the server via zmviewer from another computer located in a different place which is where I've come to a stop.

Now I did see one post made by someone(just found the post and the user was "haus") talking about how he had managed to successfully configure the mySQL DB to listen to requests other than from

Unfortunately I cannot for the life of me relocate his post and I'm a little lost as how I'm supposed to make mySQL listen to exernal requests from zmviewer. I've looked through my "my.cnf" for something to give me a clue about what to do but I really can't figure it out.

I plan to run zmviewer from either a Ubuntu 10.4 or Windows 7 host but I believe it's completely irrelevant as none of them are able to connect to the mySQL server right now.

Just to clarify all I want to be able to do is to be able to access the mySQL DB from another computer on my LAN as I will be using a VPN tunnel to remotely connect to the network when needed.

Any help you can offer me would be most appreciated.

Posted: Thu Jun 10, 2010 7:37 pm
by Paranoid
Edit your mysqld config file (probably located in /etc/my.cnf) and look for the configuration item called "bind-address". Set this to and mysql will listen on all interfaces.

Posted: Fri Jun 11, 2010 6:58 am
by vectorm12
okay, unfortunately the my.cnf on my system did not have a "bind-address" note in it but I was able to figure out where it was supposed to go by using the guide here: ... erver.html

Unfortunately it only got me a little futher down the road. Since I had earlier attempted to comment out the "skip-networking" without adding the "bind-address" resulting in an error message.

All I get now is an instant "access denied zmuser@ip-address" error message which tells me I need to set permissions for the mysql user in question.

However I've yet to locate the default mysql root password for the svn version of ZMLarch yet. Anyone got a clue about that one?

Posted: Fri Jun 11, 2010 7:07 am
by Paranoid

Posted: Fri Jun 11, 2010 8:13 am
by kingofkya
yeha you also need to tell the server its ok for the user to login remotely also the link above will help.

Posted: Mon Jun 14, 2010 6:50 am
by vectorm12
okay I've come just a little bit further this time around. After setting a root mysql password and resetting loginrights for mysql I'm now getting a errormessage as state below.

Code: Select all

Database connection error: Host imac15.local is not allowed to connect to this MySQL server.
Currently looking over my hosts file incase I've somehow missed something in there.

Posted: Tue Jun 15, 2010 2:43 am
by rdmelin
You might take a look at this thread, especially the last few posts. ... sc&start=0

Posted: Tue Jun 15, 2010 8:44 am
by vectorm12
yeah I noticed I had forgotten to open up connection for all hosts in the hosts.allow file.

What I'm left with is a error message telling me access for user zmuser@ is denied.

So now all I need is to open up access to the DB from a remote connection in MySQL I suppose.

Posted: Tue Jun 22, 2010 4:25 am
by kp4djt
I have zmviewer running remotely on 2 Ubuntu 10.04 LTS machines, BUT after running a
bit it abends and takes down not only it's self but the whole GUI, if I am not watching it next
thing I see is a system login screen. If I watch it, all of the monitors go to black and it looks
like the whole thing stops, then the next thing I know I see a black screen, and a bit later
the whole GUI restarts, and sends me back to the system login.

Getting the remote part to work was really following what Ross indicated in another thread,
and once that was done I was able to get into the machine remotely with no problem, now if
I can just keep a zmviewer session running I will be happy.

I also tried to install it on a SUSe 11.2 machine, but it complained that it needed qt-mysql, I
tried to find qt-mysql but no joy. I did find it for RH, I tried the RPM but it caused all kinds
of errors so I aborted that.

Any idea of what I need to do to get it going on a SUSe machine??

Posted: Tue Jun 22, 2010 7:35 am
by vectorm12
I've actually given up on ZMLarch and reverted back to Ubuntu 10.04 x64 Server.

However I've yet to resolve the issue with connecting to the mySQL-server from a remote system using ZMViewer either.

Remote desktop isn't an option in my opinion as it's unencrypted as the fact that it would require loads of software running on the server that frankly doesn't need to run on it.

Btw what thread were you referring to?

Posted: Tue Jun 22, 2010 12:18 pm
by kp4djt
I have no problem with ZMLArch, it runs and keeps running just fine. Indeed the funny
thing is that ZMViewer will run on the server side with no problem whatsoever (that I have
seen). But if I try to run it on my remote machines, it runs for a while and then takes the
whole GUI down. I have only tried on Ubunutu machines as when I tried to install on my
SUSe machine it nagged for a file called qt-mysql. If I can find that file I can try it out on
that machine and see if the problem is a Ubuntu problem. ZMViewer is running under
QT so perhaps it is in a pissing contest with something on Gnome that is mutually disruptive.

As far as ZMLArch is concerned, it appears to run just fine. I have had some issues
recently with some TrendNet cameras, but it appears that the manufacturer changed some-
thing in the camera and the ones I recently purchased toss a lot of errors when using mjpeg,
I went back to just pulling jpeg stills at 3.5fps, and that works good and solid.

I sure would like to know why ZMViewer keeps on abending the whole system GUI on
the machines I have tested it on. I am wondering if it is eating up memory somewhere.

Posted: Tue Jun 22, 2010 12:30 pm
by vectorm12
what exactly did you do in order to make ZMviewer work on remote machines?

If I could make it past that hurdle it'd love to fill you in on my experiences with ZMviewer on Ubuntu. However as long as I keep getting the "user@host not allowed" error I'm kinda stuck.

I know it's got something to do with the basic MYSQL config of not accepting connections from any source other than localhost but I can't figure out what keeps getting in the way.

Posted: Tue Jun 22, 2010 12:43 pm
by kp4djt
I just ran ZMViewer and monitored memory and swap, here is what I saw. Swap starts to
grow, I have a 2G swap file, it normally runs about 100- 150m out of 1902M. When
ZMViewer starts, the file starts to grow, and grow and grow and grow, when it gets to
about 1500M the screens go to black and if I let it continue it will usually take the GUI down
somewhere beyond that.

Posted: Tue Jun 22, 2010 1:53 pm
by kp4djt
Did you follow Russ's instructions in this thread? ... sc&start=0

I followed them to the letter and it worked just as he indicates, there is some work you
need to do once you log into your db. Russ shows that in the last few post in that thread
look at it real hard. But follow it exactly as indicated and it will work. I had initially tried it and
I missed some steps and it bucked, but after I let things settle down I went back in and
followed the sequence, now I have remote access to the db. With that done you can then
get zmviewer to access it. My problem now is that once zmviewer is running on the remote
machine it starts eating up swap, and at about 1600M the whole thing abends, I think there
are spikes above my 2G swap that are causing it to abend. I just can not see them. I do
see it go well up to 1500M and about the time I see a visible spike to 1600M that is were
the screens go black and a bit later if I do not kill the process the whole GUI goes down.

Posted: Tue Jun 22, 2010 4:01 pm
by vectorm12
Yeah I have passed the commands to my mysql server but still no luck, but I did run a portscan on the system which told me port 3306 isn't open.

That would suggest there's something in my hosts config that isn't completely correct. I do however have both HTTP and SSH access setup and working which is rather puzzling to me