[Support] Linuxserver.io - Nextcloud


Recommended Posts

I'm trying to setup sending notifications via email and I'm having some trouble. When I try setting it up using 'PHP' as the send mode I get the following error:
 

A problem occurred while sending the email. Please revise your settings. (Error: Email could not be sent. Check your mail server log)

Then when I try using SMTP with credentials I know are working with unraid I get this error:

A problem occurred while sending the email. Please revise your settings. (Error: Connection could not be established with host smtp.office365.com [ #0])

Also when I go into the command line of the nextcloud container and execute sendmail - I get the following error:

root@9a505c8431e9:/$ sendmail -
sendmail: can't connect to remote host (127.0.0.1): Connection refused

This is also true if I try sending an email via php:

root@9a505c8431e9:/$ php -a
Interactive shell

php > mail('[email protected]', 'test', 'test 123');
sendmail: can't connect to remote host (127.0.0.1): Connection refused

The nexcloud log files did not contain any additional information even after adding 'mail_smtpdebug' => true, in the config.php file. I'm kind of stuck and hoping someone here can point me in the right direction.

Link to comment
4 hours ago, greatwitenorth said:

I'm trying to setup sending notifications via email and I'm having some trouble. When I try setting it up using 'PHP' as the send mode I get the following error:
 


A problem occurred while sending the email. Please revise your settings. (Error: Email could not be sent. Check your mail server log)

Then when I try using SMTP with credentials I know are working with unraid I get this error:


A problem occurred while sending the email. Please revise your settings. (Error: Connection could not be established with host smtp.office365.com [ #0])

Also when I go into the command line of the nextcloud container and execute sendmail - I get the following error:


root@9a505c8431e9:/$ sendmail -
sendmail: can't connect to remote host (127.0.0.1): Connection refused

This is also true if I try sending an email via php:


root@9a505c8431e9:/$ php -a
Interactive shell

php > mail('[email protected]', 'test', 'test 123');
sendmail: can't connect to remote host (127.0.0.1): Connection refused

The nexcloud log files did not contain any additional information even after adding 'mail_smtpdebug' => true, in the config.php file. I'm kind of stuck and hoping someone here can point me in the right direction.

 

Works out the box for me....

 

 

screenshot.png

Link to comment
On 5/22/2018 at 5:56 PM, gareth_iowc said:

ah ok.

 

sorry where would these be found? 

 

 

 

Depends on where you keep your app directory but for me it is

/mnt/user/appdata/nextcloud/www/nextcloud

 

Edited by pinion
  • Like 1
Link to comment

Hi,

 

I'm following the guide here: https://blog.linuxserver.io/2016/07/28/installing-nextcloud-on-unraid/

 

I've setup mariaDB, but I didn't have to make the changes to the custom.cnf file because "mixed" was already set. So I made no changes to this file. When I go to create the nextcloud admin user I get the following error:

 

Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'root'@'172.17.0.1' (using password: YES)

 

The guide seems very straightforward and I can't see what I did wrong. Any thoughts?

Link to comment
12 hours ago, jdubbs23 said:

Hi,

 

I'm following the guide here: https://blog.linuxserver.io/2016/07/28/installing-nextcloud-on-unraid/

 

I've setup mariaDB, but I didn't have to make the changes to the custom.cnf file because "mixed" was already set. So I made no changes to this file. When I go to create the nextcloud admin user I get the following error:

 

Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'root'@'172.17.0.1' (using password: YES)

 

The guide seems very straightforward and I can't see what I did wrong. Any thoughts?

 

Nevermind. Read back several pages and found that it was likely due to setting a different (or no) password when I created the mariaDB Docker. I nuked the mariaDB and nextcloud dockers and made sure to set a mariaDB password when I first installed the docker. Then everything went correctly when creating the admin user in nextcloud's web interface.

Link to comment
On 5/23/2018 at 1:58 PM, CHBMB said:

Works out the box for me....

Is there anywhere else I can loog for log files? I've tried /var/log/nginx/error.log, /config/log/nginx/error.log, /config/log/php/error.log and none of them seem to have any output. Maybe you have some suggested ideas for debugging? I tried telnet, but noticed it's not installed. The only thing I've changed from the inital setup is the port mapping (goes from 443 to 5050 on the host).

Link to comment
Is there anywhere else I can loog for log files? I've tried /var/log/nginx/error.log, /config/log/nginx/error.log, /config/log/php/error.log and none of them seem to have any output. Maybe you have some suggested ideas for debugging? I tried telnet, but noticed it's not installed. The only thing I've changed from the inital setup is the port mapping (goes from 443 to 5050 on the host).
Try using it with a different email provider to check. I know Gmail you have to turn off secure settings to enable things like Nextcloud to utilise the SMTP servers and wondering if it's a similar issue
Link to comment

I'm having problems downloading larger files than 1GB and have found the reason for the problem:

Quote

WARNING: [pool www] server reached pm.max_children setting (5), consider raising it

I have found the solution to the problem but I have no clue where to adjust it (https://serverfault.com/questions/479443/php5-fpm-server-reached-pm-max-children). I am running letsencrypt and nextcloud in a docker. The error shows up in the nextcloud docker image so I'm guessing it should be there.

Thanks for any help

Link to comment

Can I set somehow a spindown timer for this docker? The drives containing Nextcloud Data are spun up all the time. Did I miss a setting?

 

edit: found that nextcloud runs a cob every 15minutes which access the HDD is there a way to disable or even delay this one?

Edited by Aluavin
Link to comment
On 5/31/2018 at 9:45 AM, CHBMB said:

Try using it with a different email provider to check. I know Gmail you have to turn off secure settings to enable things like Nextcloud to utilise the SMTP servers and wondering if it's a similar issue

 

I tried also with MS Office 365 and I got the following error:
A problem occurred while sending the email. Please revise your settings. (Error: Connection could not be established with host smtp.office365.com [ #0])

A problem occurred while sending the email. Please revise your settings. (Error: Connection could not be established with host smtp.office365.com [ #0])

The weird thing is that I can ping it just fine from inside the nextcloud container. Also when I try to run sendmail from the container I immediately see the error:

sendmail: can't connect to remote host (127.0.0.1): Connection refused

which is leading me to believe that there some kind of configuration issue in the container. I'm able to use sendmail from the unraid command line just fine though.

Link to comment
5 minutes ago, greatwitenorth said:

 

I tried also with MS Office 365 and I got the following error:
A problem occurred while sending the email. Please revise your settings. (Error: Connection could not be established with host smtp.office365.com [ #0])


A problem occurred while sending the email. Please revise your settings. (Error: Connection could not be established with host smtp.office365.com [ #0])

The weird thing is that I can ping it just fine from inside the nextcloud container. Also when I try to run sendmail from the container I immediately see the error:


sendmail: can't connect to remote host (127.0.0.1): Connection refused

which is leading me to believe that there some kind of configuration issue in the container. I'm able to use sendmail from the unraid command line just fine though.

 

You got a VPN or anything?

Link to comment

There's a link in the docker FAQ or in my signature if you have signatures enabled in the forum. But that screenshot looks like it'll tell me what I need to know.

Just try using /mnt/cache/appdata/nextcloud rather than /mnt/user/appdata/Nextcloud

Long shot, but that sometimes fixes weird issues.

Link to comment
40 minutes ago, CHBMB said:

There's a link in the docker FAQ or in my signature if you have signatures enabled in the forum. But that screenshot looks like it'll tell me what I need to know.

Just try using /mnt/cache/appdata/nextcloud rather than /mnt/user/appdata/Nextcloud

Long shot, but that sometimes fixes weird issues.

 

Here's the docker run command:

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='nextcloud' --net='bridge' -e TZ="America/Chicago" -e HOST_OS="unRAID" -e 'PUID'='99' -e 'PGID'='100' -p '5050:443/tcp' -v '/mnt/user/nextcloud/':'/data':'rw' -v '/mnt/user/media/':'/data/media':'rw' -v '/mnt/user/appdata/nextcloud':'/config':'rw' 'linuxserver/nextcloud' 
250329965a71ed8d09b073e5cee8915dbc0e3dc8d54f77d14e10bcc00767dc2f

I'll also try switching to the cache path and see if that helps and report back.

Edited by greatwitenorth
Link to comment
25 minutes ago, greatwitenorth said:

I ended up not being able to move everything to the cache folder (bunch of about "mv: cannot remove"). So I wasn't able to see if using the cache dir would help fix the issue

 

Your appdata should already be on the cache drive......

Link to comment
On 5/31/2018 at 9:45 AM, CHBMB said:
On 5/31/2018 at 9:38 AM, greatwitenorth said:
Is there anywhere else I can loog for log files? I've tried /var/log/nginx/error.log, /config/log/nginx/error.log, /config/log/php/error.log and none of them seem to have any output. Maybe you have some suggested ideas for debugging? I tried telnet, but noticed it's not installed. The only thing I've changed from the inital setup is the port mapping (goes from 443 to 5050 on the host).

Try using it with a different email provider to check. I know Gmail you have to turn off secure settings to enable things like Nextcloud to utilise the SMTP servers and wondering if it's a similar issue

So after days of trying to figure out why email isn't working I found that the issue is actually the fact that SSL/TLS are grouped into the same dropdown in nextcloud. MS Office uses tls on port 587, but when you select SSL/TLS it writes 'ssl' in the config file. Changing to STARTTLS fixes this. It's a little unintuitive since all the smtp info for Office says to use TLS for port 587 (not STARTTLS, TBH not sure of the difference).

 

I still cannot get just the plain php mail option to work...but we'll be using smtp anyways...so not a big deal.

 

@CHBMB thanks for your help trying to debug this!

Edited by greatwitenorth
Link to comment

I have just upgraded to 13.0.4 using @CHBMB 's instruction linked on the first post. It smoothly upgraded without any problem. Then, upgraded also the nextcloud docker.

 

Nextcloud works mostly. But, all the applications groups (Files, Office & text, Tools etc.) are empty with "No apps found for your version".  On top of these, Collabora is also not working.

 

Hard to believe that all the applications are not for version 13.0.4. Must be some problem somewhere. My config.php:

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '10.0.0.14',
    'port' => 6379,
    'timeout' => 0.0,
  ),
  'datadirectory' => '/data',
  'instanceid' => 'oc2rltxwyc3e2',
  'passwordsalt' => 'Rga8XVYOeKcGjCStdrLxejxvkf60ilQV',
  'secret' => 'ZOTy1DNhQrhfgTAENXT/w5V/IyWutbLaQjd7fq9UkFx7SWSaws',
  'trusted_domains' =>
  array (
    0 => '10.0.0.14:444',
    1 => 'cloud.example.com',
  ),
  'overwrite.cli.url' => 'https://cloud.example.com',
  'overwritehost' => 'cloud.example.com',
  'overwriteprotocol' => 'https',
  'dbtype' => 'mysql',
  'version' => '13.0.4.0',
  'dbname' => 'nextcloud',
  'dbhost' => '10.0.0.14:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxxx',
  'dbpassword' => 'xxxx',
  'installed' => true,
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpsecure' => 'ssl',
  'mail_from_address' => 'nc',
  'mail_domain' => 'example.com',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'mail.xxxx.com',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'xxxx',
  'mail_smtppassword' => 'xxxx',
  'loglevel' => 2,
  'theme' => '',
  'updater.release.channel' => 'stable',
);

I would appreciate any idea. Thanks.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.