HTTP ERROR 404 (PaperUI, ClassicUI)

You’re right - by default if authentication failure is not handled - there is redirect to /login which is left empty. Once you have esh-io-transport-http-basic there is a basic challenge sent which covers “authentication failure”.

I hope it’s fixed when @Kai triggers a new build

New build is running.

Got the new build and the prompt for credentials but it doesn’t accept my Karaf console user name / password combo. The only thing in the log is:

2018-10-09 23:31:48.310 [INFO ] [home.core.auth.AuthenticationManager] - Failed to authenticate using credentials openhab:*******

Any other ideas?

Thanks!

EDIT: I seem to be locked out of everything now. I can’t control any of my devices via Alexa, the openhab app or myopenhab.org. They are all asking for authentication. Well Alexa isn’t she just says "Hmm, item name is not responding.

same here with S#1386

fall back to Snapshot build #1383 which does not include auth

apt-get install openhab2=2.4.0~20181010032256-1

@maintainers:

  1. we need a kill switch for the auth. I tried multiple options in runtime.cfg but they didn’t work (org.eclipse.smarthome.core.auth:authentication.enabled=false etc)
  2. set these new features to disabled by default and then allow us to enable them :slight_smile:
2 Likes

I agree authentication should be disabled by default.

yes please. via switch and disabled by default. after OH2 had no authentication for some time now i switched to VPN and will not go back to basic authentication anymore. thanks

1 Like

Same here with #1386. Although that latest build is supposed to disable authentication by default, it does not.
And yes, we need this to get enabled/disabled based on some runtime config option and not by default.
And to issue a warning and point to Karaf auth docs would have been nice.
I’ve been using SSH authentication in Karaf. Now that’s difficult to enter in a basic auth window in a browser :frowning: so I’m locked out, too.

1 Like

Hi @Kai!

Same problem here, I’m running the #1386 snapshot and the login window continues popping up, but I don’t know which is the correct username/password combination. “openhab:habopen” doesn’t seem to work :cry:

Many thanks for all your work and efforts and best regards,

Aitor

Yes same on my system with #1386. Short idea, is there a file that stores the credentials. If so it is maybe a solution to creat such a file with some standard credentials and offer it for download-

after a downgrade, always… Clear the cache

No issues here with S#1383

I downgraded using

apt-get install openhab2=2.4.0~20181006154235-1

Then I cleared the cache per

systemctl stop openhab2
openhab-cli clean-cache

I confirmed that this did indeed remove the /var/lib/openhab2/cache and tmp directories.

systemctl start openhab2

And now no UI’s load. My log file looks like this. I think it’s still trying to load the newer UI’s.

 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-ui-homebuilder, openhab-ui-basic,
 openhab-action-mail, openhab-misc-openhabcloud, openhab-ui-habmin, openhab-ui-habpanel, openhab-ui-paper,
 openhab-binding-zwave': Unable to resolve root: missing requirement [root] osgi.identity;
 osgi.identity=openhab-ui-paper; type=karaf.feature; 
version="[2.4.0.SNAPSHOT,2.4.0.SNAPSHOT]"; filter:="(&(osgi.identity=openhab-ui-paper)
(type=karaf.feature)(version>=2.4.0.SNAPSHOT)(version<=2.4.0.SNAPSHOT))" [caused by: Unable to
 resolve openhab-ui-paper/2.4.0.SNAPSHOT: missing requirement [openhab-ui-paper/2.4.0.SNAPSHOT]
 osgi.identity; osgi.identity=org.openhab.ui.paperui; type=osgi.fragment; version="
[2.4.0.201810091736,2.4.0.201810091736]"; resolution:=mandatory [caused by: Unable to resolve
 org.openhab.ui.paperui/2.4.0.201810091736: missing requirement
 [org.openhab.ui.paperui/2.4.0.201810091736] osgi.wiring.host;
 osgi.wiring.host=org.eclipse.smarthome.ui.paper; bundle-version=0; filter:="(&
(osgi.wiring.host=org.eclipse.smarthome.ui.paper)(bundle-version>=0.0.0))" [caused by: Unable to resolve
 org.eclipse.smarthome.ui.paper/0.10.0.201810080142: missing requirement 
[org.eclipse.smarthome.ui.paper/0.10.0.201810080142] osgi.wiring.package; filter:="
(osgi.wiring.package=org.eclipse.smarthome.io.http)"]]]

Not sure where to go from here. I saw that upgrading caused folks to get locked out and I don’t want to be locked out of the system. Any thoughts?

I had the same issue. After several tries I also installed the openhab2-addons package along with the downgraded version (make sure you use the version of the same day of your downgrade version) and then the addons and UIs loaded just fine.

Not sure though if it’s supposed to be like that…

Thanks for the tip, that makes absolute sense. I did the downgrade but this time I chose #1383 it brought back my UI’s but they still suffer from that 404 can’t find /login error. However, I can access them from myopenhab for now so at least I have a running system. Here’s what I did:

apt-get update (to make sure I had all the builds available)
apt-get install openhab2=2.4.0~20181010032256-1
apt-get install openhab2-addons=2.4.0~20181010032256-1
systemctl stop openhab2
openhab-cli clean-cache
systemctl start openhab2

This at least gives me a working installation albeit I cannot access the basicUI.

sudo apt-cache show openhab2
sudo apt-cache show openhab2-addons

Then select the version you want to install.
E.g.

sudo apt-get install openhab2=2.4.0~20181004001205-1 openhab2-addons =2.4.0~20181004001205-1

1 Like

I went back to #1383 and #1380 but I still have the 404 problem on accessing BasicUI or PaperUI.
OH still changes e.g. accesses to https://<ip>:<port>/basicui/app into https://<ip>:<port>/login?redirect=/basicui/app which does not exist.
Seems the upgrade to #1386 has put than into some config file that isn’t changed back on downgrading.
Anyone to know how to get rid of that ?

Sorry maybe for the impatience - but in #1386 i now see consistently login request pop ups for all UIs as well as authentication request from IOS app (at least before 1386 the app still worked as a last resort)…is there any default credentials that could be entered in order to make it work for now…or no way i could overcome the pop up?

If the error is because of authentication, shouldn’t it be returning a 403 error instead of 404?

I’m happy to see this one finally addressed.

I’m not saying that we are not interpreting the problem here, I’m saying that had it returned 403 it might have clued us in earlier that authentication was the problem. From a usability perspective, if I enter my authentication in incorrectly I hope to get a 403 instead of 404 at least.

Got bit by this as well. Downgraded and turned off my auto update for the time being. It did take me a few tries(stop/clean/start) to get things working again after the downgrade, but eventually have it all working.

Ive stopped the expiration of the snapshot apt/yum packages until the issue is sorted. This will keep a working version in the repo for a while.

As others have mentioned:

sudo apt install openhab2=2.4.0~20181006154235-1 openhab2-addons=2.4.0~20181006154235-1

Will downgrade and restart openhab to the last version without the authentication change. Applying the installation as in above line will clear the cache for you.

After the problem is fixed, you can upgrade normally and uninstall openhab2-addons if you wish to use the online repo (and save space).

2 Likes

Just tried #1387 - indeed the login user/pw has disappeared however trying to access Basic UI, Classic UI or Paper UI still thow a HTTP 404 error “not found”