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

Authentication Failed #195

Closed
Chronos-92 opened this issue Mar 15, 2016 · 7 comments
Closed

Authentication Failed #195

Chronos-92 opened this issue Mar 15, 2016 · 7 comments

Comments

@Chronos-92
Copy link

Platform & OS Version
Android 5.1 Lollipop

Device
Motorola Moto G 3rd Gen

The version of the app you are reporting:
1.1.0

What is the nature of your issue
Bug

Details
I run a small Zoneminder instance within our company, and roughly 9 people have access to this system through zmNinja (For which I thank you, it's a lifesaver and displays things a lot more clear than the regular web UI does for Regular Joe and Joanne.) Out of these 9 people however, there is one phone that has stopped functioning since the last update. The login details are the exact same as everyone else's, and I have attempted to re-enter the details several times to no avail.

The only information the log provides is as follows:

Mar 15, 2016 09:29 AM INFO zmAutologin Error null and status 0
Mar 15, 2016 09:29 AM INFO Checking if reCaptcha is enabled in ZM...
Mar 15, 2016 09:29 AM INFO zmAutologin called
Mar 15, 2016 09:29 AM INFO No Event Server present. Not initializing
Mar 15, 2016 09:29 AM INFO Authentication is disabled, setting dummy user & pass

I'm unable to figure out where this is coming from, and the user would not appreciate me resetting their entire phone just to have a chance at getting it to work again. Is there any chance I can get more debugging information out of this to show you, or would you have an idea of where to look next?

@pliablepixels
Copy link
Member

Hi,
The fact that it is only happening on one phone and not others makes this a little harder, but lets try

  1. You have an option to enable Debug logs - go to Menu->Developer settings and enable Debug logs
  2. Do all your users have different ZM logins or is it the same? Okay, I just noticed you said same
  3. Check ZM (not zmninna) and apache logs as well when that user tries to login - let me know if you see anything odd
  4. Err null and status 0 happens when 1. the server cannot be reached 2. the URL is misconfigured in some way

@Chronos-92
Copy link
Author

Hello,

I understand. It's what's driving me slightly insane. I'm honestly considering just resetting the phone, but I doubt that'd be appreciated.

  1. I've enabled the debug logs now, and this gives me the following information:

Mar 15, 2016 02:09 PM DEBUG zmAutoLogin: Inside auth-error emit
Mar 15, 2016 02:09 PM INFO zmAutologin Error null and status 0
Mar 15, 2016 02:09 PM INFO Checking if reCaptcha is enabled in ZM...
Mar 15, 2016 02:09 PM INFO zmAutologin called
Mar 15, 2016 02:09 PM DEBUG Logging out of current session...
Mar 15, 2016 02:09 PM DEBUG Event server not initalized, not sending message
Mar 15, 2016 02:09 PM INFO No Event Server present. Not initializing
Mar 15, 2016 02:09 PM INFO Authentication is disabled, setting dummy user & pass

  1. They all use the exact same information, and I can hold multiple phones and systems next to each other on the same network, but only this one has connectivity issues.
  2. None of these logs display any unusual behaviour.
  3. That was my first thought, which is why I have made sure to check the URL several times, the browser on the phone can access the URL without any issues. The device is not rooted, and there does not appear to be any firewall or white list on there that would block specific applications.

Is it possible that the self-signed certificate is causing problems here? I would expect that it should not as it works on any other phone, but it never hurts mentioning that this is the case.

@pliablepixels
Copy link
Member

Hi, lets try deleting the SSL cert from the iPhone, delete the app and
reinstall again. The new versions don't need the cert to be installed to
access ZM

On Tue, Mar 15, 2016 at 9:17 AM, Glyph [email protected] wrote:

Hello,

I understand. It's what's driving me slightly insane. I'm honestly
considering just resetting the phone, but I doubt that'd be appreciated.

  1. I've enabled the debug logs now, and this gives me the following
    information:

Mar 15, 2016 02:09 PM DEBUG zmAutoLogin: Inside auth-error emit
Mar 15, 2016 02:09 PM INFO zmAutologin Error null and status 0
Mar 15, 2016 02:09 PM INFO Checking if reCaptcha is enabled in ZM...
Mar 15, 2016 02:09 PM INFO zmAutologin called
Mar 15, 2016 02:09 PM DEBUG Logging out of current session...
Mar 15, 2016 02:09 PM DEBUG Event server not initalized, not sending
message
Mar 15, 2016 02:09 PM INFO No Event Server present. Not initializing
Mar 15, 2016 02:09 PM INFO Authentication is disabled, setting dummy user
& pass

  1. They all use the exact same information, and I can hold multiple phones
    and systems next to each other on the same network, but only this one has
    connectivity issues.
  2. None of these logs display any unusual behaviour.
  3. That was my first thought, which is why I have made sure to check the
    URL several times, the browser on the phone can access the URL without any
    issues.

Is it possible that the self-signed certificate is causing problems here?
I would expect that it should not as it works on any other phone, but it
never hurts mentioning that this is the case.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/pliablepixels/zmNinja/issues/195#issuecomment-196812786

@Chronos-92
Copy link
Author

I'm afraid it's an Android device, and I have not installed any certificates on the system as I installed them after the Certificate update.

@pliablepixels
Copy link
Member

can you come online at #zoneminder channel on freenode? It may be easier to chat that way

@Chronos-92
Copy link
Author

On it.

@Chronos-92
Copy link
Author

After discussing this on IRC, it appears that the phone somehow started blocking SefSigned SSL certificates. Until we (as in I and the owner of the phone) can figure out a proper way to resolve the issue I have disabled the forced SSL connectivity on Zoneminder and enabled HTTP.

My zoneminder.conf file in Apache (HTTPD) now looks as follows:

#
# ZoneMinder Apache configuration file
# With SSLRequire and HTTPS auto redirect
# Modify this configuration to suit your requirements
#

# Auto Redirect HTTP requests to HTTPS
# RewriteEngine On
# RewriteCond %{HTTPS} !=on
# RewriteRule ^/?(zm)(.*) https://%{SERVER_NAME}/$1$2 [R,L]

Alias /zm "/usr/share/zoneminder/www"
<Directory "/usr/share/zoneminder/www">
    #SSLRequireSSL
    Options -Indexes +MultiViews +FollowSymLinks
    AllowOverride All
    <IfModule mod_authz_core.c>
       # Apache 2.4
       Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order deny,allow
        Allow from all
    </IfModule>
</Directory>

ScriptAlias /cgi-bin-zm "/usr/libexec/zoneminder/cgi-bin"
<Directory "/usr/libexec/zoneminder/cgi-bin">
    #SSLRequireSSL
    AllowOverride All
    Options +ExecCGI +FollowSymLinks
    <IfModule mod_authz_core.c>
       # Apache 2.4
       Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order deny,allow
        Allow from all
    </IfModule>
</Directory>

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