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

Can't login to Ubiquiti account from the setup wizard #55

Closed
matthiasguentert opened this issue Dec 4, 2019 · 2 comments
Closed

Can't login to Ubiquiti account from the setup wizard #55

matthiasguentert opened this issue Dec 4, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@matthiasguentert
Copy link

matthiasguentert commented Dec 4, 2019

Hello

I am trying to setup goofball222/unifi:latest-alpine on a synology (Docker version 18.09.8, build 2c0a67) as I would like to use a seperate docker container running mongodb.

This are my Environment Variables

When I start the container I see the following:

XXX INFO webrtc - Unable to load WebRTC library

However I am still able to access the UI on https://...:8443. But when asked for my Ubiquiti credentials I get an Invalid username or password, please try again. in return. However my credentials are fine for sure! Double and tripple checked on https://unifi.ui.com/. I have also ensured that I have a clean setup (meaning fresh mongo and unifi container, with empty mount points).

What is going on here?

[2019-12-04T23:06:51,237] XXX <webapi-2> WARN  api    - failed to authenticate to SSO: Cloud operation failed! RC=403, error: {"detail":"Invalid credential"}                                       
[2019-12-04T23:06:51,238] XXX <webapi-2> INFO  api    - [api] api.err.IncorrectUbicCreds: /api/cmd/cloudaccess     

Here the output of docker inspect goofball222/unifi:latest-alpine

"Labels": {
    "org.label-schema.build-date": "2019-11-26T15:45:10Z",
    "org.label-schema.license": "Apache-2.0",
    "org.label-schema.name": "UniFi Controller",
    "org.label-schema.schema-version": "1.0",
    "org.label-schema.url": "https://github.com/goofball222/unifi",
    "org.label-schema.vcs-ref": "dbc9685",
    "org.label-schema.vcs-url": "https://github.com/goofball222/unifi.git",
    "org.label-schema.vendor": "The Goofball - goofball222@gmail.com",
    "org.label-schema.version": "5.12.35"
},
@matthiasguentert
Copy link
Author

I guess I can reproduce this now. It seems as if the TZ variable or/and DEBUG=true is the culprit... though no idea why. When removing the TZ variable and set DEBUG=true I can login, though I later on receive a "Can't configure controller" when trying to finish the setup wizard... crazy

@goofball222 goofball222 self-assigned this Dec 5, 2019
@goofball222 goofball222 added the enhancement New feature or request label Dec 5, 2019
@goofball222
Copy link
Owner

The WebRTC library that UniFi uses is linked to specific versions of system libraries that aren't available in the Alpine Linux system by default. It's on my to-do list to pick that apart and figure out exactly what it links to and see if I can make it work under Alpine, I just haven't gotten around to it. In the meantime if you need WebRTC/UI cloud functionality you would need to run the Debian based image.

The Debian image is set up to function with an externalized MongoDB as well. It'll just consume some additional space (currently ~40MB more when packed) and have the Mongo 3.4 files available, but unused.

Give it a shot with the Debian goofball222/unifi:latest tag and let me know if you're still having issues getting the cloud access connected.

Also, I don't recommend running at all with DEBUG=true, as you found it can cause some really funky things... Both the container init script and the UniFi software respect it when it's enabled and it can cause unexpected things in the controller. You may need to go in and edit the UniFi data/system.properties file to remove the debug=true line from there as well.

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

No branches or pull requests

2 participants