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

Settings lost on Armbian #111

Closed
Siggemada opened this Issue Feb 4, 2018 · 31 comments

Comments

Projects
None yet
4 participants
@Siggemada
Copy link

Siggemada commented Feb 4, 2018

I lost the login and settings. Root/root works and brings up the GUI but in Dutch.

Permission issue?

How can I debug this?

@cedricve

This comment has been minimized.

Copy link
Member

cedricve commented Feb 4, 2018

Not sure what you mean, can you providing more detailed instructions and screenshots?

@cedricve cedricve self-assigned this Feb 4, 2018

@cedricve cedricve added the question label Feb 4, 2018

@kocis73

This comment has been minimized.

Copy link

kocis73 commented Feb 8, 2018

Hi Cedric
I've the same issue me too. I run an Orange Pi Zero armbian, I've installed the system from https://doc.kerberos.io/2.0/installation/Generic because I did not succeed from Armbian section, I had a warning from lib4.so (or something similar)..
Let me add somthing more. The web interface is not saving any configuration from the beginning. From the starting page I set new user/password, but the next time it runs again from zero, proposing the introduction again with root/root.
After new login the user is always root (even if you set the new user/password).
From the configuration page any change is not saved after click on uploading button.
The only chance is to edit from consolle (i.e. nano config.xml) and restart the system. Then I see from web the new configuration set.
Basically not any configuration can be saved from web interface...
Another minor issue, sometime the machinery status is red, it doesn't run, but maybe is it because of the board?

@cedricve

This comment has been minimized.

Copy link
Member

cedricve commented Feb 8, 2018

hmm interesting definitely is a permission issue. can you try this:

sudo chown www-data -R storage bootstrap/cache config/kerberos.php
sudo chmod -R 775 storage bootstrap/cache
sudo chmod 0600 config/kerberos.php
@cedricve

This comment has been minimized.

Copy link
Member

cedricve commented Feb 8, 2018

@kocis73 if you prefer we can open a teamviewer session, to better understand the situation.

@kocis73

This comment has been minimized.

Copy link

kocis73 commented Feb 9, 2018

Many thanks for your availability Cedric.
first I'll try the new permission this evening, I'll keep you posted.

@Siggemada

This comment has been minimized.

Copy link

Siggemada commented Feb 9, 2018

Sorry but I can not consistently recreate this. Settings works fine after reboot. Still unable to change resolution of USB camera but login is ok.

@kocis73

This comment has been minimized.

Copy link

kocis73 commented Feb 9, 2018

@cedricve I cannot modify those permissions because I have not those directories... maybe something went wrong during the installation of the web.
Actually I run Armbian, but I had to follow the Generic installation. Which are the correct dependencies to install? Ubuntu or Raspbian? Maybe I did a wrong choice... How to start from the beginning?
thanks

@Siggemada

This comment has been minimized.

Copy link

Siggemada commented Feb 11, 2018

Ok, I did not change anything and now it works. Sorry, should we close this issue?

kocis73: I can walk you thru the steps I did to install.

@cedricve

This comment has been minimized.

Copy link
Member

cedricve commented Feb 11, 2018

hmm looks like something weird is going here. Can you try to simulate with a blank install @Siggemada. Want to be sure this is a bug or not, and ideally have a better understanding what's happening. Maybe something is missing in the Armbian section?

@kocis73

This comment has been minimized.

Copy link

kocis73 commented Feb 13, 2018

@Siggemada it would be great! Can you help me?

@Siggemada

This comment has been minimized.

Copy link

Siggemada commented Feb 13, 2018

Yes sure. For this to be of value, I will have to reformat my SD.

I´ll follow the instructions and use the deb file we compiled.

Is there a better way to install npn? Not so keen on all the warnings about unsigned binarys.

@cedricve

This comment has been minimized.

Copy link
Member

cedricve commented Feb 17, 2018

hmm not sure, if you are following the generic installation? or the armbian/raspbian install?

@Siggemada

This comment has been minimized.

Copy link

Siggemada commented Feb 17, 2018

Ok, so here are my steps:
-Installed https://www.armbian.com/banana-pi/
Armbian_5.38_Bananapi_Debian_stretch_next_4.14.14

Installed according to:
https://doc.kerberos.io/2.0/installation/Armbian

After installing machinery, I change /etc/opt/config/config.xml:
USBCamera

Instructions tell us to start kerberosio but this results in:
17/02/2018 16:59:50.915 INFO [trivial] Capture: (Warning) You can change the capture device with the configuration files.
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
Unable to stop the stream: Device or resource busy
17/02/2018 16:59:50.916 ERROR [trivial] OpenCV : can't open usb camera

I guess that it is already started.

I skip this step: echo "deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi" | sudo tee --append /etc/apt/sources.list

Now I install nodejs and npm in a different way:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

after this I continue with:

sudo apt-get install nginx php7.0 php7.0-curl php7.0-gd php7.0-fpm php7.0-cli php7.0-opcache php7.0-mbstring php7.0-xml php7.0-zip php7.0-mcrypt

and I follow the instructions from here on....

I did not set up the removal crontab job for this test.

@Siggemada

This comment has been minimized.

Copy link

Siggemada commented Feb 17, 2018

Now,

  1. I set the username and password I want.
  2. I log in.
  3. I set a new resolution on my USB Camera with advanced mode.
    Suddenly, My username has changed to "root".

I can not log in with the selected username.
username.pdf

@Siggemada

This comment has been minimized.

Copy link

Siggemada commented Feb 17, 2018

After reboot, the web interface askes me to set up username again.

I do so and my changed USB cam settings remains those I set.

After clicking on the dashboard the root user is shown again.

@Siggemada

This comment has been minimized.

Copy link

Siggemada commented Feb 17, 2018

So, I think I found a consistent problem.

After I click on "Update" under Configuration, Advanced; user displays as "Root".

@Siggemada

This comment has been minimized.

Copy link

Siggemada commented Feb 17, 2018

This is the content of /var/www/web/config/kerberos.php after setting a new username/pw at the welcome screen:

'advanced', 'radius' => '1', 'installed' => false, 'users' => array ( 0 => array ( 'id' => 1, 'username' => 'root', 'password' => 'root', 'firstname' => 'Firstname', 'secondname' => 'Lastname', 'language' => 'en', ), ), );
@Siggemada

This comment has been minimized.

Copy link

Siggemada commented Feb 17, 2018

Ok, so if I change this with "Update profile" this file do change. And kerberosio works as expected.

@cedricve

This comment has been minimized.

Copy link
Member

cedricve commented Feb 17, 2018

Interesting feedback. Looks like something is going wrong, i'll try to simulate it. when doing so, do you see something weird in the console. Also which browser are you using?

@Siggemada

This comment has been minimized.

Copy link

Siggemada commented Feb 18, 2018

My conclusion is that the welcome screen doesn't modify the file. Or that something else is is changing it back.

@cedricve

This comment has been minimized.

Copy link
Member

cedricve commented Feb 18, 2018

Indeed we've had that issue a while ago, which browser are you using?

@Siggemada

This comment has been minimized.

Copy link

Siggemada commented Feb 18, 2018

Using chrome. I can try with firefox.

I see a difference if I add /login or if I just go to the ipaddress. The ip address keep redirecting me to the /welcome screen.

@cedricve

This comment has been minimized.

Copy link
Member

cedricve commented Feb 18, 2018

Jep that's normal because it checks the kerberos.php file if its already installed. Can we open a teamviewer session I would like to see what's happening in the console/network tab.

@Siggemada

This comment has been minimized.

Copy link

Siggemada commented Feb 18, 2018

I could expose it to the internet and give you the ip.

@aamorin

This comment has been minimized.

Copy link

aamorin commented Mar 20, 2018

I'm having a similar issue with Docker (OS X as host): I've created the docker-compose file, started a container with a unique project name, configured everything and let it there.. after a while, I came back to discover that the web is now on the welcome screen like if it were a new installation. After configuring the user/password, I login and my camera is already configured and working (like if it just lost the login config).

This is the only thing I can see on logs:

2018-03-19 20:04:32,554 CRIT Set uid to user 0
2018-03-19 20:04:32,584 INFO RPC interface 'supervisor' initialized
2018-03-19 20:04:32,584 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-03-19 20:04:32,585 INFO supervisord started with pid 31
2018-03-19 20:04:33,589 INFO spawned: 'nginx' with pid 34
2018-03-19 20:04:34,634 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-03-19 20:53:29,462 CRIT Set uid to user 0
Unlinking stale socket /tmp/supervisor.sock
2018-03-19 20:53:29,829 INFO RPC interface 'supervisor' initialized
2018-03-19 20:53:29,829 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-03-19 20:53:29,830 INFO supervisord started with pid 30
2018-03-19 20:53:30,834 INFO spawned: 'nginx' with pid 33
2018-03-19 20:53:32,008 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

@cedricve

This comment has been minimized.

Copy link
Member

cedricve commented Mar 20, 2018

I've been trying to resolve this issue for a couple of times and added some extra check to the welcome screen. I have not been able to reproduce this. Somehow the settings from the welcome screen aren't written to the config/kerberos.php file.

@aamorin are you able to reproduce this issue ?

@cedricve

This comment has been minimized.

Copy link
Member

cedricve commented Mar 20, 2018

Ok nevermind, I was able to reproduce. I followed @Siggemada steps. Debugging the issue and will supply a patch.

@cedricve

This comment has been minimized.

Copy link
Member

cedricve commented Mar 20, 2018

Ok found the bug. If you start toggling between advanced/basic on the settings view it reverts the startup config file. Working on a patch. Thanks guys..

@aamorin

This comment has been minimized.

Copy link

aamorin commented Mar 20, 2018

Awesome !!! .. Yes, I was about to tell you that, I came to the same conclusion, it seemed that the trigger was to toggle between advanced/basic..

@cedricve

This comment has been minimized.

Copy link
Member

cedricve commented Mar 30, 2018

hello all, I've created a fix for this. Problem will be fixed in next release.

@cedricve cedricve closed this in 24fcfb3 Mar 31, 2018

@cedricve

This comment has been minimized.

Copy link
Member

cedricve commented Mar 31, 2018

Will be integrated in 2.6.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment