[Nextcloudpi] Letsencrypt Error

Got Information from Letsencrypt

Your certificate (or certificates) for the names listed below will expire in
19 days (on 14 Dec 17 16:43 +0000). Please make sure to renew
your certificate before then, or visitors to your website will encounter errors.

Running NCP - v0.37.5

Running Command Line
sudo /etc/letsencrypt/certbot-auto renew

Receive Error
Illegal instruction
Error: couldn’t get currently installed version for /opt/eff.org/certbot/venv/bin/letsencrypt:
Illegal instruction

And trying to enter the “letsencrypt” Directory
/opt/eff.org/certbot/venv/bin# ls
activate certbot letsencrypt pip2.7 python-config
activate.csh easy_install pbr python unit2
activate.fish easy_install-2.7 pip python2 wheel
activate_this.py jws pip2 python2.7

cd letsencrypt
bash: cd: letsencrypt: Not a directory

Updated everytime with NCP, no manual Updates via Command Line, any hint what to do?

have you tried re-running letsencrypt from sudo nextcloudpi-config, or from ncp-web?

sudo nextcloudpi-config

Launching letsencrypt
Illegal instruction
Error: couldn’t get currently installed version for /opt/eff.org/certbot/venv/bin/letsencrypt:
Illegal instruction
Done. Press any key…

Wasnt a good idea, NCP and Nextcloud https Websites wont working :-/

wow, let’s do something

sudo rm /usr/local/etc/nextcloudpi-config.d/letsencrypt.sh
sudo rm -rf /etc/letsencrypt
sudo ncp-update

and then try again

then, please give me the output of sudo ncp-report. I would like to know what happened

And here is my Output…

sudo rm /usr/local/etc/nextcloudpi-config.d/letsencrypt.sh
sudo rm -rf /etc/letsencrypt
sudo ncp-update
Downloading updates
Performing updates
Installing letsencrypt
Get:1 http://archive.raspberrypi.org/debian stretch InRelease [25.3 kB]
Hit:2 http://mirrordirector.raspbian.org/raspbian stretch InRelease
Get:3 http://archive.raspberrypi.org/debian stretch/main armhf Packages [123 kB]
Fetched 149 kB in 3s (45.4 kB/s)
Reading package lists… Done
Reading package lists… Done
Building dependency tree
Reading state information… Done
python2.7-minimal is already the newest version (2.7.13-2).
python2.7-minimal set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
Cloning into ‘letsencrypt’…
remote: Counting objects: 50746, done.
remote: Compressing objects: 100% (140/140), done.
remote: Total 50746 (delta 109), reused 104 (delta 54), pack-reused 50552
Receiving objects: 100% (50746/50746), 15.86 MiB | 4.35 MiB/s, done.
Resolving deltas: 100% (36326/36326), done.
Illegal instruction
Error: couldn’t get currently installed version for /opt/eff.org/certbot/venv/bin/letsencrypt:
Illegal instruction
NextCloudPi updated to version v0.37.5

sudo ncp-report
<–! Paste this in GitHub report -->

NextCloudPi diagnostics

sudo: /var/www/nextcloud/occ: command not found




NextCloudPi version  v0.37.5
NextCloudPi image    NextCloudPi_09-12-17
distribution         Raspbian GNU/Linux 9 \n \l
automount            no
USB devices          none
datadir              /var/www/nextcloud/data
data in SD           yes
data filesystem      ext2/ext3
data disk usage      3.0G/15G
rootfs usage         3.0G/15G
Nextcloud check      error
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
Postfix service      up
internet check       ok
port check 80        open
port check 443       open
IP                   XXX
gateway              YYY
interface            eth0
certificates         none
certs due            none
NAT loopback         no
uptime               2days

Nextcloud configuration

sudo: /var/www/nextcloud/occ: command not found

HTTPd logs

[Mon Nov 27 06:25:03.140607 2017] [ssl:warn] [pid 820:tid 1992417280] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Mon Nov 27 06:25:04.001164 2017] [mpm_event:notice] [pid 820:tid 1992417280] AH00489: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured -- resuming normal operations
[Mon Nov 27 06:25:04.001282 2017] [core:notice] [pid 820:tid 1992417280] AH00094: Command line: '/usr/sbin/apache2'

Database logs


Nextcloud logs

{"reqId":"WhIdMH8AAQEAADaGCtwAAABU","level":2,"time":"2017-11-20T00:09:20+00:00","remoteAddr":"95.252.237.69","user":"--","app":"core","method":"POST","url":"\/","message":"Trusted domain error. \"95.252.237.69\" tried to access using \"92.228.69.153\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"12.0.3.3"}
{"reqId":"WhIdqH8AAQEAADaFOjMAAAAQ","level":2,"time":"2017-11-20T00:11:20+00:00","remoteAddr":"95.252.237.69","user":"--","app":"core","method":"POST","url":"\/","message":"Trusted domain error. \"95.252.237.69\" tried to access using \"92.228.69.153\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"12.0.3.3"}
{"reqId":"WhIeIX8AAQEAADaFOjQAAAAG","level":2,"time":"2017-11-20T00:13:21+00:00","remoteAddr":"95.252.237.69","user":"--","app":"core","method":"POST","url":"\/","message":"Trusted domain error. \"95.252.237.69\" tried to access using \"92.228.69.153\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"12.0.3.3"}
{"reqId":"WhIemX8AAQEAADaGCt0AAABV","level":2,"time":"2017-11-20T00:15:22+00:00","remoteAddr":"95.252.237.69","user":"--","app":"core","method":"POST","url":"\/","message":"Trusted domain error. \"95.252.237.69\" tried to access using \"92.228.69.153\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"12.0.3.3"}
{"reqId":"WhIfEn8AAQEAADaGCt4AAABW","level":2,"time":"2017-11-20T00:17:22+00:00","remoteAddr":"95.252.237.69","user":"--","app":"core","method":"POST","url":"\/","message":"Trusted domain error. \"95.252.237.69\" tried to access using \"92.228.69.153\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"12.0.3.3"}
{"reqId":"WhIfi38AAQEAADaGCt8AAABY","level":2,"time":"2017-11-20T00:19:23+00:00","remoteAddr":"95.252.237.69","user":"--","app":"core","method":"POST","url":"\/","message":"Trusted domain error. \"95.252.237.69\" tried to access using \"92.228.69.153\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"12.0.3.3"}
{"reqId":"WhIgA38AAQEAADaGCuAAAABD","level":2,"time":"2017-11-20T00:21:23+00:00","remoteAddr":"95.252.237.69","user":"--","app":"core","method":"POST","url":"\/","message":"Trusted domain error. \"95.252.237.69\" tried to access using \"92.228.69.153\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"12.0.3.3"}
{"reqId":"WhIgfH8AAQEAADaGCuEAAABX","level":2,"time":"2017-11-20T00:23:24+00:00","remoteAddr":"95.252.237.69","user":"--","app":"core","method":"POST","url":"\/","message":"Trusted domain error. \"95.252.237.69\" tried to access using \"92.228.69.153\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"12.0.3.3"}
{"reqId":"WhIg9X8AAQEAADaGCuIAAABE","level":2,"time":"2017-11-20T00:25:25+00:00","remoteAddr":"95.252.237.69","user":"--","app":"core","method":"POST","url":"\/","message":"Trusted domain error. \"95.252.237.69\" tried to access using \"92.228.69.153\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"12.0.3.3"}
{"reqId":"WhIhbX8AAQEAADaGCuMAAABA","level":2,"time":"2017-11-20T00:27:25+00:00","remoteAddr":"95.252.237.69","user":"--","app":"core","method":"POST","url":"\/","message":"Trusted domain error. \"95.252.237.69\" tried to access using \"92.228.69.153\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"12.0.3.3"}
{"reqId":"WhIh5n8AAQEAADaGCuQAAABG","level":2,"time":"2017-11-20T00:29:26+00:00","remoteAddr":"95.252.237.69","user":"--","app":"core","method":"POST","url":"\/","message":"Trusted domain error. \"95.252.237.69\" tried to access using \"92.228.69.153\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"12.0.3.3"}
{"reqId":"WhIiX38AAQEAADaGCuUAAABB","level":2,"time":"2017-11-20T00:31:27+00:00","remoteAddr":"95.252.237.69","user":"--","app":"core","method":"POST","url":"\/","message":"Trusted domain error. \"95.252.237.69\" tried to access using \"92.228.69.153\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"12.0.3.3"}
{"reqId":"WhIi138AAQEAADaGCuYAAABC","level":2,"time":"2017-11-20T00:33:27+00:00","remoteAddr":"95.252.237.69","user":"--","app":"core","method":"POST","url":"\/","message":"Trusted domain error. \"95.252.237.69\" tried to access using \"92.228.69.153\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"12.0.3.3"}
{"reqId":"WhlVUn8AAQEAAANgXpcAAABY","level":2,"time":"2017-11-25T11:34:42+00:00","remoteAddr":"184.105.247.196","user":"--","app":"core","method":"GET","url":"\/","message":"Trusted domain error. \"184.105.247.196\" tried to access using \"78.52.179.2\" as host.","userAgent":"--","version":"12.0.3.3"}
{"reqId":"WhpiJn8AAQEAABctBDUAAAAO","level":2,"time":"2017-11-26T06:41:42+00:00","remoteAddr":"95.156.251.10","user":"--","app":"core","method":"GET","url":"\/","message":"Trusted domain error. \"95.156.251.10\" tried to access using \"77.189.159.41\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 6.3; Trident\/7.0; rv:11.0) like Gecko","version":"12.0.3.3"}
{"reqId":"Whpoo38AAQEAABctBDkAAAAT","level":2,"time":"2017-11-26T07:09:23+00:00","remoteAddr":"139.162.116.133","user":"--","app":"core","method":"GET","url":"\/","message":"Trusted domain error. \"139.162.116.133\" tried to access using \"77.189.159.41\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/50.0.2661.102 Safari\/537.36","version":"12.0.3.3"}
{"reqId":"WhrDTX8AAQEAABcuImYAAABD","level":3,"time":"2017-11-26T13:36:13+00:00","remoteAddr":"46.17.46.77","user":"--","app":"PHP","method":"GET","url":"\/recordings\/index.php","message":"Exception: The requested uri(\/recordings\/index.php) cannot be processed by the script '\/core\/templates\/404.php') at \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Request.php#729","userAgent":"curl\/7.19.7 (x86_64-redhat-linux-gnu) libcurl\/7.19.7 NSS\/3.27.1 zlib\/1.2.3 libidn\/1.18 libssh2\/1.4.2","version":"12.0.3.3"}
{"reqId":"WhrDTX8AAQEAABcuImcAAABL","level":3,"time":"2017-11-26T13:36:13+00:00","remoteAddr":"46.17.46.77","user":"--","app":"PHP","method":"GET","url":"\/a2billing\/admin\/Public\/index.php","message":"Exception: The requested uri(\/a2billing\/admin\/Public\/index.php) cannot be processed by the script '\/core\/templates\/404.php') at \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Request.php#729","userAgent":"curl\/7.19.7 (x86_64-redhat-linux-gnu) libcurl\/7.19.7 NSS\/3.27.1 zlib\/1.2.3 libidn\/1.18 libssh2\/1.4.2","version":"12.0.3.3"}
{"reqId":"WhrFmn8AAQEAABctCDMAAAAO","level":2,"time":"2017-11-26T13:46:02+00:00","remoteAddr":"184.105.139.67","user":"--","app":"core","method":"GET","url":"\/","message":"Trusted domain error. \"184.105.139.67\" tried to access using \"77.189.159.41\" as host.","userAgent":"--","version":"12.0.3.3"}
{"reqId":"WhtOgH8AAQEAABctCkUAAAAP","level":3,"time":"2017-11-26T23:30:08+00:00","remoteAddr":"212.83.150.38","user":"--","app":"PHP","method":"GET","url":"\/a2billing\/common\/javascript\/misc.js","message":"Exception: The requested uri(\/a2billing\/common\/javascript\/misc.js) cannot be processed by the script '\/core\/templates\/404.php') at \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Request.php#729","userAgent":"python-requests\/2.18.4","version":"12.0.3.3"}

those exact commands worked for me, plus you have some weird stuff like the occ file not found… did you do any manual changes to your system?

I just added some NC Plugins via NC Webadmin and simple Cronjob for SD Card Backup to a Windows Share. Dont know what is OCC… I must Restore my SD Card to my latest Backup for a full Plugin Overview.

OK i restored my Installation and now These Plugins are activeted
Deleted files
Federation
File sharing
Log Reader
Log Reader
Monitoring
Nextcloud announcements
Notifications
Text editor
Theming
Update notification
Versions
Admin notifications
Calendar
Contacts
Group folders
Ransomware protection
Tasks

And the NC Config.php
<?php
$CONFIG = array (
‘passwordsalt’ => ‘XXXX’,
‘secret’ => ‘XXXX’,
‘trusted_domains’ =>
array (
0 => ‘localhost’,
1 => ‘123.123.123.123’,
2 => ‘my.tld.com’,
3 => ‘PiHostname’,
),
‘datadirectory’ => ‘/var/www/nextcloud/data’,
‘overwrite.cli.url’ => ‘https://my.tld.com’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘12.0.3.3’,
‘dbname’ => ‘nextcloud’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ‘ncadmin’,
‘dbpassword’ => ‘ncadmin’,
‘installed’ => true,
‘instanceid’ => ‘nextcloud’,
‘mail_smtpmode’ => ‘php’,
‘mail_smtpauthtype’ => ‘LOGIN’,
‘mail_from_address’ => ‘spam’,
‘mail_domain’ => ‘tld.com’,
‘overwriteprotocol’ => ‘https’,
‘loglevel’ => ‘2’,
‘log_type’ => ‘file’,
‘default_language’ => ‘de’,
‘knowledgebaseenabled’ => false,
‘enable_avatars’ => false,
‘allow_user_to_change_display_name’ => false,
‘updatechecker’ => true,
‘enable_previews’ => false,
‘maintenance’ => false,
‘theme’ => ‘’,
‘memcache.local’ => ‘\OC\Memcache\Redis’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘/var/run/redis/redis.sock’,
‘port’ => 0,
‘timeout’ => 0.0,
),
);

Hi,

I don’t think this has anything to do with your Nextcloud apps, or config. This has something to do with the packages in your system and letsencrypt. I suggest you just backup, burn the latest image to the SD card and then restore your Nextcloud instance.

It will probably be the fastest thing to do.

This is what i wanted to read :smiley: Well i give it a try at the Weekend. Only Backup the Data inside Nextcloud or also something from NCP?

run nc-backup to save a copy of your NC instance. You can restore it with nc-restore.

you can also export your NCP config with nc-export-ncp and import it later with nc-import-ncp

I’m about to upload the latter two, so they will be available for you by the weekend

Thank you very much :slight_smile: