A few startup issues

Questions and discussions about Indie Computing's UBOSbox
Post Reply
jimfenton
Posts: 2
Joined: Wed Nov 07, 2018 9:36 pm

A few startup issues

Post by jimfenton » Wed Nov 07, 2018 9:51 pm

I just got my UBOSbox and had a few glitches getting things started. I have worked through all of these but want to report them so others can have a smoother experience. I suspect most, if not all of these, are nextcloud bugs, but I'll let you judge that.

I received the UBOS box on Oct 31 and did initial boot. Logged into nextcloud successfully.

I got back to it on November 5 and tried to login again. Got to the login prompt, entered username and password, and it spun...and spun. Never completed. I tried to shut down the box by pressing the power button as suggested on the quick start sheet. Nothing happened. Removed power and pressed power button to boot again.

This time though, I got to nextcloud admin directly – no login required! Why??

Got to user management, added a group “Fenton”. I entered the admin password as requested, but then got an error that I didn’t enter my password in time (even though I did it pretty fast). But it did create the group despite the message

Then I tried to create a user “fenton” in that group. Failed. So I tried again, and got another error that the user exists, even though it wasn't visible on the user page. So I navigated to a different page and back to the user list, and sure enough it was there. Not sure what the failure was; perhaps it didn't like that my username and group name were the same (modulo capitalization).

I see that the Nextcloud user manual is included on the box, but I don't see the Nextcloud Administrator's manual that it references. I haven't found the administrator's manual, but it seems like it might be at least as important as the user's manual when getting started with the UBOSbox.



j12t
Posts: 69
Joined: Tue Dec 12, 2017 9:17 pm
Contact:

Re: A few startup issues

Post by j12t » Wed Nov 07, 2018 10:25 pm

Hi Jim,

let me try to comment point by point.

> I received the UBOS box on Oct 31 and did initial boot. Logged into nextcloud successfully.

Good!

> I got back to it on November 5 and tried to login again. Got to the login prompt, entered username and password, and it spun...and spun. Never completed. I tried to shut down the box by pressing the power button as suggested on the quick start sheet. Nothing happened. Removed power and pressed power button to boot again.

Hmmm ... I have not seen that one! It might be interesting to know what the system log says at that time. If you feel like investigating, you could ssh into the box (keys are on your UBOS Staff, see https://ubos.net/staff ) and run "sudo journalctl --since 2018-11-01" (or whatever the time was). New boots are fairly easy to see in the log, I guess we are looking for what happened right before that.

> This time though, I got to nextcloud admin directly – no login required! Why??

I believe Nextcloud keeps the cookies in your browser valid, just like sites like Google do.

> Got to user management, ..

Posted over on the Nextcloud forums: https://help.nextcloud.com/t/user-manag ... sues/40748

What browser did you use?

The admin manual is online on their website at https://nextcloud.com/support/ .

jimfenton
Posts: 2
Joined: Wed Nov 07, 2018 9:36 pm

Re: A few startup issues

Post by jimfenton » Thu Nov 08, 2018 2:08 am

Apparently it did see my power-button press, because the first thing I see around that time is:

Code: Select all

Nov 06 04:07:56 ubosbox systemd-logind[359]: Power key pressed.
Nov 06 04:07:56 ubosbox systemd-logind[359]: Powering Off...
Nov 06 04:07:56 ubosbox systemd-logind[359]: System is powering down.
followed by a bunch of other shutdown messages, ending with:

Code: Select all

Nov 06 04:07:59 ubosbox mysqld[23156]: Stopping mysqld.service
Nov 06 04:07:59 ubosbox systemd[1]: Stopped MariaDB database server.
-- Reboot --
Nov 06 04:09:49 ubosbox kernel: Linux version 4.17.14-arch1-1-ARCH (builduser@heftig-2746) (gcc version 8.2.0 (GCC)) #1 SMP PREEMPT Thu Aug 9 11:56:50 UTC 2018
Nov 06 04:09:49 ubosbox kernel: Command line: initrd=\initramfs-linux.img root=PARTUUID=c7ad9e8a-5fd0-42bd-b56e-084b980e966e rw  init=/usr/lib/systemd/systemd
I don't remember exactly how long it was, but I suspect that it hung following the mysqld shut down and what you see 2 minutes later is when I power cycled it.

I did also see during the startup some messages that didn't seem normal on restart, but perhaps they're really OK, such as:

Code: Select all

Nov 06 04:09:54 ubosbox redis-server[403]: 403:M 06 Nov 04:09:54.424 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix 
this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
Nov 06 04:09:54 ubosbox redis-server[403]: 403:M 06 Nov 04:09:54.424 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create late
ncy and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.l
ocal in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.

Code: Select all

Nov 06 04:10:02 ubosbox ubos-admin-initialize[372]: ==> Updating trust database...
Nov 06 04:10:02 ubosbox ubos-admin-initialize[372]: gpg: marginals needed: 3  completes needed: 1  trust model: pgp
Nov 06 04:10:02 ubosbox ubos-admin-initialize[372]: gpg: bad data signature from key 20E8A9C77716EB4F: Wrong key usage (0x19, 0x2)
Nov 06 04:10:02 ubosbox ubos-admin-initialize[372]: gpg: depth: 0  valid:   2  signed:   5  trust: 0-, 0q, 0n, 0m, 0f, 2u
Nov 06 04:10:02 ubosbox ubos-admin-initialize[372]: gpg: bad data signature from key 20E8A9C77716EB4F: Wrong key usage (0x19, 0x2)
Nov 06 04:10:02 ubosbox ubos-admin-initialize[372]: gpg: depth: 1  valid:   5  signed:  70  trust: 0-, 0q, 0n, 5m, 0f, 0u
Nov 06 04:10:02 ubosbox ubos-admin-initialize[372]: gpg: depth: 2  valid:  70  signed:   8  trust: 70-, 0q, 0n, 0m, 0f, 0u
Nov 06 04:10:02 ubosbox ubos-admin-initialize[372]: gpg: next trustdb check due at 2018-12-13

Code: Select all

Nov 06 04:10:08 ubosbox mysql_install_db[463]: To start mysqld at boot time you have to copy
Nov 06 04:10:08 ubosbox mysql_install_db[463]: support-files/mysql.server to the right place for your system
Nov 06 04:10:08 ubosbox mysql_install_db[463]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
Nov 06 04:10:08 ubosbox mysql_install_db[463]: To do so, start the server, then issue the following commands:
Nov 06 04:10:08 ubosbox mysql_install_db[463]: '/usr/bin/mysqladmin' -u root password 'new-password'
Nov 06 04:10:08 ubosbox mysql_install_db[463]: '/usr/bin/mysqladmin' -u root -h ubosbox password 'new-password'
Nov 06 04:10:08 ubosbox mysql_install_db[463]: Alternatively you can run:
Nov 06 04:10:08 ubosbox mysql_install_db[463]: '/usr/bin/mysql_secure_installation'
Nov 06 04:10:08 ubosbox mysql_install_db[463]: which will also give you the option of removing the test
Nov 06 04:10:08 ubosbox mysql_install_db[463]: databases and anonymous user created by default.  This is
Nov 06 04:10:08 ubosbox mysql_install_db[463]: strongly recommended for production servers.
Nov 06 04:10:08 ubosbox mysql_install_db[463]: See the MariaDB Knowledgebase at http://mariadb.com/kb or the
Nov 06 04:10:08 ubosbox mysql_install_db[463]: MySQL manual for more instructions.

Code: Select all

Nov 06 04:26:54 ubosbox nextcloud@a8febe71467e65f8d0939c800630d24fc713d94e8[1638]: {ocs_api} {"Exception":"Swift_TransportException","Message":"Connection could not be es
tablished with host 127.0.0.1 [Connection refused #111]","Code":0,"Trace":[{"file":"\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/3rdparty\/s
wiftmailer\/swiftmailer\/lib\/classes\/Swift\/Transport\/StreamBuffer.php","line":62,"function":"establishSocketConnection","class":"Swift_Transport_StreamBuffer","type":"->","args":[]},{"file":"\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/3rdparty\/swiftmailer\/swiftmailer\/lib\/classes\/Swift\/Transport\/AbstractSmtpTransport.php","line":126,"function":"initialize","class":"Swift_Transport_StreamBuffer","type":"->","args":[{"protocol":"","host":"127.0.0.1","port":25,"timeout":10,"blocking":1,"tls":false,"type":1,"stream_context_options":[]}]},{"file":"\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/3rdparty\/swiftmailer\/swiftmailer\/lib\/classes\/Swift\/Mailer.php","line":67,"function":"start","class":"Swift_Transport_AbstractSmtpTransport","type":"->","args":[]},{"file":"\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/lib\/private\/Mail\/Mailer.php","line":180,"function":"send","class":"Swift_Mailer","type":"->","args":[{"__class__":"Swift_Message"},[]]},{"file":"\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/settings\/Mailer\/NewUserMailHelper.php","line":170,"function":"send","class":"OC\\Mail\\Mailer","type":"->","args":[{"__class__":"OC\\Mail\\Message"}]},{"file":"\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/apps\/provisioning_api\/lib\/Controller\/UsersController.php","line":307,"function":"sendMail","class":"OC\\Settings\\Mailer\\NewUserMailHelper","type":"->","args":[{"__class__":"OC\\User\\User"},{"__class__":"OC\\Mail\\EMailTemplate"}]},{"file":"\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":166,"function":"addUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->","args":["fenton","Xe43J+UMN>JFZYhAfVD0","Jim Fenton","fenton@bluepopcorn.net",["Fenton","admin"],["Fenton"],"default","en"]},{"file":"\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Provisioning_API\\Controller\\UsersController"},"addUser"]},{"file":"\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/lib\/private\/AppFramework\/App.php","line":118,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Provisioning_API\\Controller\\UsersController"},"addUser"]},{"file":"\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Provisioning_API\\Controller\\UsersController","addUser",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"ocs.provisioning_api.Users.addUser"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"ocs.provisioning_api.Users.addUser"}]},{"file":"\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"ocs.provisioning_api.Users.addUser"}]},{"file":"\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/ocs\/v1.php","line":82,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/ocsapp\/cloud\/users"]},{"file":"\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/ocs\/v2.php","line":24,"args":["\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/ocs\/v1.php"],"function":"require_once"}],"File":"\/ubos\/http\/sites\/s82cbdc8a9034919ff9620607eb078e64c9f38b25\/nextcloud\/3rdparty\/swiftmailer\/swiftmailer\/lib\/classes\/Swift\/Transport\/StreamBuffer.php","Line":269,"CustomMessage":"Can't send new user mail to fenton@bluepopcorn.net"}

(this last one might explain why I got an error trying to add myself as a user)

With respect to cookies, I expect cookies to sometimes persist across client sessions, but generally not when the server reboots (which makes it different from Google!)

Oh, and the browser is Firefox 63.0.

j12t
Posts: 69
Joined: Tue Dec 12, 2017 9:17 pm
Contact:

Re: A few startup issues

Post by j12t » Thu Nov 08, 2018 8:58 pm

Hmm, it's a little unclear what happened during that poweroff: there isn't really anything after the mysql message. Is that problem reproduceable?

Re Redis messages, I think we can ignore those, they are all in the "fine tuning for major installations" category and I don't think matter for us here.

Re gpg: I had not seen this; logging it as something to investigate: https://github.com/uboslinux/ubos-admin/issues/519 . Doesn't seem to have any adverse consequences however.

Re mysql/mariadb: this is just mariadb's packaging attempting to be helpful to people who install the package. Ignore.

Re swiftmailer: we don't attempt to set up outgoing e-mail on UBOSbox out of the box, because without having an account somewhere, sending e-mail from home broadband is very unlikely to work. Apparently whatever action you took caused Nextcloud wanting to send e-mail.

Post Reply