bitnami / vms

Bitnami VMs
https://bitnami.com
Other
203 stars 43 forks source link

Bitnami Ghost - failed to run module scripts-user #1352

Closed femionnet closed 6 months ago

femionnet commented 8 months ago

Platform

Virtual Machine

bndiagnostic ID know more about bndiagnostic ID

Local

bndiagnostic output

No response

bndiagnostic was not useful. Could you please tell us why?

It is a local install without Internet

Describe your issue as much as you can

Hello,

Please, I encounter this error everytime I try to use Bitnami Ghost 5-5.71.2 & 5-5.74.4 both on VMware and VirtualBox.

On starting the VM after installation, I see the notice: !!!!! IMPORTANT: An error occurred when initializing this installation !!!!!

Please check the initialization logs to get more information:

sudo cat /var/log/cloud-init-output.log

Please try and re-create this installation. If that does not fix your issue, open a Bitnami support ticket at https://github.com/bitnami/vms/issues.

Here is the output:

bitnami@debian:~$ sudo cat /var/log/cloud-init-output.log
Cloud-init v. 20.4.1 running 'init-local' at Fri, 12 Jan 2024 15:15:57 +0000. Up 5.00 seconds.
2024-01-12 15:15:57,584 - DataSourceOVF.py[WARNING]: vmware-rpctool exited with code 255
Cloud-init v. 20.4.1 running 'init' at Fri, 12 Jan 2024 15:15:58 +0000. Up 5.86 seconds.
ci-info: ++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++
ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
ci-info: | Device |  Up  |           Address           |      Mask     | Scope  |     Hw-Address    |
ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
ci-info: | enp0s3 | True |        192.168.56.106       | 255.255.255.0 | global | 08:00:27:5d:79:39 |
ci-info: | enp0s3 | True | fe80::a00:27ff:fe5d:7939/64 |       .       |  link  | 08:00:27:5d:79:39 |
ci-info: |   lo   | True |          127.0.0.1          |   255.0.0.0   |  host  |         .         |
ci-info: |   lo   | True |           ::1/128           |       .       |  host  |         .         |
ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
ci-info: +++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++
ci-info: +-------+--------------+---------+---------------+-----------+-------+
ci-info: | Route | Destination  | Gateway |    Genmask    | Interface | Flags |
ci-info: +-------+--------------+---------+---------------+-----------+-------+
ci-info: |   0   | 192.168.56.0 | 0.0.0.0 | 255.255.255.0 |   enp0s3  |   U   |
ci-info: +-------+--------------+---------+---------------+-----------+-------+
ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
ci-info: +-------+-------------+---------+-----------+-------+
ci-info: | Route | Destination | Gateway | Interface | Flags |
ci-info: +-------+-------------+---------+-----------+-------+
ci-info: |   1   |  fe80::/64  |    ::   |   enp0s3  |   U   |
ci-info: |   3   |  multicast  |    ::   |   enp0s3  |   U   |
ci-info: +-------+-------------+---------+-----------+-------+
2024-01-12 15:15:58,442 - DataSourceOVF.py[WARNING]: vmware-rpctool exited with code 255
Generating public/private rsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_rsa_key
Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub
The key fingerprint is:
SHA256:6ji3ogUr/nFYT++8h5TOJZJDclXKMvejsPUKWTQo9Lk root@debian
The key's randomart image is:
+---[RSA 3072]----+
|     .    ..     |
|    . . +..      |
|     . *.*       |
|     ..o* o      |
|  .  .+ESo.o     |
|   oo o=B+o..    |
|. .o...=*o+.     |
|.. .=o. ++..     |
| .oo.+o. =o      |
+----[SHA256]-----+
Generating public/private dsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_dsa_key
Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub
The key fingerprint is:
SHA256:JTIspA0G4TsytMQOe1d7ulgSaMDz8vKvw3RIPrjeeZM root@debian
The key's randomart image is:
+---[DSA 1024]----+
|ooo .            |
|+. = .           |
|oB. o = . .      |
|=o=o o + o       |
|+*B.+ . S        |
|.=+* o o         |
| .+.+ +          |
| .+o.E .         |
|.. =*.o          |
+----[SHA256]-----+
Generating public/private ecdsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key
Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub
The key fingerprint is:
SHA256:XpyBfC83FttpfViXCcHp3UaIOsp2/jCl8skVnOXPGdg root@debian
The key's randomart image is:
+---[ECDSA 256]---+
|            .+o. |
|       . .  .oo +|
|        o o.o o++|
|         oo= Oo*+|
|       .S.=.@.*Eo|
|       .+..* + o+|
|       .oo+ .  .o|
|         +.=     |
|          +..    |
+----[SHA256]-----+
Generating public/private ed25519 key pair.
Your identification has been saved in /etc/ssh/ssh_host_ed25519_key
Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub
The key fingerprint is:
SHA256:JMQn6H4n3zjL+9k12MM4y6a7I64BHvnQk1blMKzQT0c root@debian
The key's randomart image is:
+--[ED25519 256]--+
|     +..o.E      |
|    o.+ +=.      |
|   . ..*o..      |
|    .o.=.        |
|   .= = S        |
|   ..*o..    =   |
|    ..o+ o  + *  |
|       o= o+.+ o |
|      .o=***+    |
+----[SHA256]-----+
Cloud-init v. 20.4.1 running 'modules:config' at Fri, 12 Jan 2024 15:16:00 +0000. Up 7.81 seconds.
Cloud-init v. 20.4.1 running 'modules:final' at Fri, 12 Jan 2024 15:16:01 +0000. Up 8.94 seconds.
 15:16:01.72 WARN  ==> The database_password option was not provided with user-data, a random value will be generated for it
 15:16:01.77 WARN  ==> The bitnami_application_password option was not provided with user-data, a random value will be generated for it
 15:16:01.87 INFO  ==> Blocking incoming connections to ports (while the machine is being initialized)
 15:16:01.96 INFO  ==> Enabling all services
Created symlink /etc/systemd/system/bitnami.service.wants/bitnami.apache.service → /etc/systemd/system/bitnami.apache.service.
Created symlink /etc/systemd/system/multi-user.target.wants/bitnami-config-hostname.service → /etc/systemd/system/bitnami-config-hostname.service.
Created symlink /etc/systemd/system/multi-user.target.wants/bitnami-config-resize.service → /etc/systemd/system/bitnami-config-resize.service.
Created symlink /etc/systemd/system/bitnami.service.wants/bitnami.ghost.service → /etc/systemd/system/bitnami.ghost.service.
Created symlink /etc/systemd/system/bitnami.service.wants/bitnami.mysql.service → /etc/systemd/system/bitnami.mysql.service.
Created symlink /etc/systemd/system/multi-user.target.wants/bitnami.service → /etc/systemd/system/bitnami.service.
 15:16:02.27 INFO  ==> No user-data was provided in the deployment template
RTNETLINK answers: Network is unreachable
 15:16:02.36 INFO  ==> Adding login screen
mysql 15:16:02.41 INFO  ==> Validating settings in MYSQL_*/MARIADB_* env vars
mysql 15:16:02.45 INFO  ==> Initializing mysql database
mysql 15:16:02.48 INFO  ==> Updating 'my.cnf' with custom configuration
mysql 15:16:02.50 INFO  ==> Setting user option
mysql 15:16:02.53 INFO  ==> Setting bind_address option
mysql 15:16:02.54 INFO  ==> Setting slow_query_log option
mysql 15:16:02.55 INFO  ==> Setting long_query_time option
mysql 15:16:02.57 INFO  ==> Installing database
mysql 15:16:10.37 INFO  ==> Starting mysql in background
mysql 15:16:12.51 INFO  ==> Configuring authentication
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql 15:16:12.76 INFO  ==> Running mysql_upgrade
mysql 15:16:12.77 INFO  ==> Stopping mysql
mysql 15:16:14.87 INFO  ==> Starting mysql in background
find: ‘/docker-entrypoint-initdb.d/’: No such file or directory
find: ‘/docker-entrypoint-startdb.d/’: No such file or directory
mysql 15:16:25.04 INFO  ==> Stopping mysql
mysql 15:16:27.16 INFO  ==> Starting MySQL service
apache 15:16:27.27 INFO  ==> Generating sample certificates
Generating RSA private key, 4096 bit long modulus (2 primes)
........................++++
...............................................................................................................++++
e is 65537 (0x010001)
Signature ok
subject=CN = example.com
Getting Private key
apache 15:16:28.92 INFO  ==> Configuring Apache ServerTokens directive
ghost 15:16:29.00 INFO  ==> Ensuring Ghost directories exist
ghost 15:16:29.03 INFO  ==> Trying to connect to the database server
ghost 15:16:29.07 INFO  ==> Configuring database
ghost 15:16:29.16 INFO  ==> Setting up Ghost
xargs: bash: exited with status 255; aborting
 15:16:36.55 INFO  ==> Appending error message to motd banner
xargs: bash: exited with status 255; aborting
2024-01-12 15:16:36,592 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
2024-01-12 15:16:36,601 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_user.py'>) failed
ci-info: no authorized SSH keys fingerprints found for user bitnami.
Cloud-init v. 20.4.1 finished at Fri, 12 Jan 2024 15:16:36 +0000. Datasource DataSourceNone.  Up 44.27 seconds
2024-01-12 15:16:36,739 - cc_final_message.py[WARNING]: Used fallback datasource
bitnami@debian:~$
gongomgra commented 7 months ago

Hi @femionnet,

Thanks for using Bitnami. Can you provide the virtual machine with the custom script below?

#!/bin/bash

export BITNAMI_DEBUG=true

We would like to get more information on what's failing at this point in the initialization process

apache 15:16:28.92 INFO  ==> Configuring Apache ServerTokens directive
ghost 15:16:29.00 INFO  ==> Ensuring Ghost directories exist
ghost 15:16:29.03 INFO  ==> Trying to connect to the database server
ghost 15:16:29.07 INFO  ==> Configuring database
ghost 15:16:29.16 INFO  ==> Setting up Ghost
xargs: bash: exited with status 255; aborting
 15:16:36.55 INFO  ==> Appending error message to motd banner
xargs: bash: exited with status 255; aborting

You will need to use vSphere or VMware Fusion to create a new VM from a template as explained in our docs.

https://docs.bitnami.com/vmware-marketplace/get-started-vmware-marketplace/#step-2-launch-a-bitnami-wordpress-virtual-machine-from-the-template

Once you have created the new VM, start it and share the logs with us if it keeps failing.

femionnet commented 7 months ago

Thanks @gongomgra for your help. Please, is there any other way that I can feed that script in without vSphere or Fusion because I have neither of them? Or, if there's any other way to get debug info from the installation...

Thanks

gongomgra commented 7 months ago

Hi @femionnet,

I understood from your first message that you were using one of the VMware solutions.

Please, I encounter this error everytime I try to use Bitnami Ghost 5-5.71.2 & 5-5.74.4 both on VMware and VirtualBox.

Unfortunately, it is not possible to provide user-data in VirtualBox directly. Can you provide us with your memory and disk settings so we can try to reproduce it?

femionnet commented 7 months ago

Yes, I use VMware Workstation Player 17; I don't think it allows the use of scripts.

About my system memory and disk settings: I have an 8gb RAM, 256gb SSD core i5 Laptop.

When I import the OVA (Ghost VM), I don't change any of the dafault settings. I start the VM until it finishes with the error I have been getting.

Other times, I increased the VM RAM to 2gb (from 1gb) and set Network to Host-Only in Virtualbox 7 (NAT in VMware Workstation Player 17).

Please, to create my exact system condition for reproduction, turn off internet access while running the OVA. I use local (VM) virtual network without internet to install the appliance. I have successfully used it for VMs such as Wordpress, OwnCloud, Odoo and others, without any issue.

Please note, I have experienced similar error with other VMs. Infact, Ghost was not the first appliance to give that error. I also experienced it with TYPO3. However, the TYPO3 VM was usable even with the error.

Hope I have been able to provide sufficient information to aid your investigation of the issue.

Thanks

gongomgra commented 7 months ago

HI @femionnet,

I'm afraid I can't reproduce your issue on my side. I have just imported the OVA into VirtualBox and started it with all default settings. We have released a new version of the Ghost virtual machine (version 5.76.0-0). Can you give it a try?

Screenshot 2024-01-29 at 16 58 25

Screenshot 2024-01-29 at 16 59 37

femionnet commented 7 months ago

Hi @gongomgra

Even the new version shows the same error. I think there is something wrong somewhere.

I decided to try it on another PC, this time a Desktop PC, and it showed the same error.

Would you like me to upload a screen record of the VM bootup - from OVA import till error display?

gongomgra commented 7 months ago

Hi @femionnet,

I'm afraid I couldn't reproduce your issue on another laptop either. Please upload the OVA import and boot process so we can try to reproduce it on our side.

femionnet commented 7 months ago

Here is a link to the screen recording: https://disk.yandex.com/d/J3578KHrLXdbsQ

I was unable to attach here because of file size >10mb (~14mb).

I really hope the issue can be found and fixed.

Thanks @gongomgra

gongomgra commented 7 months ago

Hi @femionnet,

Thanks for the video. It is weird I can't reproduce the issue using default settings as you do. Can you recreate the machine with more memory and give it another try?

femionnet commented 7 months ago

Hi @gongomgra

I really wish to know what's different between your system and the two systems that I have used to try the VM here that's making it run fine for you.

As suggested, I increased the RAM to 4GB, but got same error.

I'm curious; what could make it say "no authorized SSH keys fingerprints found for user bitnami" at that stage of the VM initialization?

gongomgra commented 6 months ago

Hi @femionnet,

That is only a warning while the SSH service is being configured. That message appears because you are not providing any SSH key to be configured via user-data, but it is a warning you can totally skip.

About the initialization error, I'm afraid we couldn't reproduce your issue in a Windows machine with defaults memory settings, and trying to run the initialization script from the started machine may return other errors not really related to the real one (as other services were already initialized).

Do you get any initialization error with any other Bitnami OVA?

femionnet commented 6 months ago

@gongomgra

Yes, I have had the initialization error with Typo3 OVA before. At first, the VM was unusable similarly to Ghost (currently), but when I deleted and restarted a new one, it was usable - although there was the error. (Pls, see screenshots).

What system parameters/specs could make reproduction impossible as it is??

Typo3-1

Typo3-2
gongomgra commented 6 months ago

Hi @femionnet,

Sorry for the delay. I have been checking the whole thread again, and I see you mentioned you are using it with a non-internet connection.

It is a local install without Internet

Can you give it a try with internet connection?

femionnet commented 6 months ago

Wow @gongomgra,

So this has been it! It required an internet connection to successfully complete it's setup. I have always booted bitnami OVAs, first, without internet for my local testing; so it never occurred to me that lack of internet was the problem.

Also, the VM did not give ANY hint of the cause of error, or give warning that internet was needed to complete installation.

I guess in all your attempts to reproduce the issue, you had internet on.

Thank God this headache is over.

Thank you too, @gongomgra

gongomgra commented 6 months ago

Hi @femionnet,

Thanks for your message. I'm glad it worked for you after enabling Internet connectivity. Unfortunately, detecting these situations is difficult, so we can't provide any error message on the initialization logic at this moment. We are closing this ticket as solved.