Error running Nextcloud on Clear Linux

I am trying to install Nextcloud on Clear Linux. This is more playing around to learn about Clear Linux than anything else.

I can get to the Nextcloud installation wizard page and it will let me enter the admin user and database info and will accept it. However, when I try to do anything after that I get the “Internal Server Error, the server was unable to complete your request.” page. When I check the file system Nextcloud was install; i.e. the config.php was updated, there is data in the data directory, and most importantly there was a nextcloud.log. Blow is the log:

{"reqId":"4A0ilJ4b7bubr7tOj1GN","level":3,"time":"2021-06-06T18:06:02+00:00","remoteAddr":"*** sensitive parameter replaced ***","user":"--","app":"PHP","method":"GET","url":"/cron.php","message":{"Exception":"Error","Message":"filesize(): stat failed for /var/lib/nextcloud/data/flow.log at /var/www/nextcloud/lib/public/Log/RotationTrait.php#62","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[2,"filesize(): stat failed for /var/lib/nextcloud/data/flow.log","/var/www/nextcloud/lib/public/Log/RotationTrait.php",62]},{"file":"/var/www/nextcloud/lib/public/Log/RotationTrait.php","line":62,"function":"filesize","args":["/var/lib/nextcloud/data/flow.log"]},{"file":"/var/www/nextcloud/apps/workflowengine/lib/BackgroundJobs/Rotate.php","line":49,"function":"shouldRotateBySize","class":"OCA\\WorkflowEngine\\BackgroundJobs\\Rotate","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/BackgroundJob/Job.php","line":52,"function":"run","class":"OCA\\WorkflowEngine\\BackgroundJobs\\Rotate","type":"->","args":[null]},{"file":"/var/www/nextcloud/lib/private/BackgroundJob/TimedJob.php","line":59,"function":"execute","class":"OC\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"/var/www/nextcloud/cron.php","line":150,"function":"execute","class":"OC\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36","version":"21.0.2.1"} {"reqId":"DTXtSfQ3m8Ricw0DrvAl","level":3,"time":"2021-06-06T18:06:13+00:00","remoteAddr":"*** sensitive parameter replaced ***","user":"morgan","app":"no app in context","method":"POST","url":"/login","message":"Something is wrong with your openssl setup: error:02001002:system library:fopen:No such file or directory, error:2006D080:BIO routines:BIO_new_file:no such file, error:0E064002:configuration file routines:CONF_load:system lib, error:02001002:system library:fopen:No such file or directory, error:2006D080:BIO routines:BIO_new_file:no such file, error:0E064002:configuration file routines:CONF_load:system lib","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36","version":"21.0.2.1"} {"reqId":"DTXtSfQ3m8Ricw0DrvAl","level":3,"time":"2021-06-06T18:06:13+00:00","remoteAddr":"*** sensitive parameter replaced ***","user":"morgan","app":"index","method":"POST","url":"/login","message":{"Exception":"RuntimeException","Message":"OpenSSL reported a problem","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php","line":88,"function":"newToken","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***","*** sensitive parameter replaced ***","*** sensitive parameter replaced ***","*** sensitive parameter replaced ***","*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Authentication/Token/Manager.php","line":71,"function":"generateToken","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":689,"function":"generateToken","class":"OC\\Authentication\\Token\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/CreateSessionTokenCommand.php","line":68,"function":"createSessionToken","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\\Authentication\\Login\\CreateSessionTokenCommand","type":"->","args":[{"__class__":"OC\\Authentication\\Login\\LoginData"}]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/CompleteLoginCommand.php","line":48,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->","args":[{"__class__":"OC\\Authentication\\Login\\LoginData"}]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\\Authentication\\Login\\CompleteLoginCommand","type":"->","args":[{"__class__":"OC\\Authentication\\Login\\LoginData"}]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/LoggedInCheckCommand.php","line":60,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->","args":[{"__class__":"OC\\Authentication\\Login\\LoginData"}]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\\Authentication\\Login\\LoggedInCheckCommand","type":"->","args":[{"__class__":"OC\\Authentication\\Login\\LoginData"}]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/EmailLoginCommand.php","line":58,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->","args":[{"__class__":"OC\\Authentication\\Login\\LoginData"}]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\\Authentication\\Login\\EmailLoginCommand","type":"->","args":[{"__class__":"OC\\Authentication\\Login\\LoginData"}]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/UidLoginCommand.php","line":54,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->","args":[{"__class__":"OC\\Authentication\\Login\\LoginData"}]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\\Authentication\\Login\\UidLoginCommand","type":"->","args":[{"__class__":"OC\\Authentication\\Login\\LoginData"}]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/UserDisabledCheckCommand.php","line":58,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->","args":[{"__class__":"OC\\Authentication\\Login\\LoginData"}]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\\Authentication\\Login\\UserDisabledCheckCommand","type":"->","args":[{"__class__":"OC\\Authentication\\Login\\LoginData"}]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/PreLoginHookCommand.php","line":53,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->","args":[{"__class__":"OC\\Authentication\\Login\\LoginData"}]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/Chain.php","line":108,"function":"process","class":"OC\\Authentication\\Login\\PreLoginHookCommand","type":"->","args":[{"__class__":"OC\\Authentication\\Login\\LoginData"}]},{"file":"/var/www/nextcloud/core/Controller/LoginController.php","line":310,"function":"process","class":"OC\\Authentication\\Login\\Chain","type":"->","args":[{"__class__":"OC\\Authentication\\Login\\LoginData"}]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"tryLogin","class":"OC\\Core\\Controller\\LoginController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\LoginController"},"tryLogin"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\LoginController"},"tryLogin"]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Core\\Controller\\LoginController","tryLogin",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"core.login.tryLogin"}]},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/login"]},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php","Line":373,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36","version":"21.0.2.1"}

There is a lot in the log, but I am guessing the issue has something to do with openssl as is show up a few times e.g.:

"Something is wrong with your openssl setup: error:02001002:system library:fopen:No such file or directory, error:2006D080:BIO routines:BIO_new_file:no such file, error:0E064002:configuration file routines:CONF_load:system lib, error:02001002:system library:fopen:No such file or directory, error:2006D080:BIO routines:BIO_new_file:no such file, error:0E064002:configuration file routines:CONF_load:system lib"

I have checked and the openssl bundle is installed and the PHP openssl module was installed and enabled with the PHP-basic bundle. Is it possible there are some additional PHP or openssl configuration that is needed? Or is it another issue altogether?

try search this forum for “internal server error”

There is a number of modules required, even though the error looks mainly ssl related:
https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html

In /var/www/nextcloud, you can as well use the occ command to execute some administrative stuff. It would be interesting to see if that works (it’s then independent of the web server setup).

After reading this about a year ago, I try to stay clear of Clear…:slight_smile:

I have double check and all the need php module are installed, most where installed be default. It is PHP 8.0.6, however I have gotten Nextcloud working on other distros with this version.

I have tried the OCC command install and got similar results. The output was “Nextcloud was successfully installed” and saw the same updates to the file system. However, I can’t log into the web page. I get the page to enter my username and password. Once I try to log in, I get the Internal Server Error page and the same info in the log. It seems like the issue is around authenticating the user.

Not sure if I would recommend Clear Linux for daily or production uses. But it feels fast and has some interesting ideas. I do like its package manager and the idea of a stateless OS, However I can see why some would not. I would say its worth playing around with. My biggest complaint is I can’t get Nextcloud to run on it and it seem like Intel is no longer put as much resources behind it as they once did.