You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by DL <do...@gmail.com> on 2021/09/20 04:08:43 UTC

Problem with Templates/ISO

Hello there,

I am a new CloutStack user and a new user on this mailing list. After
following the Quick Installation Guide, I ended up with empty Template/ISOs
when I attempted to create a VM instance.

If I go to Images/Templates, I got 500 Internal Server Error:

Request Failed (530)
DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
template_store_ref.id, template_store_ref.store_id,
template_store_ref.template_id, template_store_ref.store_role,
template_store_ref.created, template_store_ref.last_updated,
template_store_ref.download_pct, template_store_ref.size,
template_store_ref.physical_size, template_store_ref.download_state,
template_store_ref.local_path, template_store_ref.error_str,
template_store_ref.job_id, template_store_ref.install_path,
template_store_ref.url, template_store_ref.download_url,
template_store_ref.download_url_created, template_store_ref.is_copy,
template_store_ref.destroyed, template_store_ref.update_count,
template_store_ref.updated, template_store_ref.state,
template_store_ref.ref_cnt FROM template_store_ref WHERE
template_store_ref.template_id = 3 AND template_store_ref.download_state !=
'BYPASSED' AND template_store_ref.destroyed = 0 AND
template_store_ref.store_id IN )

Could someone help me fix this issue?

The quick installation guide I followed says it is for 4.15.2.0
installation. However, in the System Template Setup section, this command:
"""
/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt
-m /export/secondary -u
https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2
-h kvm -F
"""
seems to suggest that the process will download template vms for the
4.15.1.0 version?

Could this be the reason? Does anyone have an idea about when the Template
for the 4.15.2.0 version will be available?

Best regards,
Douglas

Re: Problem with Templates/ISO

Posted by Pearl d'Silva <pe...@shapeblue.com>.
Hi,

On the UI, on the Secondary Storage tab (Infrastructure -> Secondary Storage), do you see the store present / added there as well?

Thanks,
________________________________
From: DL <do...@gmail.com>
Sent: Monday, September 20, 2021 9:59 AM
To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
Subject: Re: Problem with Templates/ISO

Dear Pearl,

Thank you so much for getting back to me!
Yes, I have both the primary storage and secondary storage set up, in the
same way as the Quick Installation Guide.
They are at /export/primary and /export/secondary respectively.

The /export directory looks like this:
/export
├── primary
└── secondary
    └── template
        └── tmpl
            └── 1
                └── 3
                    ├── 1e8a80d3-da54-4a4c-a0fb-1a306b390a1c.qcow2
                    └── template.properties

Is this normal?

Best regards,
Douglas


On Mon, Sep 20, 2021 at 12:22 AM Pearl d'Silva <pe...@shapeblue.com>
wrote:

> Hi Douglas,
>
> Do you have at least one secondary store added to the zone. With respect
> to your query on the SystemVM template for 4.15.2, there is no change in
> the template, i.e., ACS 4.15.2 uses the same template as 4.15.1.
>
> Regards,
> Pearl
> ________________________________
> From: DL <do...@gmail.com>
> Sent: Monday, September 20, 2021 9:38 AM
> To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> Subject: Problem with Templates/ISO
>
> Hello there,
>
> I am a new CloutStack user and a new user on this mailing list. After
> following the Quick Installation Guide, I ended up with empty Template/ISOs
> when I attempted to create a VM instance.
>
> If I go to Images/Templates, I got 500 Internal Server Error:
>
> Request Failed (530)
> DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> template_store_ref.id, template_store_ref.store_id,
> template_store_ref.template_id, template_store_ref.store_role,
> template_store_ref.created, template_store_ref.last_updated,
> template_store_ref.download_pct, template_store_ref.size,
> template_store_ref.physical_size, template_store_ref.download_state,
> template_store_ref.local_path, template_store_ref.error_str,
> template_store_ref.job_id, template_store_ref.install_path,
> template_store_ref.url, template_store_ref.download_url,
> template_store_ref.download_url_created, template_store_ref.is_copy,
> template_store_ref.destroyed, template_store_ref.update_count,
> template_store_ref.updated, template_store_ref.state,
> template_store_ref.ref_cnt FROM template_store_ref WHERE
> template_store_ref.template_id = 3 AND template_store_ref.download_state !=
> 'BYPASSED' AND template_store_ref.destroyed = 0 AND
> template_store_ref.store_id IN )
>
> Could someone help me fix this issue?
>
> The quick installation guide I followed says it is for 4.15.2.0
> installation. However, in the System Template Setup section, this command:
> """
>
> /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt
> -m /export/secondary -u
>
> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2
> -h
> <https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2-h>
> kvm -F
> """
> seems to suggest that the process will download template vms for the
> 4.15.1.0 version?
>
> Could this be the reason? Does anyone have an idea about when the Template
> for the 4.15.2.0 version will be available?
>
> Best regards,
> Douglas
>
>
>
>

 


Re: Problem with Templates/ISO

Posted by DL <do...@gmail.com>.
Dear Pearl,

Thank you so much for getting back to me!
Yes, I have both the primary storage and secondary storage set up, in the
same way as the Quick Installation Guide.
They are at /export/primary and /export/secondary respectively.

The /export directory looks like this:
/export
├── primary
└── secondary
    └── template
        └── tmpl
            └── 1
                └── 3
                    ├── 1e8a80d3-da54-4a4c-a0fb-1a306b390a1c.qcow2
                    └── template.properties

Is this normal?

Best regards,
Douglas


On Mon, Sep 20, 2021 at 12:22 AM Pearl d'Silva <pe...@shapeblue.com>
wrote:

> Hi Douglas,
>
> Do you have at least one secondary store added to the zone. With respect
> to your query on the SystemVM template for 4.15.2, there is no change in
> the template, i.e., ACS 4.15.2 uses the same template as 4.15.1.
>
> Regards,
> Pearl
> ________________________________
> From: DL <do...@gmail.com>
> Sent: Monday, September 20, 2021 9:38 AM
> To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> Subject: Problem with Templates/ISO
>
> Hello there,
>
> I am a new CloutStack user and a new user on this mailing list. After
> following the Quick Installation Guide, I ended up with empty Template/ISOs
> when I attempted to create a VM instance.
>
> If I go to Images/Templates, I got 500 Internal Server Error:
>
> Request Failed (530)
> DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> template_store_ref.id, template_store_ref.store_id,
> template_store_ref.template_id, template_store_ref.store_role,
> template_store_ref.created, template_store_ref.last_updated,
> template_store_ref.download_pct, template_store_ref.size,
> template_store_ref.physical_size, template_store_ref.download_state,
> template_store_ref.local_path, template_store_ref.error_str,
> template_store_ref.job_id, template_store_ref.install_path,
> template_store_ref.url, template_store_ref.download_url,
> template_store_ref.download_url_created, template_store_ref.is_copy,
> template_store_ref.destroyed, template_store_ref.update_count,
> template_store_ref.updated, template_store_ref.state,
> template_store_ref.ref_cnt FROM template_store_ref WHERE
> template_store_ref.template_id = 3 AND template_store_ref.download_state !=
> 'BYPASSED' AND template_store_ref.destroyed = 0 AND
> template_store_ref.store_id IN )
>
> Could someone help me fix this issue?
>
> The quick installation guide I followed says it is for 4.15.2.0
> installation. However, in the System Template Setup section, this command:
> """
>
> /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt
> -m /export/secondary -u
>
> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2
> -h
> <https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2-h>
> kvm -F
> """
> seems to suggest that the process will download template vms for the
> 4.15.1.0 version?
>
> Could this be the reason? Does anyone have an idea about when the Template
> for the 4.15.2.0 version will be available?
>
> Best regards,
> Douglas
>
>
>
>

Re: Problem with Templates/ISO

Posted by Pearl d'Silva <pe...@shapeblue.com>.
Hi Douglas,

Do you have at least one secondary store added to the zone. With respect to your query on the SystemVM template for 4.15.2, there is no change in the template, i.e., ACS 4.15.2 uses the same template as 4.15.1.

Regards,
Pearl
________________________________
From: DL <do...@gmail.com>
Sent: Monday, September 20, 2021 9:38 AM
To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
Subject: Problem with Templates/ISO

Hello there,

I am a new CloutStack user and a new user on this mailing list. After
following the Quick Installation Guide, I ended up with empty Template/ISOs
when I attempted to create a VM instance.

If I go to Images/Templates, I got 500 Internal Server Error:

Request Failed (530)
DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
template_store_ref.id, template_store_ref.store_id,
template_store_ref.template_id, template_store_ref.store_role,
template_store_ref.created, template_store_ref.last_updated,
template_store_ref.download_pct, template_store_ref.size,
template_store_ref.physical_size, template_store_ref.download_state,
template_store_ref.local_path, template_store_ref.error_str,
template_store_ref.job_id, template_store_ref.install_path,
template_store_ref.url, template_store_ref.download_url,
template_store_ref.download_url_created, template_store_ref.is_copy,
template_store_ref.destroyed, template_store_ref.update_count,
template_store_ref.updated, template_store_ref.state,
template_store_ref.ref_cnt FROM template_store_ref WHERE
template_store_ref.template_id = 3 AND template_store_ref.download_state !=
'BYPASSED' AND template_store_ref.destroyed = 0 AND
template_store_ref.store_id IN )

Could someone help me fix this issue?

The quick installation guide I followed says it is for 4.15.2.0
installation. However, in the System Template Setup section, this command:
"""
/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt
-m /export/secondary -u
https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2
-h kvm -F
"""
seems to suggest that the process will download template vms for the
4.15.1.0 version?

Could this be the reason? Does anyone have an idea about when the Template
for the 4.15.2.0 version will be available?

Best regards,
Douglas

 


Re: Problem with Templates/ISO

Posted by DL <do...@gmail.com>.
Sure, I am happy to contribute!

By the way, just some more clarifications on the issue:

The gateway interface can stay with "Promiscuous Mode: Deny."
Only the interface of the VM we use to deploy CloudStack should be
"Promiscuous Mode: Allow All." (Also, "All VMs" setting works fine.)
This makes sense because if the traffic from the system VMs can hit the
gateway, they should be able to access the Internet.
It is the interface of the cloudstack VM (VM2) that denies traffic from the
system VMs when it is not promiscuous.


On Wed, Sep 22, 2021 at 2:36 AM Wei ZHOU <us...@gmail.com> wrote:

> Hi Douglas,
>
> Thanks for sharing.
>
> I recall there is a similar issue with a nested environment on vmware (
> https://github.com/apache/cloudstack/issues/5000).
> It would be good to mention it in the cloudstack document.
>
> Could you please create a pull request for it ?
> https://github.com/apache/cloudstack-documentation
>
> -Wei
>
>
>
> On Wed, 22 Sept 2021 at 03:11, DL <do...@gmail.com> wrote:
>
> > Dear Pearl, Harikrishna, and Wei,
> >
> > Thank you all for your helpful input!
> > With great joy, I'd like to share the reason for the various issues I
> > encountered when following the Quick Installation Guide.
> >
> > In short, the reason is that the network adapters of the VMs that I use
> to
> > deploy CloudStack are not in the correct Promiscuous Mode. After I set
> the
> > network adapters as "Promiscuous Mode: Allow All" in VirtualBox, all the
> > issues are gone!
> >
> > As I mentioned before, I am using one VM as the gateway server, and one
> VM
> > to deploy CloudStack. Let's call the VM that serves as the gateway server
> > as VM1, and the VM that I want to deploy CloudStack onto as VM2.
> > VM1 has two interfaces. The first interface enp0s3 is a NAT adapter. So,
> > this interface uses DHCP and gets Internet access automatically. The
> second
> > interface, enp0s8, with IP address 172.16.10.1 is an Internal Network
> > adapter. It is the gateway.
> > VM2 has only one interface, enp0s3, which is also an Internal Network
> > adapter. It uses IP 172.16.10.2.
> > VM2 can have Internet access through the gateway. However, according to
> the
> > Quick Installation Guide, other VMs created on this VM2 all attach to the
> > newly created bridge (cloudbr0) first.
> > Initially, I used the default setting for the Promiscuous Mode (i.e.,
> Deny)
> > for adapters enp0s8 on VM1 and enp0s3 on VM2. It seems that, with this
> > setting, the system VMs created by CloudStack cannot reach the gateway
> > 172.16.10.1, and thus cannot connect to the Internet. As all symptoms
> point
> > to a connectivity issue, I tried several hypotheses to try to resolve
> > the issue.
> > After I changed the Promiscuous Mode to "Allow All" for the two adapters
> in
> > VirtualBox, now the system VMs can connect to the Internet fine!
> >
> > I have successfully created an ISO through URL and launched a VM with the
> > ISO!
> > I still could not upload an ISO from the local file system. As this is
> > expected, I will not try to get this feature working. I will just create
> > ISOs through URLs if I need any.
> >
> >
> > Do you think configuring the network adapters as "Promiscuous Mode: Allow
> > All" (or at least as Allow VMs) should be mentioned in the Quick
> > Installation Guide?
> > I believe many people are using the virtual environment to test drive
> > CloudStack.
> > I am not sure whether this is a basic setting that everyone will
> > automatically use. But this setting is in the Advanced setting section in
> > VirtualBox, and the default setting is "Deny" even for Internal Network
> > adapters.
> > If this can be mentioned in the installation guide beforehand, it can
> > potentially save the time newcomers may need to spend to realize that
> this
> > is a problem.
> >
> > Thanks again for the help!
> >
> > Best regards,
> > Douglas
> >
> >
> >
> >
> > On Tue, Sep 21, 2021 at 6:54 PM DL <do...@gmail.com> wrote:
> >
> > > Hello Wei,
> > >
> > > Thanks for the comment. Yes, the problem seems to be here. If I go to
> the
> > > SSVM console, it cannot connect to the Internet.
> > > The consoleproxy VM cannot connect to the Internet either.
> > >
> > > I don't think I should change configurations within these system VMs,
> as
> > > the Quick Installation Guide doesn't mention anything about configuring
> > the
> > > system VMs.
> > > Is it because I missed something during the previous configuration
> > > process? What could have caused this problem?
> > >
> > > Best regards,
> > >
> > >
> > > On Tue, Sep 21, 2021 at 3:55 PM Wei ZHOU <us...@gmail.com>
> wrote:
> > >
> > >> It looks ssvm is not working well.
> > >> Please make sure that ssvm can connect to internet.
> > >>
> > >> -Wei
> > >>
> > >> On Tuesday, 21 September 2021, DL <do...@gmail.com> wrote:
> > >>
> > >> > The "SystemVM Template (KVM)" is ready. However, the "CentOS
> > 5.5(64bit)
> > >> no
> > >> > GUI (KVM)" template is not ready; the status says "Unable to resolve
> > >> > download.cloudstack.org."
> > >> > This issue is similar to the error I encountered when I tried to
> > >> register
> > >> > an online ISO.
> > >> > If I use the browser, I can visit any website. I can ping
> > >> > download.cloudstack.org from the terminal fine. However, cloudstack
> > >> seems
> > >> > not able to reach the public Internet.
> > >> > Is CloudStack using a different way to reach the Internet?
> > >> >
> > >> >
> > >> >
> > >> > On Tue, Sep 21, 2021 at 2:10 AM Pearl d'Silva <
> > >> pearl.dsilva@shapeblue.com>
> > >> > wrote:
> > >> >
> > >> > > Hi,
> > >> > >
> > >> > > One of the reasons why the templates may not be showing up in the
> VM
> > >> > > deployment wizard is because they aren't in the ready state. You
> can
> > >> > verify
> > >> > > that by going into the respective template's info and in the zone
> > tab
> > >> > you'd
> > >> > > probably notice that the template(s) aren't in ready state.
> Ideally,
> > >> once
> > >> > > the SystemVMs, essentially, Secondary storage VM(SSVM) is up, it
> > >> should
> > >> > > sync the templates (the systemVM template (that you had initially
> > >> seeded)
> > >> > > and the built-in template). Do you see an errors in the management
> > >> server
> > >> > > logs that could be helpful.
> > >> > > Can you log into your database (cloud) and see if you see any
> > entries
> > >> in
> > >> > > the template_store_ref table. I understand you are on a KVM based
> > env,
> > >> > so,
> > >> > > select * from template_store_ref where template_id=4\G      -
> > >> template_id
> > >> > > = 4 - refers to a built-in template that gets downloaded.
> > >> > >
> > >> > > Do you see any exceptions when trying to register a new template ?
> > >> > > For management server logs - look into
> > >> > > /var/log/cloudstack/management/management-server.log
> > >> > > Another place to look at would be the SSVM (which plays an
> integral
> > >> role
> > >> > > in downloading templates)
> > >> > > Please refer to
> > >> > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/
> > >> > SSVM%2C+templates%2C+Secondary+storage+troubleshooting
> > >> > > to log into and debug the SSVM.  To increase the log level in your
> > >> SSVM -
> > >> > > you can run the following:
> > >> > > sed -i 's/INFO/DEBUG/g'
> > /usr/local/cloud/systemvm/conf/log4j-cloud.xml
> > >> > and
> > >> > > then restart the cloud service : systemctl restart cloud
> > >> > > In the SSVM, you can observe the logs at /var/log/cloud.log
> > >> > >
> > >> > > To setup an SSL enabled env you could follow this link -
> > >> > >
> https://www.shapeblue.com/securing-cloudstack-4-11-with-https-tls/
> > >> or as
> > >> > > a temporary hack, you can enter the SSVMs IP Address in the
> > browser's
> > >> url
> > >> > > field with https scheme (https://<IP Address>) and accept the
> risk,
> > >> > > before trying to upload the template.
> > >> > >
> > >> > > Hope this helps.
> > >> > >
> > >> > > Thanks
> > >> > >
> > >> > >
> > >> > > ________________________________
> > >> > > From: DL <do...@gmail.com>
> > >> > > Sent: Tuesday, September 21, 2021 10:51 AM
> > >> > > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> > >> > > Subject: Re: Problem with Templates/ISO
> > >> > >
> > >> > > The system VMs are up and running.
> > >> > > The Zone shows enabled.
> > >> > >
> > >> > > I have another VM in VirtualBox serving as the gateway server for
> > the
> > >> > > cloudstack VM.
> > >> > > The gateway IP is 172.16.10.1. The cloudstack VM's IP is
> > 172.16.10.2.
> > >> > > As instructed, the gateway server is only a gateway, not a DHCP
> > >> server.
> > >> > > The cloudstack VM can use the gateway to access the Internet fine.
> > >> > > I can SSH from the gateway server into the cloudstack VM fine.
> > >> > >
> > >> > > How do I make my env setup SSL enabled?
> > >> > > Am I supposed to see some existing Templates/ISOs when creating a
> > new
> > >> VM
> > >> > > instance? Or am I supposed to create some Templates/ISOs by myself
> > >> first?
> > >> > >
> > >> > >
> > >> > >
> > >> > > On Tue, Sep 21, 2021 at 12:20 AM Pearl d'Silva <
> > >> > pearl.dsilva@shapeblue.com
> > >> > > <ma...@shapeblue.com>> wrote:
> > >> > > Hi Douglas,
> > >> > >
> > >> > > Could you please let us know the following:
> > >> > >
> > >> > >   *   Do you see the systemVMs are up and running (Infratructure
> ->
> > >> > System
> > >> > > VMs)?
> > >> > >   *   Is the zone enabled? (Infrastructure -> Zones (specific
> zone's
> > >> > > Allocation State))
> > >> > >
> > >> > > Providing some insight into the state of your env - by answering
> the
> > >> > above
> > >> > > questions, may help us diagnose the issue better wrt template
> > >> > registration
> > >> > > failure. With regards to template/iso upload(from local) failure -
> > >> this
> > >> > > would be expected if your env setup isn't SSL enabled. The issues
> > you
> > >> may
> > >> > > be facing could also be due to your infrastructure / network
> > topology.
> > >> > > The Quick installation guide is up to date and should work,
> however
> > if
> > >> > you
> > >> > > are facing issues you may refer to
> > >> > > https://github.com/shapeblue/hackerbook/blob/main/1-user.md to
> > setup
> > >> a
> > >> > > basic env. Another resource you could look at is
> > >> > > https://github.com/shapeblue/mbx - this will setup an env for
> you -
> > >> > > please do follow the Readme. That said, if you see any issues with
> > the
> > >> > > documentation, you can report them i.e., create an issue/ pull
> > request
> > >> > > against the respective projects on GitHub and we can help improve
> > >> them.
> > >> > >
> > >> > > Thanks,
> > >> > > Pearl
> > >> > >
> > >> > >
> > >> > >
> > >> > > ________________________________
> > >> > > From: DL <do...@gmail.com>>
> > >> > > Sent: Tuesday, September 21, 2021 12:43 AM
> > >> > > To: users@cloudstack.apache.org<mailto:
> users@cloudstack.apache.org>
> > <
> > >> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > >> > > Subject: Re: Problem with Templates/ISO
> > >> > >
> > >> > > Hi Pearl,
> > >> > >
> > >> > > Following your solution, I added the Secondary Storage, and now
> two
> > >> > > Templates and two ISOs shows under the Images tab.
> > >> > > However, I still couldn't see any Templates/ISOs in the
> Template/ISO
> > >> > > configuration page when I tried to create a new VM instance.
> > >> > >
> > >> > > I tried to Register ISO also. If I use an online ISO, cloudstack
> > would
> > >> > show
> > >> > > me that the url hostname cannot be resolved. (Of course, I can use
> > the
> > >> > > browser to download the ISO fine)
> > >> > > If I want to upload an ISO from the local machine, cloudstack
> would
> > >> > report
> > >> > > an error saying that it cannot reach the management server (or
> some
> > >> web
> > >> > > browser extensions may have blocked the request). I have a single
> > >> machine
> > >> > > doing all the things. I also checked that all required processes
> are
> > >> > > running. My browser doesn't use any extensions.
> > >> > >
> > >> > > I am using a CentOS 7 virtual machine within VirtualBox to follow
> > the
> > >> > Quick
> > >> > > Installation Guide (
> > >> > >
> > >>
> http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.
> > >> > html
> > >> > > ).
> > >> > > I have made everything identical to that of the Quick Installation
> > >> Guide.
> > >> > > However, I still encountered various issues.
> > >> > >
> > >> > > The first issue is that after I configured the Zone, Pod, Cluster,
> > >> etc,
> > >> > and
> > >> > > launched the Zone, every time (I have done this with multiple VMs)
> > the
> > >> > > system would hang at the last step "Adding Host" forever. I really
> > >> mean
> > >> > > forever. And it didn't even report what error it encountered. I
> have
> > >> to
> > >> > > close the window. After this, I would see, the host has been added
> > to
> > >> the
> > >> > > Zone successfully. However, the Primary Storage and the Secondary
> > >> Storage
> > >> > > were not added. I believe this is why I needed to add the
> Secondary
> > >> > Storage
> > >> > > (and also the Primary Storage) manually.
> > >> > > But after this, I still could not see/add any Templates/ISOs.
> > >> > >
> > >> > >
> > >> > > I didn't expect so many issues by just following the simplest
> Quick
> > >> > > Installation Guide.
> > >> > > Is there anything I should pay special attention to while
> following
> > >> the
> > >> > > Quick Installation Guide?
> > >> > > Does the Quick Installation Guide still work for the latest
> version?
> > >> I do
> > >> > > notice that the instructions don't mention some options I was
> faced
> > >> with
> > >> > > during the installation/configuration process. I just chose
> default
> > >> > > options. Would this cause any issues?
> > >> > > Are there any better Installation Guides I should try instead?
> > >> > > Are there any existing clouds (built with CloudStack) that I can
> > play
> > >> > with
> > >> > > for free (or with minimal costs)?
> > >> > >
> > >> > > Sorry for asking so many questions. I just want to get started.
> > >> > >
> > >> > > Best regards,
> > >> > >
> > >> > >
> > >> > > On Mon, Sep 20, 2021 at 12:55 AM Pearl d'Silva <
> > >> > pearl.dsilva@shapeblue.com
> > >> > > <ma...@shapeblue.com>>
> > >> > > wrote:
> > >> > >
> > >> > > > Hi Douglas,
> > >> > > >
> > >> > > >
> > >> > > > That seems to be the issue, you will need to add a store to the
> > >> zone.
> > >> > You
> > >> > > > can do that either via UI / command line. On the UI, there is
> the
> > >> "Add
> > >> > > > Secondary Storage" button, provide the zone, the server IP/name,
> > and
> > >> > the
> > >> > > > path (in your case, /export/secondary).
> > >> > > >
> > >> > > >
> > >> > > > Thanks,
> > >> > > > Pearl
> > >> > > > ________________________________
> > >> > > > From: DL <do...@gmail.com>>
> > >> > > > Sent: Monday, September 20, 2021 10:16 AM
> > >> > > > To: users@cloudstack.apache.org<mailto:
> > users@cloudstack.apache.org>
> > >> <
> > >> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > >> > > > Subject: Re: Problem with Templates/ISO
> > >> > > >
> > >> > > > @Pearl
> > >> > > > I can go to the Infrastructure -> Secondary Storage tab.
> However,
> > >> > nothing
> > >> > > > is there.
> > >> > > >
> > >> > > > @Harikrishna
> > >> > > > Thank you also for getting back to me!
> > >> > > >
> > >> > > > Here is what I found related to the error in the log:
> > >> > > >
> > >> > > > 2021-09-20 00:27:12,093 DEBUG [c.c.a.ApiServlet]
> > >> > > > (qtp1136768342-20:ctx-d9bd1f44) (logid:a56ace1d) ===START===
> > >> > 172.16.10.2
> > >> > > > -- GET
> > >> > > >
> > >> > > >
> > >> > > listall=true&templatefilter=all&showunique=true&page=1&
> > >> > pagesize=20&command=listTemplates&response=json
> > >> > > > 2021-09-20 00:27:12,097 DEBUG [c.c.a.ApiServer]
> > >> > > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d)
> > CIDRs
> > >> > from
> > >> > > > which account 'Acct[2e801633-1977-11ec-98da-5254005ad990-admin]'
> > is
> > >> > > allowed
> > >> > > > to perform API calls: 0.0.0.0/0,::/0<http://0.0.0.0/0,::/0>
> > >> > > > 2021-09-20 00:27:12,110 ERROR [c.c.a.ApiServer]
> > >> > > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d)
> > >> unhandled
> > >> > > > exception executing api command: [Ljava.lang.String;@421e6f13
> > >> > > > com.cloud.utils.exception.CloudRuntimeException: DB Exception
> on:
> > >> > > > com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> > >> > template_store_ref.id<
> > >> > > http://template_store_ref.id>,
> > >> > > > template_store_ref.store_id, template_store_ref.template_id,
> > >> > > > template_store_ref.store_role, template_store_ref.created,
> > >> > > > template_store_ref.last_updated,
> template_store_ref.download_pct,
> > >> > > > template_store_ref.size, template_store_ref.physical_size,
> > >> > > > template_store_ref.download_state,
> template_store_ref.local_path,
> > >> > > > template_store_ref.error_str, template_store_ref.job_id,
> > >> > > > template_store_ref.install_path, template_store_ref.url,
> > >> > > > template_store_ref.download_url, template_store_ref.download_
> > >> > url_created,
> > >> > > > template_store_ref.is_copy, template_store_ref.destroyed,
> > >> > > > template_store_ref.update_count, template_store_ref.updated,
> > >> > > > template_store_ref.state, template_store_ref.ref_cnt FROM
> > >> > > > template_store_ref WHERE template_store_ref.template_id = 3  AND
> > >> > > > template_store_ref.download_state != 'BYPASSED'  AND
> > >> > > > template_store_ref.destroyed = 0  AND
> template_store_ref.store_id
> > >> IN )
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(
> > >> > GenericDaoBase.java:423)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(
> > >> > GenericDaoBase.java:359)
> > >> > > > at
> > com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:348)
> > >> > > > at
> > >> com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:1308)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl.
> > >> > listByTemplateNotBypassed(TemplateDataStoreDaoImpl.java:431)
> > >> > > > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.
> > >> > invoke0(Native
> > >> > > > Method)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
> > >> > NativeMethodAccessorImpl.java:62)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
> > >> > DelegatingMethodAccessorImpl.java:43)
> > >> > > > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> > >>
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
> > >> > (AopUtils.java:344)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.springframework.aop.framework.ReflectiveMethodInvocation.
> > >> > invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> > >> > ReflectiveMethodInvocation.java:163)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > com.cloud.utils.db.TransactionContextInterceptor.invoke(
> > >> > TransactionContextInterceptor.java:34)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> > >> > ReflectiveMethodInvocation.java:175)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> > >>
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(
> > >> > ExposeInvocationInterceptor.java:97)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> > >> > ReflectiveMethodInvocation.java:186)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.springframework.aop.framework.JdkDynamicAopProxy.
> > >> > invoke(JdkDynamicAopProxy.java:215)
> > >> > > > at com.sun.proxy.$Proxy79.listByTemplateNotBypassed(Unknown
> > Source)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > com.cloud.api.query.dao.TemplateJoinDaoImpl.newTemplateResponse(
> > >> > TemplateJoinDaoImpl.java:165)
> > >> > > > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.
> > >> > invoke0(Native
> > >> > > > Method)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
> > >> > NativeMethodAccessorImpl.java:62)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
> > >> > DelegatingMethodAccessorImpl.java:43)
> > >> > > > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> > >>
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
> > >> > (AopUtils.java:344)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.springframework.aop.framework.ReflectiveMethodInvocation.
> > >> > invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> > >> > ReflectiveMethodInvocation.java:163)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > com.cloud.utils.db.TransactionContextInterceptor.invoke(
> > >> > TransactionContextInterceptor.java:34)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> > >> > ReflectiveMethodInvocation.java:175)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> > >>
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(
> > >> > ExposeInvocationInterceptor.java:97)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> > >> > ReflectiveMethodInvocation.java:186)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.springframework.aop.framework.JdkDynamicAopProxy.
> > >> > invoke(JdkDynamicAopProxy.java:215)
> > >> > > > at com.sun.proxy.$Proxy308.newTemplateResponse(Unknown Source)
> > >> > > > at
> > >> com.cloud.api.ApiDBUtils.newTemplateResponse(ApiDBUtils.java:2022)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > com.cloud.api.query.ViewResponseHelper.createTemplateResponse(
> > >> > ViewResponseHelper.java:590)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > com.cloud.api.query.QueryManagerImpl.listTemplates(
> > >> > QueryManagerImpl.java:3336)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.apache.cloudstack.api.command.user.template.
> > >> > ListTemplatesCmd.execute(ListTemplatesCmd.java:180)
> > >> > > > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
> > >> > > > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:764)
> > >> > > > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588)
> > >> > > > at com.cloud.api.ApiServlet.processRequestInContext(
> > >> > ApiServlet.java:321)
> > >> > > > at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> > >>
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(
> > >> > DefaultManagedContext.java:55)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
> > >> > callWithContext(DefaultManagedContext.java:102)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
> > >> > runWithContext(DefaultManagedContext.java:52)
> > >> > > > at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131)
> > >> > > > at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93)
> > >> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
> > >> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.servlet.ServletHolder$NotAsync.
> > >> > service(ServletHolder.java:1443)
> > >> > > > at org.eclipse.jetty.servlet.ServletHolder.handle(
> > >> > ServletHolder.java:791)
> > >> > > > at
> > >> > > >
> > >> > > org.eclipse.jetty.servlet.ServletHandler.doHandle(
> > >> > ServletHandler.java:550)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.server.handler.ScopedHandler.handle(
> > >> > ScopedHandler.java:143)
> > >> > > > at
> > >> > > >
> > >> > > org.eclipse.jetty.security.SecurityHandler.handle(
> > >> > SecurityHandler.java:602)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> > >> > HandlerWrapper.java:127)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.server.handler.ScopedHandler.
> > >> > nextHandle(ScopedHandler.java:235)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.server.session.SessionHandler.
> > >> > doHandle(SessionHandler.java:1624)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.server.handler.ScopedHandler.
> > >> > nextHandle(ScopedHandler.java:233)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.server.handler.ContextHandler.
> > >> > doHandle(ContextHandler.java:1435)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.server.handler.ScopedHandler.
> > >> > nextScope(ScopedHandler.java:188)
> > >> > > > at
> > >> > > > org.eclipse.jetty.servlet.ServletHandler.doScope(
> > >> > ServletHandler.java:501)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.server.session.SessionHandler.
> > >> > doScope(SessionHandler.java:1594)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.server.handler.ScopedHandler.
> > >> > nextScope(ScopedHandler.java:186)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.server.handler.ContextHandler.
> > >> > doScope(ContextHandler.java:1350)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.server.handler.ScopedHandler.handle(
> > >> > ScopedHandler.java:141)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.server.handler.gzip.GzipHandler.
> > >> > handle(GzipHandler.java:766)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.server.handler.HandlerCollection.
> > >> > handle(HandlerCollection.java:146)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> > >> > HandlerWrapper.java:127)
> > >> > > > at org.eclipse.jetty.server.Server.handle(Server.java:516)
> > >> > > > at
> > >> > > >
> > >> > > org.eclipse.jetty.server.HttpChannel.lambda$handle$1(
> > >> > HttpChannel.java:388)
> > >> > > > at
> > >> org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
> > >> > > > at
> > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
> > >> > > > at
> > >> > > >
> > >> > > org.eclipse.jetty.server.HttpConnection.onFillable(
> > >> > HttpConnection.java:273)
> > >> > > > at
> > >> > > > org.eclipse.jetty.io<http://org.eclipse.jetty.io>
> > >> > > > .AbstractConnection$ReadCallback.succeeded(
> > >> > AbstractConnection.java:311)
> > >> > > > at org.eclipse.jetty.io<http://org.eclipse.jetty.io
> > >> > > >.FillInterest.fillable(FillInterest.java:105)
> > >> > > > at org.eclipse.jetty.io<http://org.eclipse.jetty.io
> > >> > > >.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
> > >> > runTask(EatWhatYouKill.java:336)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
> > >> > doProduce(EatWhatYouKill.java:313)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
> > >> > tryProduce(EatWhatYouKill.java:171)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(
> > >> > EatWhatYouKill.java:129)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> > >>
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(
> > >> > ReservedThreadExecutor.java:375)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
> > >> > QueuedThreadPool.java:773)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > > org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(
> > >> > QueuedThreadPool.java:905)
> > >> > > > at java.base/java.lang.Thread.run(Thread.java:829)
> > >> > > > Caused by: java.sql.SQLSyntaxErrorException: You have an error
> in
> > >> your
> > >> > > SQL
> > >> > > > syntax; check the manual that corresponds to your MySQL server
> > >> version
> > >> > > for
> > >> > > > the right syntax to use near ')' at line 1
> > >> > > > at
> > >> > > >
> > >> > > com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(
> > >> > SQLError.java:120)
> > >> > > > at
> > >> > > >
> > >> > > com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(
> > >> > SQLError.java:97)
> > >> > > > at
> > >> > > >
> > >> > > >
> > >> > >
> > com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(
> > >> > SQLExceptionsMapping.java:122)
> > >> > > > ... 87 more
> > >> > > > 2021-09-20 00:27:12,122 DEBUG [c.c.a.ApiServlet]
> > >> > > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d)
> > >> ===END===
> > >> > > >  172.16.10.2 -- GET
> > >> > > >
> > >> > > >
> > >> > > listall=true&templatefilter=all&showunique=true&page=1&
> > >> > pagesize=20&command=listTemplates&response=json
> > >> > > >
> > >> > > >
> > >> > > > Could you help me to pinpoint what I may have done wrong?
> > >> > > >
> > >> > > > On Mon, Sep 20, 2021 at 12:38 AM Harikrishna Patnala <
> > >> > > > Harikrishna.Patnala@shapeblue.com<mailto:
> > >> > > Harikrishna.Patnala@shapeblue.com>> wrote:
> > >> > > >
> > >> > > > > Sorry, logs at
> > >> /var/log/cloudstack/management/management-server.log
> > >> > > > > ________________________________
> > >> > > > > From: Harikrishna Patnala <Harikrishna.Patnala@shapeblue.com
> > >> <mailto:
> > >> > > Harikrishna.Patnala@shapeblue.com>>
> > >> > > > > Sent: Monday, September 20, 2021 10:04 AM
> > >> > > > > To: users@cloudstack.apache.org<mailto:
> > >> users@cloudstack.apache.org>
> > >> > <
> > >> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > >> > > > > Subject: Re: Problem with Templates/ISO
> > >> > > > >
> > >> > > > >
> > >> > > > > Hi Douglas,
> > >> > > > >
> > >> > > > > Firstly, welcome to CloudStack.
> > >> > > > >
> > >> > > > > This looks to me like DB changes did not apply properly during
> > >> > > > > installation. Did you observe any issues in the logs during
> the
> > >> > > > management
> > >> > > > > server installation or start.
> > >> > > > >
> > >> > > > > You can check the logs at
> > >> > > > > /usr/share/cloudstack/management/management-server.log and see
> > the
> > >> > > exact
> > >> > > > > reason for DB sql exception when you perform the list
> templates
> > >> > > > operation.
> > >> > > > >
> > >> > > > > As mentioned already there is no change in the system VM
> > template
> > >> > from
> > >> > > > > 4.15.1 to 4.15.2
> > >> > > > >
> > >> > > > > Regards,
> > >> > > > > Harikrishna
> > >> > > > > ________________________________
> > >> > > > > From: DL <douglasleer@gmail.com<mailto:douglasleer@gmail.com
> >>
> > >> > > > > Sent: Monday, September 20, 2021 9:38 AM
> > >> > > > > To: users@cloudstack.apache.org<mailto:
> > >> users@cloudstack.apache.org>
> > >> > <
> > >> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > >> > > > > Subject: Problem with Templates/ISO
> > >> > > > >
> > >> > > > > Hello there,
> > >> > > > >
> > >> > > > > I am a new CloutStack user and a new user on this mailing
> list.
> > >> After
> > >> > > > > following the Quick Installation Guide, I ended up with empty
> > >> > > > Template/ISOs
> > >> > > > > when I attempted to create a VM instance.
> > >> > > > >
> > >> > > > > If I go to Images/Templates, I got 500 Internal Server Error:
> > >> > > > >
> > >> > > > > Request Failed (530)
> > >> > > > > DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement:
> > SELECT
> > >> > > > > template_store_ref.id<http://template_store_ref.id>,
> > >> > > template_store_ref.store_id,
> > >> > > > > template_store_ref.template_id, template_store_ref.store_role,
> > >> > > > > template_store_ref.created, template_store_ref.last_updated,
> > >> > > > > template_store_ref.download_pct, template_store_ref.size,
> > >> > > > > template_store_ref.physical_size,
> > >> template_store_ref.download_state,
> > >> > > > > template_store_ref.local_path, template_store_ref.error_str,
> > >> > > > > template_store_ref.job_id, template_store_ref.install_path,
> > >> > > > > template_store_ref.url, template_store_ref.download_url,
> > >> > > > > template_store_ref.download_url_created,
> > >> template_store_ref.is_copy,
> > >> > > > > template_store_ref.destroyed, template_store_ref.update_count,
> > >> > > > > template_store_ref.updated, template_store_ref.state,
> > >> > > > > template_store_ref.ref_cnt FROM template_store_ref WHERE
> > >> > > > > template_store_ref.template_id = 3 AND
> > >> > > template_store_ref.download_state
> > >> > > > !=
> > >> > > > > 'BYPASSED' AND template_store_ref.destroyed = 0 AND
> > >> > > > > template_store_ref.store_id IN )
> > >> > > > >
> > >> > > > > Could someone help me fix this issue?
> > >> > > > >
> > >> > > > > The quick installation guide I followed says it is for
> 4.15.2.0
> > >> > > > > installation. However, in the System Template Setup section,
> > this
> > >> > > > command:
> > >> > > > > """
> > >> > > > >
> > >> > > > >
> > >> > > >
> > >> > > /usr/share/cloudstack-common/scripts/storage/secondary/
> > >> > cloud-install-sys-tmplt
> > >> > > > > -m /export/secondary -u
> > >> > > > >
> > >> > > > >
> > >> > > >
> > >> > > https://download.cloudstack.org/systemvm/4.15/
> > >> > systemvmtemplate-4.15.1-kvm.qcow2.bz2
> > >> > > > > -h
> > >> > > > > <
> > >> > > >
> > >> > > https://download.cloudstack.org/systemvm/4.15/
> > >> > systemvmtemplate-4.15.1-kvm.qcow2.bz2-h
> > >> > > > >
> > >> > > > > kvm -F
> > >> > > > > """
> > >> > > > > seems to suggest that the process will download template vms
> for
> > >> the
> > >> > > > > 4.15.1.0 version?
> > >> > > > >
> > >> > > > > Could this be the reason? Does anyone have an idea about when
> > the
> > >> > > > Template
> > >> > > > > for the 4.15.2.0 version will be available?
> > >> > > > >
> > >> > > > > Best regards,
> > >> > > > > Douglas
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> >
> > >>
> > >
> >
>

Re: Problem with Templates/ISO

Posted by Wei ZHOU <us...@gmail.com>.
Hi Douglas,

Thanks for sharing.

I recall there is a similar issue with a nested environment on vmware (
https://github.com/apache/cloudstack/issues/5000).
It would be good to mention it in the cloudstack document.

Could you please create a pull request for it ?
https://github.com/apache/cloudstack-documentation

-Wei



On Wed, 22 Sept 2021 at 03:11, DL <do...@gmail.com> wrote:

> Dear Pearl, Harikrishna, and Wei,
>
> Thank you all for your helpful input!
> With great joy, I'd like to share the reason for the various issues I
> encountered when following the Quick Installation Guide.
>
> In short, the reason is that the network adapters of the VMs that I use to
> deploy CloudStack are not in the correct Promiscuous Mode. After I set the
> network adapters as "Promiscuous Mode: Allow All" in VirtualBox, all the
> issues are gone!
>
> As I mentioned before, I am using one VM as the gateway server, and one VM
> to deploy CloudStack. Let's call the VM that serves as the gateway server
> as VM1, and the VM that I want to deploy CloudStack onto as VM2.
> VM1 has two interfaces. The first interface enp0s3 is a NAT adapter. So,
> this interface uses DHCP and gets Internet access automatically. The second
> interface, enp0s8, with IP address 172.16.10.1 is an Internal Network
> adapter. It is the gateway.
> VM2 has only one interface, enp0s3, which is also an Internal Network
> adapter. It uses IP 172.16.10.2.
> VM2 can have Internet access through the gateway. However, according to the
> Quick Installation Guide, other VMs created on this VM2 all attach to the
> newly created bridge (cloudbr0) first.
> Initially, I used the default setting for the Promiscuous Mode (i.e., Deny)
> for adapters enp0s8 on VM1 and enp0s3 on VM2. It seems that, with this
> setting, the system VMs created by CloudStack cannot reach the gateway
> 172.16.10.1, and thus cannot connect to the Internet. As all symptoms point
> to a connectivity issue, I tried several hypotheses to try to resolve
> the issue.
> After I changed the Promiscuous Mode to "Allow All" for the two adapters in
> VirtualBox, now the system VMs can connect to the Internet fine!
>
> I have successfully created an ISO through URL and launched a VM with the
> ISO!
> I still could not upload an ISO from the local file system. As this is
> expected, I will not try to get this feature working. I will just create
> ISOs through URLs if I need any.
>
>
> Do you think configuring the network adapters as "Promiscuous Mode: Allow
> All" (or at least as Allow VMs) should be mentioned in the Quick
> Installation Guide?
> I believe many people are using the virtual environment to test drive
> CloudStack.
> I am not sure whether this is a basic setting that everyone will
> automatically use. But this setting is in the Advanced setting section in
> VirtualBox, and the default setting is "Deny" even for Internal Network
> adapters.
> If this can be mentioned in the installation guide beforehand, it can
> potentially save the time newcomers may need to spend to realize that this
> is a problem.
>
> Thanks again for the help!
>
> Best regards,
> Douglas
>
>
>
>
> On Tue, Sep 21, 2021 at 6:54 PM DL <do...@gmail.com> wrote:
>
> > Hello Wei,
> >
> > Thanks for the comment. Yes, the problem seems to be here. If I go to the
> > SSVM console, it cannot connect to the Internet.
> > The consoleproxy VM cannot connect to the Internet either.
> >
> > I don't think I should change configurations within these system VMs, as
> > the Quick Installation Guide doesn't mention anything about configuring
> the
> > system VMs.
> > Is it because I missed something during the previous configuration
> > process? What could have caused this problem?
> >
> > Best regards,
> >
> >
> > On Tue, Sep 21, 2021 at 3:55 PM Wei ZHOU <us...@gmail.com> wrote:
> >
> >> It looks ssvm is not working well.
> >> Please make sure that ssvm can connect to internet.
> >>
> >> -Wei
> >>
> >> On Tuesday, 21 September 2021, DL <do...@gmail.com> wrote:
> >>
> >> > The "SystemVM Template (KVM)" is ready. However, the "CentOS
> 5.5(64bit)
> >> no
> >> > GUI (KVM)" template is not ready; the status says "Unable to resolve
> >> > download.cloudstack.org."
> >> > This issue is similar to the error I encountered when I tried to
> >> register
> >> > an online ISO.
> >> > If I use the browser, I can visit any website. I can ping
> >> > download.cloudstack.org from the terminal fine. However, cloudstack
> >> seems
> >> > not able to reach the public Internet.
> >> > Is CloudStack using a different way to reach the Internet?
> >> >
> >> >
> >> >
> >> > On Tue, Sep 21, 2021 at 2:10 AM Pearl d'Silva <
> >> pearl.dsilva@shapeblue.com>
> >> > wrote:
> >> >
> >> > > Hi,
> >> > >
> >> > > One of the reasons why the templates may not be showing up in the VM
> >> > > deployment wizard is because they aren't in the ready state. You can
> >> > verify
> >> > > that by going into the respective template's info and in the zone
> tab
> >> > you'd
> >> > > probably notice that the template(s) aren't in ready state. Ideally,
> >> once
> >> > > the SystemVMs, essentially, Secondary storage VM(SSVM) is up, it
> >> should
> >> > > sync the templates (the systemVM template (that you had initially
> >> seeded)
> >> > > and the built-in template). Do you see an errors in the management
> >> server
> >> > > logs that could be helpful.
> >> > > Can you log into your database (cloud) and see if you see any
> entries
> >> in
> >> > > the template_store_ref table. I understand you are on a KVM based
> env,
> >> > so,
> >> > > select * from template_store_ref where template_id=4\G      -
> >> template_id
> >> > > = 4 - refers to a built-in template that gets downloaded.
> >> > >
> >> > > Do you see any exceptions when trying to register a new template ?
> >> > > For management server logs - look into
> >> > > /var/log/cloudstack/management/management-server.log
> >> > > Another place to look at would be the SSVM (which plays an integral
> >> role
> >> > > in downloading templates)
> >> > > Please refer to
> >> > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/
> >> > SSVM%2C+templates%2C+Secondary+storage+troubleshooting
> >> > > to log into and debug the SSVM.  To increase the log level in your
> >> SSVM -
> >> > > you can run the following:
> >> > > sed -i 's/INFO/DEBUG/g'
> /usr/local/cloud/systemvm/conf/log4j-cloud.xml
> >> > and
> >> > > then restart the cloud service : systemctl restart cloud
> >> > > In the SSVM, you can observe the logs at /var/log/cloud.log
> >> > >
> >> > > To setup an SSL enabled env you could follow this link -
> >> > > https://www.shapeblue.com/securing-cloudstack-4-11-with-https-tls/
> >> or as
> >> > > a temporary hack, you can enter the SSVMs IP Address in the
> browser's
> >> url
> >> > > field with https scheme (https://<IP Address>) and accept the risk,
> >> > > before trying to upload the template.
> >> > >
> >> > > Hope this helps.
> >> > >
> >> > > Thanks
> >> > >
> >> > >
> >> > > ________________________________
> >> > > From: DL <do...@gmail.com>
> >> > > Sent: Tuesday, September 21, 2021 10:51 AM
> >> > > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> >> > > Subject: Re: Problem with Templates/ISO
> >> > >
> >> > > The system VMs are up and running.
> >> > > The Zone shows enabled.
> >> > >
> >> > > I have another VM in VirtualBox serving as the gateway server for
> the
> >> > > cloudstack VM.
> >> > > The gateway IP is 172.16.10.1. The cloudstack VM's IP is
> 172.16.10.2.
> >> > > As instructed, the gateway server is only a gateway, not a DHCP
> >> server.
> >> > > The cloudstack VM can use the gateway to access the Internet fine.
> >> > > I can SSH from the gateway server into the cloudstack VM fine.
> >> > >
> >> > > How do I make my env setup SSL enabled?
> >> > > Am I supposed to see some existing Templates/ISOs when creating a
> new
> >> VM
> >> > > instance? Or am I supposed to create some Templates/ISOs by myself
> >> first?
> >> > >
> >> > >
> >> > >
> >> > > On Tue, Sep 21, 2021 at 12:20 AM Pearl d'Silva <
> >> > pearl.dsilva@shapeblue.com
> >> > > <ma...@shapeblue.com>> wrote:
> >> > > Hi Douglas,
> >> > >
> >> > > Could you please let us know the following:
> >> > >
> >> > >   *   Do you see the systemVMs are up and running (Infratructure ->
> >> > System
> >> > > VMs)?
> >> > >   *   Is the zone enabled? (Infrastructure -> Zones (specific zone's
> >> > > Allocation State))
> >> > >
> >> > > Providing some insight into the state of your env - by answering the
> >> > above
> >> > > questions, may help us diagnose the issue better wrt template
> >> > registration
> >> > > failure. With regards to template/iso upload(from local) failure -
> >> this
> >> > > would be expected if your env setup isn't SSL enabled. The issues
> you
> >> may
> >> > > be facing could also be due to your infrastructure / network
> topology.
> >> > > The Quick installation guide is up to date and should work, however
> if
> >> > you
> >> > > are facing issues you may refer to
> >> > > https://github.com/shapeblue/hackerbook/blob/main/1-user.md to
> setup
> >> a
> >> > > basic env. Another resource you could look at is
> >> > > https://github.com/shapeblue/mbx - this will setup an env for you -
> >> > > please do follow the Readme. That said, if you see any issues with
> the
> >> > > documentation, you can report them i.e., create an issue/ pull
> request
> >> > > against the respective projects on GitHub and we can help improve
> >> them.
> >> > >
> >> > > Thanks,
> >> > > Pearl
> >> > >
> >> > >
> >> > >
> >> > > ________________________________
> >> > > From: DL <do...@gmail.com>>
> >> > > Sent: Tuesday, September 21, 2021 12:43 AM
> >> > > To: users@cloudstack.apache.org<ma...@cloudstack.apache.org>
> <
> >> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> >> > > Subject: Re: Problem with Templates/ISO
> >> > >
> >> > > Hi Pearl,
> >> > >
> >> > > Following your solution, I added the Secondary Storage, and now two
> >> > > Templates and two ISOs shows under the Images tab.
> >> > > However, I still couldn't see any Templates/ISOs in the Template/ISO
> >> > > configuration page when I tried to create a new VM instance.
> >> > >
> >> > > I tried to Register ISO also. If I use an online ISO, cloudstack
> would
> >> > show
> >> > > me that the url hostname cannot be resolved. (Of course, I can use
> the
> >> > > browser to download the ISO fine)
> >> > > If I want to upload an ISO from the local machine, cloudstack would
> >> > report
> >> > > an error saying that it cannot reach the management server (or some
> >> web
> >> > > browser extensions may have blocked the request). I have a single
> >> machine
> >> > > doing all the things. I also checked that all required processes are
> >> > > running. My browser doesn't use any extensions.
> >> > >
> >> > > I am using a CentOS 7 virtual machine within VirtualBox to follow
> the
> >> > Quick
> >> > > Installation Guide (
> >> > >
> >> http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.
> >> > html
> >> > > ).
> >> > > I have made everything identical to that of the Quick Installation
> >> Guide.
> >> > > However, I still encountered various issues.
> >> > >
> >> > > The first issue is that after I configured the Zone, Pod, Cluster,
> >> etc,
> >> > and
> >> > > launched the Zone, every time (I have done this with multiple VMs)
> the
> >> > > system would hang at the last step "Adding Host" forever. I really
> >> mean
> >> > > forever. And it didn't even report what error it encountered. I have
> >> to
> >> > > close the window. After this, I would see, the host has been added
> to
> >> the
> >> > > Zone successfully. However, the Primary Storage and the Secondary
> >> Storage
> >> > > were not added. I believe this is why I needed to add the Secondary
> >> > Storage
> >> > > (and also the Primary Storage) manually.
> >> > > But after this, I still could not see/add any Templates/ISOs.
> >> > >
> >> > >
> >> > > I didn't expect so many issues by just following the simplest Quick
> >> > > Installation Guide.
> >> > > Is there anything I should pay special attention to while following
> >> the
> >> > > Quick Installation Guide?
> >> > > Does the Quick Installation Guide still work for the latest version?
> >> I do
> >> > > notice that the instructions don't mention some options I was faced
> >> with
> >> > > during the installation/configuration process. I just chose default
> >> > > options. Would this cause any issues?
> >> > > Are there any better Installation Guides I should try instead?
> >> > > Are there any existing clouds (built with CloudStack) that I can
> play
> >> > with
> >> > > for free (or with minimal costs)?
> >> > >
> >> > > Sorry for asking so many questions. I just want to get started.
> >> > >
> >> > > Best regards,
> >> > >
> >> > >
> >> > > On Mon, Sep 20, 2021 at 12:55 AM Pearl d'Silva <
> >> > pearl.dsilva@shapeblue.com
> >> > > <ma...@shapeblue.com>>
> >> > > wrote:
> >> > >
> >> > > > Hi Douglas,
> >> > > >
> >> > > >
> >> > > > That seems to be the issue, you will need to add a store to the
> >> zone.
> >> > You
> >> > > > can do that either via UI / command line. On the UI, there is the
> >> "Add
> >> > > > Secondary Storage" button, provide the zone, the server IP/name,
> and
> >> > the
> >> > > > path (in your case, /export/secondary).
> >> > > >
> >> > > >
> >> > > > Thanks,
> >> > > > Pearl
> >> > > > ________________________________
> >> > > > From: DL <do...@gmail.com>>
> >> > > > Sent: Monday, September 20, 2021 10:16 AM
> >> > > > To: users@cloudstack.apache.org<mailto:
> users@cloudstack.apache.org>
> >> <
> >> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> >> > > > Subject: Re: Problem with Templates/ISO
> >> > > >
> >> > > > @Pearl
> >> > > > I can go to the Infrastructure -> Secondary Storage tab. However,
> >> > nothing
> >> > > > is there.
> >> > > >
> >> > > > @Harikrishna
> >> > > > Thank you also for getting back to me!
> >> > > >
> >> > > > Here is what I found related to the error in the log:
> >> > > >
> >> > > > 2021-09-20 00:27:12,093 DEBUG [c.c.a.ApiServlet]
> >> > > > (qtp1136768342-20:ctx-d9bd1f44) (logid:a56ace1d) ===START===
> >> > 172.16.10.2
> >> > > > -- GET
> >> > > >
> >> > > >
> >> > > listall=true&templatefilter=all&showunique=true&page=1&
> >> > pagesize=20&command=listTemplates&response=json
> >> > > > 2021-09-20 00:27:12,097 DEBUG [c.c.a.ApiServer]
> >> > > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d)
> CIDRs
> >> > from
> >> > > > which account 'Acct[2e801633-1977-11ec-98da-5254005ad990-admin]'
> is
> >> > > allowed
> >> > > > to perform API calls: 0.0.0.0/0,::/0<http://0.0.0.0/0,::/0>
> >> > > > 2021-09-20 00:27:12,110 ERROR [c.c.a.ApiServer]
> >> > > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d)
> >> unhandled
> >> > > > exception executing api command: [Ljava.lang.String;@421e6f13
> >> > > > com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
> >> > > > com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> >> > template_store_ref.id<
> >> > > http://template_store_ref.id>,
> >> > > > template_store_ref.store_id, template_store_ref.template_id,
> >> > > > template_store_ref.store_role, template_store_ref.created,
> >> > > > template_store_ref.last_updated, template_store_ref.download_pct,
> >> > > > template_store_ref.size, template_store_ref.physical_size,
> >> > > > template_store_ref.download_state, template_store_ref.local_path,
> >> > > > template_store_ref.error_str, template_store_ref.job_id,
> >> > > > template_store_ref.install_path, template_store_ref.url,
> >> > > > template_store_ref.download_url, template_store_ref.download_
> >> > url_created,
> >> > > > template_store_ref.is_copy, template_store_ref.destroyed,
> >> > > > template_store_ref.update_count, template_store_ref.updated,
> >> > > > template_store_ref.state, template_store_ref.ref_cnt FROM
> >> > > > template_store_ref WHERE template_store_ref.template_id = 3  AND
> >> > > > template_store_ref.download_state != 'BYPASSED'  AND
> >> > > > template_store_ref.destroyed = 0  AND template_store_ref.store_id
> >> IN )
> >> > > > at
> >> > > >
> >> > > >
> >> > > com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(
> >> > GenericDaoBase.java:423)
> >> > > > at
> >> > > >
> >> > > >
> >> > > com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(
> >> > GenericDaoBase.java:359)
> >> > > > at
> com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:348)
> >> > > > at
> >> com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:1308)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl.
> >> > listByTemplateNotBypassed(TemplateDataStoreDaoImpl.java:431)
> >> > > > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.
> >> > invoke0(Native
> >> > > > Method)
> >> > > > at
> >> > > >
> >> > > >
> >> > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
> >> > NativeMethodAccessorImpl.java:62)
> >> > > > at
> >> > > >
> >> > > >
> >> > > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
> >> > DelegatingMethodAccessorImpl.java:43)
> >> > > > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> >> > > > at
> >> > > >
> >> > > >
> >> > >
> >> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
> >> > (AopUtils.java:344)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.springframework.aop.framework.ReflectiveMethodInvocation.
> >> > invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> >> > > > at
> >> > > >
> >> > > >
> >> > >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> >> > ReflectiveMethodInvocation.java:163)
> >> > > > at
> >> > > >
> >> > > >
> >> > > com.cloud.utils.db.TransactionContextInterceptor.invoke(
> >> > TransactionContextInterceptor.java:34)
> >> > > > at
> >> > > >
> >> > > >
> >> > >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> >> > ReflectiveMethodInvocation.java:175)
> >> > > > at
> >> > > >
> >> > > >
> >> > >
> >> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(
> >> > ExposeInvocationInterceptor.java:97)
> >> > > > at
> >> > > >
> >> > > >
> >> > >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> >> > ReflectiveMethodInvocation.java:186)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.springframework.aop.framework.JdkDynamicAopProxy.
> >> > invoke(JdkDynamicAopProxy.java:215)
> >> > > > at com.sun.proxy.$Proxy79.listByTemplateNotBypassed(Unknown
> Source)
> >> > > > at
> >> > > >
> >> > > >
> >> > > com.cloud.api.query.dao.TemplateJoinDaoImpl.newTemplateResponse(
> >> > TemplateJoinDaoImpl.java:165)
> >> > > > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.
> >> > invoke0(Native
> >> > > > Method)
> >> > > > at
> >> > > >
> >> > > >
> >> > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
> >> > NativeMethodAccessorImpl.java:62)
> >> > > > at
> >> > > >
> >> > > >
> >> > > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
> >> > DelegatingMethodAccessorImpl.java:43)
> >> > > > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> >> > > > at
> >> > > >
> >> > > >
> >> > >
> >> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
> >> > (AopUtils.java:344)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.springframework.aop.framework.ReflectiveMethodInvocation.
> >> > invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> >> > > > at
> >> > > >
> >> > > >
> >> > >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> >> > ReflectiveMethodInvocation.java:163)
> >> > > > at
> >> > > >
> >> > > >
> >> > > com.cloud.utils.db.TransactionContextInterceptor.invoke(
> >> > TransactionContextInterceptor.java:34)
> >> > > > at
> >> > > >
> >> > > >
> >> > >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> >> > ReflectiveMethodInvocation.java:175)
> >> > > > at
> >> > > >
> >> > > >
> >> > >
> >> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(
> >> > ExposeInvocationInterceptor.java:97)
> >> > > > at
> >> > > >
> >> > > >
> >> > >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> >> > ReflectiveMethodInvocation.java:186)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.springframework.aop.framework.JdkDynamicAopProxy.
> >> > invoke(JdkDynamicAopProxy.java:215)
> >> > > > at com.sun.proxy.$Proxy308.newTemplateResponse(Unknown Source)
> >> > > > at
> >> com.cloud.api.ApiDBUtils.newTemplateResponse(ApiDBUtils.java:2022)
> >> > > > at
> >> > > >
> >> > > >
> >> > > com.cloud.api.query.ViewResponseHelper.createTemplateResponse(
> >> > ViewResponseHelper.java:590)
> >> > > > at
> >> > > >
> >> > > >
> >> > > com.cloud.api.query.QueryManagerImpl.listTemplates(
> >> > QueryManagerImpl.java:3336)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.apache.cloudstack.api.command.user.template.
> >> > ListTemplatesCmd.execute(ListTemplatesCmd.java:180)
> >> > > > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
> >> > > > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:764)
> >> > > > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588)
> >> > > > at com.cloud.api.ApiServlet.processRequestInContext(
> >> > ApiServlet.java:321)
> >> > > > at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134)
> >> > > > at
> >> > > >
> >> > > >
> >> > >
> >> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(
> >> > DefaultManagedContext.java:55)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
> >> > callWithContext(DefaultManagedContext.java:102)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
> >> > runWithContext(DefaultManagedContext.java:52)
> >> > > > at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131)
> >> > > > at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93)
> >> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
> >> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.servlet.ServletHolder$NotAsync.
> >> > service(ServletHolder.java:1443)
> >> > > > at org.eclipse.jetty.servlet.ServletHolder.handle(
> >> > ServletHolder.java:791)
> >> > > > at
> >> > > >
> >> > > org.eclipse.jetty.servlet.ServletHandler.doHandle(
> >> > ServletHandler.java:550)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.server.handler.ScopedHandler.handle(
> >> > ScopedHandler.java:143)
> >> > > > at
> >> > > >
> >> > > org.eclipse.jetty.security.SecurityHandler.handle(
> >> > SecurityHandler.java:602)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> >> > HandlerWrapper.java:127)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.server.handler.ScopedHandler.
> >> > nextHandle(ScopedHandler.java:235)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.server.session.SessionHandler.
> >> > doHandle(SessionHandler.java:1624)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.server.handler.ScopedHandler.
> >> > nextHandle(ScopedHandler.java:233)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.server.handler.ContextHandler.
> >> > doHandle(ContextHandler.java:1435)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.server.handler.ScopedHandler.
> >> > nextScope(ScopedHandler.java:188)
> >> > > > at
> >> > > > org.eclipse.jetty.servlet.ServletHandler.doScope(
> >> > ServletHandler.java:501)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.server.session.SessionHandler.
> >> > doScope(SessionHandler.java:1594)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.server.handler.ScopedHandler.
> >> > nextScope(ScopedHandler.java:186)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.server.handler.ContextHandler.
> >> > doScope(ContextHandler.java:1350)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.server.handler.ScopedHandler.handle(
> >> > ScopedHandler.java:141)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.server.handler.gzip.GzipHandler.
> >> > handle(GzipHandler.java:766)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.server.handler.HandlerCollection.
> >> > handle(HandlerCollection.java:146)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> >> > HandlerWrapper.java:127)
> >> > > > at org.eclipse.jetty.server.Server.handle(Server.java:516)
> >> > > > at
> >> > > >
> >> > > org.eclipse.jetty.server.HttpChannel.lambda$handle$1(
> >> > HttpChannel.java:388)
> >> > > > at
> >> org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
> >> > > > at
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
> >> > > > at
> >> > > >
> >> > > org.eclipse.jetty.server.HttpConnection.onFillable(
> >> > HttpConnection.java:273)
> >> > > > at
> >> > > > org.eclipse.jetty.io<http://org.eclipse.jetty.io>
> >> > > > .AbstractConnection$ReadCallback.succeeded(
> >> > AbstractConnection.java:311)
> >> > > > at org.eclipse.jetty.io<http://org.eclipse.jetty.io
> >> > > >.FillInterest.fillable(FillInterest.java:105)
> >> > > > at org.eclipse.jetty.io<http://org.eclipse.jetty.io
> >> > > >.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
> >> > runTask(EatWhatYouKill.java:336)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
> >> > doProduce(EatWhatYouKill.java:313)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
> >> > tryProduce(EatWhatYouKill.java:171)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(
> >> > EatWhatYouKill.java:129)
> >> > > > at
> >> > > >
> >> > > >
> >> > >
> >> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(
> >> > ReservedThreadExecutor.java:375)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
> >> > QueuedThreadPool.java:773)
> >> > > > at
> >> > > >
> >> > > >
> >> > > org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(
> >> > QueuedThreadPool.java:905)
> >> > > > at java.base/java.lang.Thread.run(Thread.java:829)
> >> > > > Caused by: java.sql.SQLSyntaxErrorException: You have an error in
> >> your
> >> > > SQL
> >> > > > syntax; check the manual that corresponds to your MySQL server
> >> version
> >> > > for
> >> > > > the right syntax to use near ')' at line 1
> >> > > > at
> >> > > >
> >> > > com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(
> >> > SQLError.java:120)
> >> > > > at
> >> > > >
> >> > > com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(
> >> > SQLError.java:97)
> >> > > > at
> >> > > >
> >> > > >
> >> > >
> com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(
> >> > SQLExceptionsMapping.java:122)
> >> > > > ... 87 more
> >> > > > 2021-09-20 00:27:12,122 DEBUG [c.c.a.ApiServlet]
> >> > > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d)
> >> ===END===
> >> > > >  172.16.10.2 -- GET
> >> > > >
> >> > > >
> >> > > listall=true&templatefilter=all&showunique=true&page=1&
> >> > pagesize=20&command=listTemplates&response=json
> >> > > >
> >> > > >
> >> > > > Could you help me to pinpoint what I may have done wrong?
> >> > > >
> >> > > > On Mon, Sep 20, 2021 at 12:38 AM Harikrishna Patnala <
> >> > > > Harikrishna.Patnala@shapeblue.com<mailto:
> >> > > Harikrishna.Patnala@shapeblue.com>> wrote:
> >> > > >
> >> > > > > Sorry, logs at
> >> /var/log/cloudstack/management/management-server.log
> >> > > > > ________________________________
> >> > > > > From: Harikrishna Patnala <Harikrishna.Patnala@shapeblue.com
> >> <mailto:
> >> > > Harikrishna.Patnala@shapeblue.com>>
> >> > > > > Sent: Monday, September 20, 2021 10:04 AM
> >> > > > > To: users@cloudstack.apache.org<mailto:
> >> users@cloudstack.apache.org>
> >> > <
> >> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> >> > > > > Subject: Re: Problem with Templates/ISO
> >> > > > >
> >> > > > >
> >> > > > > Hi Douglas,
> >> > > > >
> >> > > > > Firstly, welcome to CloudStack.
> >> > > > >
> >> > > > > This looks to me like DB changes did not apply properly during
> >> > > > > installation. Did you observe any issues in the logs during the
> >> > > > management
> >> > > > > server installation or start.
> >> > > > >
> >> > > > > You can check the logs at
> >> > > > > /usr/share/cloudstack/management/management-server.log and see
> the
> >> > > exact
> >> > > > > reason for DB sql exception when you perform the list templates
> >> > > > operation.
> >> > > > >
> >> > > > > As mentioned already there is no change in the system VM
> template
> >> > from
> >> > > > > 4.15.1 to 4.15.2
> >> > > > >
> >> > > > > Regards,
> >> > > > > Harikrishna
> >> > > > > ________________________________
> >> > > > > From: DL <do...@gmail.com>>
> >> > > > > Sent: Monday, September 20, 2021 9:38 AM
> >> > > > > To: users@cloudstack.apache.org<mailto:
> >> users@cloudstack.apache.org>
> >> > <
> >> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> >> > > > > Subject: Problem with Templates/ISO
> >> > > > >
> >> > > > > Hello there,
> >> > > > >
> >> > > > > I am a new CloutStack user and a new user on this mailing list.
> >> After
> >> > > > > following the Quick Installation Guide, I ended up with empty
> >> > > > Template/ISOs
> >> > > > > when I attempted to create a VM instance.
> >> > > > >
> >> > > > > If I go to Images/Templates, I got 500 Internal Server Error:
> >> > > > >
> >> > > > > Request Failed (530)
> >> > > > > DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement:
> SELECT
> >> > > > > template_store_ref.id<http://template_store_ref.id>,
> >> > > template_store_ref.store_id,
> >> > > > > template_store_ref.template_id, template_store_ref.store_role,
> >> > > > > template_store_ref.created, template_store_ref.last_updated,
> >> > > > > template_store_ref.download_pct, template_store_ref.size,
> >> > > > > template_store_ref.physical_size,
> >> template_store_ref.download_state,
> >> > > > > template_store_ref.local_path, template_store_ref.error_str,
> >> > > > > template_store_ref.job_id, template_store_ref.install_path,
> >> > > > > template_store_ref.url, template_store_ref.download_url,
> >> > > > > template_store_ref.download_url_created,
> >> template_store_ref.is_copy,
> >> > > > > template_store_ref.destroyed, template_store_ref.update_count,
> >> > > > > template_store_ref.updated, template_store_ref.state,
> >> > > > > template_store_ref.ref_cnt FROM template_store_ref WHERE
> >> > > > > template_store_ref.template_id = 3 AND
> >> > > template_store_ref.download_state
> >> > > > !=
> >> > > > > 'BYPASSED' AND template_store_ref.destroyed = 0 AND
> >> > > > > template_store_ref.store_id IN )
> >> > > > >
> >> > > > > Could someone help me fix this issue?
> >> > > > >
> >> > > > > The quick installation guide I followed says it is for 4.15.2.0
> >> > > > > installation. However, in the System Template Setup section,
> this
> >> > > > command:
> >> > > > > """
> >> > > > >
> >> > > > >
> >> > > >
> >> > > /usr/share/cloudstack-common/scripts/storage/secondary/
> >> > cloud-install-sys-tmplt
> >> > > > > -m /export/secondary -u
> >> > > > >
> >> > > > >
> >> > > >
> >> > > https://download.cloudstack.org/systemvm/4.15/
> >> > systemvmtemplate-4.15.1-kvm.qcow2.bz2
> >> > > > > -h
> >> > > > > <
> >> > > >
> >> > > https://download.cloudstack.org/systemvm/4.15/
> >> > systemvmtemplate-4.15.1-kvm.qcow2.bz2-h
> >> > > > >
> >> > > > > kvm -F
> >> > > > > """
> >> > > > > seems to suggest that the process will download template vms for
> >> the
> >> > > > > 4.15.1.0 version?
> >> > > > >
> >> > > > > Could this be the reason? Does anyone have an idea about when
> the
> >> > > > Template
> >> > > > > for the 4.15.2.0 version will be available?
> >> > > > >
> >> > > > > Best regards,
> >> > > > > Douglas
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > >
> >> > >
> >> > >
> >> > >
> >> > >
> >> > >
> >> > >
> >> >
> >>
> >
>

Re: Problem with Templates/ISO

Posted by DL <do...@gmail.com>.
Dear Pearl, Harikrishna, and Wei,

Thank you all for your helpful input!
With great joy, I'd like to share the reason for the various issues I
encountered when following the Quick Installation Guide.

In short, the reason is that the network adapters of the VMs that I use to
deploy CloudStack are not in the correct Promiscuous Mode. After I set the
network adapters as "Promiscuous Mode: Allow All" in VirtualBox, all the
issues are gone!

As I mentioned before, I am using one VM as the gateway server, and one VM
to deploy CloudStack. Let's call the VM that serves as the gateway server
as VM1, and the VM that I want to deploy CloudStack onto as VM2.
VM1 has two interfaces. The first interface enp0s3 is a NAT adapter. So,
this interface uses DHCP and gets Internet access automatically. The second
interface, enp0s8, with IP address 172.16.10.1 is an Internal Network
adapter. It is the gateway.
VM2 has only one interface, enp0s3, which is also an Internal Network
adapter. It uses IP 172.16.10.2.
VM2 can have Internet access through the gateway. However, according to the
Quick Installation Guide, other VMs created on this VM2 all attach to the
newly created bridge (cloudbr0) first.
Initially, I used the default setting for the Promiscuous Mode (i.e., Deny)
for adapters enp0s8 on VM1 and enp0s3 on VM2. It seems that, with this
setting, the system VMs created by CloudStack cannot reach the gateway
172.16.10.1, and thus cannot connect to the Internet. As all symptoms point
to a connectivity issue, I tried several hypotheses to try to resolve
the issue.
After I changed the Promiscuous Mode to "Allow All" for the two adapters in
VirtualBox, now the system VMs can connect to the Internet fine!

I have successfully created an ISO through URL and launched a VM with the
ISO!
I still could not upload an ISO from the local file system. As this is
expected, I will not try to get this feature working. I will just create
ISOs through URLs if I need any.


Do you think configuring the network adapters as "Promiscuous Mode: Allow
All" (or at least as Allow VMs) should be mentioned in the Quick
Installation Guide?
I believe many people are using the virtual environment to test drive
CloudStack.
I am not sure whether this is a basic setting that everyone will
automatically use. But this setting is in the Advanced setting section in
VirtualBox, and the default setting is "Deny" even for Internal Network
adapters.
If this can be mentioned in the installation guide beforehand, it can
potentially save the time newcomers may need to spend to realize that this
is a problem.

Thanks again for the help!

Best regards,
Douglas




On Tue, Sep 21, 2021 at 6:54 PM DL <do...@gmail.com> wrote:

> Hello Wei,
>
> Thanks for the comment. Yes, the problem seems to be here. If I go to the
> SSVM console, it cannot connect to the Internet.
> The consoleproxy VM cannot connect to the Internet either.
>
> I don't think I should change configurations within these system VMs, as
> the Quick Installation Guide doesn't mention anything about configuring the
> system VMs.
> Is it because I missed something during the previous configuration
> process? What could have caused this problem?
>
> Best regards,
>
>
> On Tue, Sep 21, 2021 at 3:55 PM Wei ZHOU <us...@gmail.com> wrote:
>
>> It looks ssvm is not working well.
>> Please make sure that ssvm can connect to internet.
>>
>> -Wei
>>
>> On Tuesday, 21 September 2021, DL <do...@gmail.com> wrote:
>>
>> > The "SystemVM Template (KVM)" is ready. However, the "CentOS 5.5(64bit)
>> no
>> > GUI (KVM)" template is not ready; the status says "Unable to resolve
>> > download.cloudstack.org."
>> > This issue is similar to the error I encountered when I tried to
>> register
>> > an online ISO.
>> > If I use the browser, I can visit any website. I can ping
>> > download.cloudstack.org from the terminal fine. However, cloudstack
>> seems
>> > not able to reach the public Internet.
>> > Is CloudStack using a different way to reach the Internet?
>> >
>> >
>> >
>> > On Tue, Sep 21, 2021 at 2:10 AM Pearl d'Silva <
>> pearl.dsilva@shapeblue.com>
>> > wrote:
>> >
>> > > Hi,
>> > >
>> > > One of the reasons why the templates may not be showing up in the VM
>> > > deployment wizard is because they aren't in the ready state. You can
>> > verify
>> > > that by going into the respective template's info and in the zone tab
>> > you'd
>> > > probably notice that the template(s) aren't in ready state. Ideally,
>> once
>> > > the SystemVMs, essentially, Secondary storage VM(SSVM) is up, it
>> should
>> > > sync the templates (the systemVM template (that you had initially
>> seeded)
>> > > and the built-in template). Do you see an errors in the management
>> server
>> > > logs that could be helpful.
>> > > Can you log into your database (cloud) and see if you see any entries
>> in
>> > > the template_store_ref table. I understand you are on a KVM based env,
>> > so,
>> > > select * from template_store_ref where template_id=4\G      -
>> template_id
>> > > = 4 - refers to a built-in template that gets downloaded.
>> > >
>> > > Do you see any exceptions when trying to register a new template ?
>> > > For management server logs - look into
>> > > /var/log/cloudstack/management/management-server.log
>> > > Another place to look at would be the SSVM (which plays an integral
>> role
>> > > in downloading templates)
>> > > Please refer to
>> > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/
>> > SSVM%2C+templates%2C+Secondary+storage+troubleshooting
>> > > to log into and debug the SSVM.  To increase the log level in your
>> SSVM -
>> > > you can run the following:
>> > > sed -i 's/INFO/DEBUG/g' /usr/local/cloud/systemvm/conf/log4j-cloud.xml
>> > and
>> > > then restart the cloud service : systemctl restart cloud
>> > > In the SSVM, you can observe the logs at /var/log/cloud.log
>> > >
>> > > To setup an SSL enabled env you could follow this link -
>> > > https://www.shapeblue.com/securing-cloudstack-4-11-with-https-tls/
>> or as
>> > > a temporary hack, you can enter the SSVMs IP Address in the browser's
>> url
>> > > field with https scheme (https://<IP Address>) and accept the risk,
>> > > before trying to upload the template.
>> > >
>> > > Hope this helps.
>> > >
>> > > Thanks
>> > >
>> > >
>> > > ________________________________
>> > > From: DL <do...@gmail.com>
>> > > Sent: Tuesday, September 21, 2021 10:51 AM
>> > > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
>> > > Subject: Re: Problem with Templates/ISO
>> > >
>> > > The system VMs are up and running.
>> > > The Zone shows enabled.
>> > >
>> > > I have another VM in VirtualBox serving as the gateway server for the
>> > > cloudstack VM.
>> > > The gateway IP is 172.16.10.1. The cloudstack VM's IP is 172.16.10.2.
>> > > As instructed, the gateway server is only a gateway, not a DHCP
>> server.
>> > > The cloudstack VM can use the gateway to access the Internet fine.
>> > > I can SSH from the gateway server into the cloudstack VM fine.
>> > >
>> > > How do I make my env setup SSL enabled?
>> > > Am I supposed to see some existing Templates/ISOs when creating a new
>> VM
>> > > instance? Or am I supposed to create some Templates/ISOs by myself
>> first?
>> > >
>> > >
>> > >
>> > > On Tue, Sep 21, 2021 at 12:20 AM Pearl d'Silva <
>> > pearl.dsilva@shapeblue.com
>> > > <ma...@shapeblue.com>> wrote:
>> > > Hi Douglas,
>> > >
>> > > Could you please let us know the following:
>> > >
>> > >   *   Do you see the systemVMs are up and running (Infratructure ->
>> > System
>> > > VMs)?
>> > >   *   Is the zone enabled? (Infrastructure -> Zones (specific zone's
>> > > Allocation State))
>> > >
>> > > Providing some insight into the state of your env - by answering the
>> > above
>> > > questions, may help us diagnose the issue better wrt template
>> > registration
>> > > failure. With regards to template/iso upload(from local) failure -
>> this
>> > > would be expected if your env setup isn't SSL enabled. The issues you
>> may
>> > > be facing could also be due to your infrastructure / network topology.
>> > > The Quick installation guide is up to date and should work, however if
>> > you
>> > > are facing issues you may refer to
>> > > https://github.com/shapeblue/hackerbook/blob/main/1-user.md to setup
>> a
>> > > basic env. Another resource you could look at is
>> > > https://github.com/shapeblue/mbx - this will setup an env for you -
>> > > please do follow the Readme. That said, if you see any issues with the
>> > > documentation, you can report them i.e., create an issue/ pull request
>> > > against the respective projects on GitHub and we can help improve
>> them.
>> > >
>> > > Thanks,
>> > > Pearl
>> > >
>> > >
>> > >
>> > > ________________________________
>> > > From: DL <do...@gmail.com>>
>> > > Sent: Tuesday, September 21, 2021 12:43 AM
>> > > To: users@cloudstack.apache.org<ma...@cloudstack.apache.org> <
>> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
>> > > Subject: Re: Problem with Templates/ISO
>> > >
>> > > Hi Pearl,
>> > >
>> > > Following your solution, I added the Secondary Storage, and now two
>> > > Templates and two ISOs shows under the Images tab.
>> > > However, I still couldn't see any Templates/ISOs in the Template/ISO
>> > > configuration page when I tried to create a new VM instance.
>> > >
>> > > I tried to Register ISO also. If I use an online ISO, cloudstack would
>> > show
>> > > me that the url hostname cannot be resolved. (Of course, I can use the
>> > > browser to download the ISO fine)
>> > > If I want to upload an ISO from the local machine, cloudstack would
>> > report
>> > > an error saying that it cannot reach the management server (or some
>> web
>> > > browser extensions may have blocked the request). I have a single
>> machine
>> > > doing all the things. I also checked that all required processes are
>> > > running. My browser doesn't use any extensions.
>> > >
>> > > I am using a CentOS 7 virtual machine within VirtualBox to follow the
>> > Quick
>> > > Installation Guide (
>> > >
>> http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.
>> > html
>> > > ).
>> > > I have made everything identical to that of the Quick Installation
>> Guide.
>> > > However, I still encountered various issues.
>> > >
>> > > The first issue is that after I configured the Zone, Pod, Cluster,
>> etc,
>> > and
>> > > launched the Zone, every time (I have done this with multiple VMs) the
>> > > system would hang at the last step "Adding Host" forever. I really
>> mean
>> > > forever. And it didn't even report what error it encountered. I have
>> to
>> > > close the window. After this, I would see, the host has been added to
>> the
>> > > Zone successfully. However, the Primary Storage and the Secondary
>> Storage
>> > > were not added. I believe this is why I needed to add the Secondary
>> > Storage
>> > > (and also the Primary Storage) manually.
>> > > But after this, I still could not see/add any Templates/ISOs.
>> > >
>> > >
>> > > I didn't expect so many issues by just following the simplest Quick
>> > > Installation Guide.
>> > > Is there anything I should pay special attention to while following
>> the
>> > > Quick Installation Guide?
>> > > Does the Quick Installation Guide still work for the latest version?
>> I do
>> > > notice that the instructions don't mention some options I was faced
>> with
>> > > during the installation/configuration process. I just chose default
>> > > options. Would this cause any issues?
>> > > Are there any better Installation Guides I should try instead?
>> > > Are there any existing clouds (built with CloudStack) that I can play
>> > with
>> > > for free (or with minimal costs)?
>> > >
>> > > Sorry for asking so many questions. I just want to get started.
>> > >
>> > > Best regards,
>> > >
>> > >
>> > > On Mon, Sep 20, 2021 at 12:55 AM Pearl d'Silva <
>> > pearl.dsilva@shapeblue.com
>> > > <ma...@shapeblue.com>>
>> > > wrote:
>> > >
>> > > > Hi Douglas,
>> > > >
>> > > >
>> > > > That seems to be the issue, you will need to add a store to the
>> zone.
>> > You
>> > > > can do that either via UI / command line. On the UI, there is the
>> "Add
>> > > > Secondary Storage" button, provide the zone, the server IP/name, and
>> > the
>> > > > path (in your case, /export/secondary).
>> > > >
>> > > >
>> > > > Thanks,
>> > > > Pearl
>> > > > ________________________________
>> > > > From: DL <do...@gmail.com>>
>> > > > Sent: Monday, September 20, 2021 10:16 AM
>> > > > To: users@cloudstack.apache.org<ma...@cloudstack.apache.org>
>> <
>> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
>> > > > Subject: Re: Problem with Templates/ISO
>> > > >
>> > > > @Pearl
>> > > > I can go to the Infrastructure -> Secondary Storage tab. However,
>> > nothing
>> > > > is there.
>> > > >
>> > > > @Harikrishna
>> > > > Thank you also for getting back to me!
>> > > >
>> > > > Here is what I found related to the error in the log:
>> > > >
>> > > > 2021-09-20 00:27:12,093 DEBUG [c.c.a.ApiServlet]
>> > > > (qtp1136768342-20:ctx-d9bd1f44) (logid:a56ace1d) ===START===
>> > 172.16.10.2
>> > > > -- GET
>> > > >
>> > > >
>> > > listall=true&templatefilter=all&showunique=true&page=1&
>> > pagesize=20&command=listTemplates&response=json
>> > > > 2021-09-20 00:27:12,097 DEBUG [c.c.a.ApiServer]
>> > > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) CIDRs
>> > from
>> > > > which account 'Acct[2e801633-1977-11ec-98da-5254005ad990-admin]' is
>> > > allowed
>> > > > to perform API calls: 0.0.0.0/0,::/0<http://0.0.0.0/0,::/0>
>> > > > 2021-09-20 00:27:12,110 ERROR [c.c.a.ApiServer]
>> > > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d)
>> unhandled
>> > > > exception executing api command: [Ljava.lang.String;@421e6f13
>> > > > com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
>> > > > com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
>> > template_store_ref.id<
>> > > http://template_store_ref.id>,
>> > > > template_store_ref.store_id, template_store_ref.template_id,
>> > > > template_store_ref.store_role, template_store_ref.created,
>> > > > template_store_ref.last_updated, template_store_ref.download_pct,
>> > > > template_store_ref.size, template_store_ref.physical_size,
>> > > > template_store_ref.download_state, template_store_ref.local_path,
>> > > > template_store_ref.error_str, template_store_ref.job_id,
>> > > > template_store_ref.install_path, template_store_ref.url,
>> > > > template_store_ref.download_url, template_store_ref.download_
>> > url_created,
>> > > > template_store_ref.is_copy, template_store_ref.destroyed,
>> > > > template_store_ref.update_count, template_store_ref.updated,
>> > > > template_store_ref.state, template_store_ref.ref_cnt FROM
>> > > > template_store_ref WHERE template_store_ref.template_id = 3  AND
>> > > > template_store_ref.download_state != 'BYPASSED'  AND
>> > > > template_store_ref.destroyed = 0  AND template_store_ref.store_id
>> IN )
>> > > > at
>> > > >
>> > > >
>> > > com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(
>> > GenericDaoBase.java:423)
>> > > > at
>> > > >
>> > > >
>> > > com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(
>> > GenericDaoBase.java:359)
>> > > > at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:348)
>> > > > at
>> com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:1308)
>> > > > at
>> > > >
>> > > >
>> > > org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl.
>> > listByTemplateNotBypassed(TemplateDataStoreDaoImpl.java:431)
>> > > > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.
>> > invoke0(Native
>> > > > Method)
>> > > > at
>> > > >
>> > > >
>> > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
>> > NativeMethodAccessorImpl.java:62)
>> > > > at
>> > > >
>> > > >
>> > > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
>> > DelegatingMethodAccessorImpl.java:43)
>> > > > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>> > > > at
>> > > >
>> > > >
>> > >
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
>> > (AopUtils.java:344)
>> > > > at
>> > > >
>> > > >
>> > > org.springframework.aop.framework.ReflectiveMethodInvocation.
>> > invokeJoinpoint(ReflectiveMethodInvocation.java:198)
>> > > > at
>> > > >
>> > > >
>> > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
>> > ReflectiveMethodInvocation.java:163)
>> > > > at
>> > > >
>> > > >
>> > > com.cloud.utils.db.TransactionContextInterceptor.invoke(
>> > TransactionContextInterceptor.java:34)
>> > > > at
>> > > >
>> > > >
>> > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
>> > ReflectiveMethodInvocation.java:175)
>> > > > at
>> > > >
>> > > >
>> > >
>> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(
>> > ExposeInvocationInterceptor.java:97)
>> > > > at
>> > > >
>> > > >
>> > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
>> > ReflectiveMethodInvocation.java:186)
>> > > > at
>> > > >
>> > > >
>> > > org.springframework.aop.framework.JdkDynamicAopProxy.
>> > invoke(JdkDynamicAopProxy.java:215)
>> > > > at com.sun.proxy.$Proxy79.listByTemplateNotBypassed(Unknown Source)
>> > > > at
>> > > >
>> > > >
>> > > com.cloud.api.query.dao.TemplateJoinDaoImpl.newTemplateResponse(
>> > TemplateJoinDaoImpl.java:165)
>> > > > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.
>> > invoke0(Native
>> > > > Method)
>> > > > at
>> > > >
>> > > >
>> > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
>> > NativeMethodAccessorImpl.java:62)
>> > > > at
>> > > >
>> > > >
>> > > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
>> > DelegatingMethodAccessorImpl.java:43)
>> > > > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>> > > > at
>> > > >
>> > > >
>> > >
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
>> > (AopUtils.java:344)
>> > > > at
>> > > >
>> > > >
>> > > org.springframework.aop.framework.ReflectiveMethodInvocation.
>> > invokeJoinpoint(ReflectiveMethodInvocation.java:198)
>> > > > at
>> > > >
>> > > >
>> > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
>> > ReflectiveMethodInvocation.java:163)
>> > > > at
>> > > >
>> > > >
>> > > com.cloud.utils.db.TransactionContextInterceptor.invoke(
>> > TransactionContextInterceptor.java:34)
>> > > > at
>> > > >
>> > > >
>> > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
>> > ReflectiveMethodInvocation.java:175)
>> > > > at
>> > > >
>> > > >
>> > >
>> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(
>> > ExposeInvocationInterceptor.java:97)
>> > > > at
>> > > >
>> > > >
>> > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
>> > ReflectiveMethodInvocation.java:186)
>> > > > at
>> > > >
>> > > >
>> > > org.springframework.aop.framework.JdkDynamicAopProxy.
>> > invoke(JdkDynamicAopProxy.java:215)
>> > > > at com.sun.proxy.$Proxy308.newTemplateResponse(Unknown Source)
>> > > > at
>> com.cloud.api.ApiDBUtils.newTemplateResponse(ApiDBUtils.java:2022)
>> > > > at
>> > > >
>> > > >
>> > > com.cloud.api.query.ViewResponseHelper.createTemplateResponse(
>> > ViewResponseHelper.java:590)
>> > > > at
>> > > >
>> > > >
>> > > com.cloud.api.query.QueryManagerImpl.listTemplates(
>> > QueryManagerImpl.java:3336)
>> > > > at
>> > > >
>> > > >
>> > > org.apache.cloudstack.api.command.user.template.
>> > ListTemplatesCmd.execute(ListTemplatesCmd.java:180)
>> > > > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
>> > > > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:764)
>> > > > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588)
>> > > > at com.cloud.api.ApiServlet.processRequestInContext(
>> > ApiServlet.java:321)
>> > > > at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134)
>> > > > at
>> > > >
>> > > >
>> > >
>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(
>> > DefaultManagedContext.java:55)
>> > > > at
>> > > >
>> > > >
>> > > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
>> > callWithContext(DefaultManagedContext.java:102)
>> > > > at
>> > > >
>> > > >
>> > > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
>> > runWithContext(DefaultManagedContext.java:52)
>> > > > at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131)
>> > > > at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93)
>> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
>> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.servlet.ServletHolder$NotAsync.
>> > service(ServletHolder.java:1443)
>> > > > at org.eclipse.jetty.servlet.ServletHolder.handle(
>> > ServletHolder.java:791)
>> > > > at
>> > > >
>> > > org.eclipse.jetty.servlet.ServletHandler.doHandle(
>> > ServletHandler.java:550)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.server.handler.ScopedHandler.handle(
>> > ScopedHandler.java:143)
>> > > > at
>> > > >
>> > > org.eclipse.jetty.security.SecurityHandler.handle(
>> > SecurityHandler.java:602)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>> > HandlerWrapper.java:127)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.server.handler.ScopedHandler.
>> > nextHandle(ScopedHandler.java:235)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.server.session.SessionHandler.
>> > doHandle(SessionHandler.java:1624)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.server.handler.ScopedHandler.
>> > nextHandle(ScopedHandler.java:233)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.server.handler.ContextHandler.
>> > doHandle(ContextHandler.java:1435)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.server.handler.ScopedHandler.
>> > nextScope(ScopedHandler.java:188)
>> > > > at
>> > > > org.eclipse.jetty.servlet.ServletHandler.doScope(
>> > ServletHandler.java:501)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.server.session.SessionHandler.
>> > doScope(SessionHandler.java:1594)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.server.handler.ScopedHandler.
>> > nextScope(ScopedHandler.java:186)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.server.handler.ContextHandler.
>> > doScope(ContextHandler.java:1350)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.server.handler.ScopedHandler.handle(
>> > ScopedHandler.java:141)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.server.handler.gzip.GzipHandler.
>> > handle(GzipHandler.java:766)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.server.handler.HandlerCollection.
>> > handle(HandlerCollection.java:146)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>> > HandlerWrapper.java:127)
>> > > > at org.eclipse.jetty.server.Server.handle(Server.java:516)
>> > > > at
>> > > >
>> > > org.eclipse.jetty.server.HttpChannel.lambda$handle$1(
>> > HttpChannel.java:388)
>> > > > at
>> org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
>> > > > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
>> > > > at
>> > > >
>> > > org.eclipse.jetty.server.HttpConnection.onFillable(
>> > HttpConnection.java:273)
>> > > > at
>> > > > org.eclipse.jetty.io<http://org.eclipse.jetty.io>
>> > > > .AbstractConnection$ReadCallback.succeeded(
>> > AbstractConnection.java:311)
>> > > > at org.eclipse.jetty.io<http://org.eclipse.jetty.io
>> > > >.FillInterest.fillable(FillInterest.java:105)
>> > > > at org.eclipse.jetty.io<http://org.eclipse.jetty.io
>> > > >.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
>> > runTask(EatWhatYouKill.java:336)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
>> > doProduce(EatWhatYouKill.java:313)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
>> > tryProduce(EatWhatYouKill.java:171)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(
>> > EatWhatYouKill.java:129)
>> > > > at
>> > > >
>> > > >
>> > >
>> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(
>> > ReservedThreadExecutor.java:375)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
>> > QueuedThreadPool.java:773)
>> > > > at
>> > > >
>> > > >
>> > > org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(
>> > QueuedThreadPool.java:905)
>> > > > at java.base/java.lang.Thread.run(Thread.java:829)
>> > > > Caused by: java.sql.SQLSyntaxErrorException: You have an error in
>> your
>> > > SQL
>> > > > syntax; check the manual that corresponds to your MySQL server
>> version
>> > > for
>> > > > the right syntax to use near ')' at line 1
>> > > > at
>> > > >
>> > > com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(
>> > SQLError.java:120)
>> > > > at
>> > > >
>> > > com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(
>> > SQLError.java:97)
>> > > > at
>> > > >
>> > > >
>> > > com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(
>> > SQLExceptionsMapping.java:122)
>> > > > ... 87 more
>> > > > 2021-09-20 00:27:12,122 DEBUG [c.c.a.ApiServlet]
>> > > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d)
>> ===END===
>> > > >  172.16.10.2 -- GET
>> > > >
>> > > >
>> > > listall=true&templatefilter=all&showunique=true&page=1&
>> > pagesize=20&command=listTemplates&response=json
>> > > >
>> > > >
>> > > > Could you help me to pinpoint what I may have done wrong?
>> > > >
>> > > > On Mon, Sep 20, 2021 at 12:38 AM Harikrishna Patnala <
>> > > > Harikrishna.Patnala@shapeblue.com<mailto:
>> > > Harikrishna.Patnala@shapeblue.com>> wrote:
>> > > >
>> > > > > Sorry, logs at
>> /var/log/cloudstack/management/management-server.log
>> > > > > ________________________________
>> > > > > From: Harikrishna Patnala <Harikrishna.Patnala@shapeblue.com
>> <mailto:
>> > > Harikrishna.Patnala@shapeblue.com>>
>> > > > > Sent: Monday, September 20, 2021 10:04 AM
>> > > > > To: users@cloudstack.apache.org<mailto:
>> users@cloudstack.apache.org>
>> > <
>> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
>> > > > > Subject: Re: Problem with Templates/ISO
>> > > > >
>> > > > >
>> > > > > Hi Douglas,
>> > > > >
>> > > > > Firstly, welcome to CloudStack.
>> > > > >
>> > > > > This looks to me like DB changes did not apply properly during
>> > > > > installation. Did you observe any issues in the logs during the
>> > > > management
>> > > > > server installation or start.
>> > > > >
>> > > > > You can check the logs at
>> > > > > /usr/share/cloudstack/management/management-server.log and see the
>> > > exact
>> > > > > reason for DB sql exception when you perform the list templates
>> > > > operation.
>> > > > >
>> > > > > As mentioned already there is no change in the system VM template
>> > from
>> > > > > 4.15.1 to 4.15.2
>> > > > >
>> > > > > Regards,
>> > > > > Harikrishna
>> > > > > ________________________________
>> > > > > From: DL <do...@gmail.com>>
>> > > > > Sent: Monday, September 20, 2021 9:38 AM
>> > > > > To: users@cloudstack.apache.org<mailto:
>> users@cloudstack.apache.org>
>> > <
>> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
>> > > > > Subject: Problem with Templates/ISO
>> > > > >
>> > > > > Hello there,
>> > > > >
>> > > > > I am a new CloutStack user and a new user on this mailing list.
>> After
>> > > > > following the Quick Installation Guide, I ended up with empty
>> > > > Template/ISOs
>> > > > > when I attempted to create a VM instance.
>> > > > >
>> > > > > If I go to Images/Templates, I got 500 Internal Server Error:
>> > > > >
>> > > > > Request Failed (530)
>> > > > > DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
>> > > > > template_store_ref.id<http://template_store_ref.id>,
>> > > template_store_ref.store_id,
>> > > > > template_store_ref.template_id, template_store_ref.store_role,
>> > > > > template_store_ref.created, template_store_ref.last_updated,
>> > > > > template_store_ref.download_pct, template_store_ref.size,
>> > > > > template_store_ref.physical_size,
>> template_store_ref.download_state,
>> > > > > template_store_ref.local_path, template_store_ref.error_str,
>> > > > > template_store_ref.job_id, template_store_ref.install_path,
>> > > > > template_store_ref.url, template_store_ref.download_url,
>> > > > > template_store_ref.download_url_created,
>> template_store_ref.is_copy,
>> > > > > template_store_ref.destroyed, template_store_ref.update_count,
>> > > > > template_store_ref.updated, template_store_ref.state,
>> > > > > template_store_ref.ref_cnt FROM template_store_ref WHERE
>> > > > > template_store_ref.template_id = 3 AND
>> > > template_store_ref.download_state
>> > > > !=
>> > > > > 'BYPASSED' AND template_store_ref.destroyed = 0 AND
>> > > > > template_store_ref.store_id IN )
>> > > > >
>> > > > > Could someone help me fix this issue?
>> > > > >
>> > > > > The quick installation guide I followed says it is for 4.15.2.0
>> > > > > installation. However, in the System Template Setup section, this
>> > > > command:
>> > > > > """
>> > > > >
>> > > > >
>> > > >
>> > > /usr/share/cloudstack-common/scripts/storage/secondary/
>> > cloud-install-sys-tmplt
>> > > > > -m /export/secondary -u
>> > > > >
>> > > > >
>> > > >
>> > > https://download.cloudstack.org/systemvm/4.15/
>> > systemvmtemplate-4.15.1-kvm.qcow2.bz2
>> > > > > -h
>> > > > > <
>> > > >
>> > > https://download.cloudstack.org/systemvm/4.15/
>> > systemvmtemplate-4.15.1-kvm.qcow2.bz2-h
>> > > > >
>> > > > > kvm -F
>> > > > > """
>> > > > > seems to suggest that the process will download template vms for
>> the
>> > > > > 4.15.1.0 version?
>> > > > >
>> > > > > Could this be the reason? Does anyone have an idea about when the
>> > > > Template
>> > > > > for the 4.15.2.0 version will be available?
>> > > > >
>> > > > > Best regards,
>> > > > > Douglas
>> > > >
>> > > >
>> > > >
>> > > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> >
>>
>

Re: Problem with Templates/ISO

Posted by DL <do...@gmail.com>.
Hello Wei,

Thanks for the comment. Yes, the problem seems to be here. If I go to the
SSVM console, it cannot connect to the Internet.
The consoleproxy VM cannot connect to the Internet either.

I don't think I should change configurations within these system VMs, as
the Quick Installation Guide doesn't mention anything about configuring the
system VMs.
Is it because I missed something during the previous configuration process?
What could have caused this problem?

Best regards,


On Tue, Sep 21, 2021 at 3:55 PM Wei ZHOU <us...@gmail.com> wrote:

> It looks ssvm is not working well.
> Please make sure that ssvm can connect to internet.
>
> -Wei
>
> On Tuesday, 21 September 2021, DL <do...@gmail.com> wrote:
>
> > The "SystemVM Template (KVM)" is ready. However, the "CentOS 5.5(64bit)
> no
> > GUI (KVM)" template is not ready; the status says "Unable to resolve
> > download.cloudstack.org."
> > This issue is similar to the error I encountered when I tried to register
> > an online ISO.
> > If I use the browser, I can visit any website. I can ping
> > download.cloudstack.org from the terminal fine. However, cloudstack
> seems
> > not able to reach the public Internet.
> > Is CloudStack using a different way to reach the Internet?
> >
> >
> >
> > On Tue, Sep 21, 2021 at 2:10 AM Pearl d'Silva <
> pearl.dsilva@shapeblue.com>
> > wrote:
> >
> > > Hi,
> > >
> > > One of the reasons why the templates may not be showing up in the VM
> > > deployment wizard is because they aren't in the ready state. You can
> > verify
> > > that by going into the respective template's info and in the zone tab
> > you'd
> > > probably notice that the template(s) aren't in ready state. Ideally,
> once
> > > the SystemVMs, essentially, Secondary storage VM(SSVM) is up, it should
> > > sync the templates (the systemVM template (that you had initially
> seeded)
> > > and the built-in template). Do you see an errors in the management
> server
> > > logs that could be helpful.
> > > Can you log into your database (cloud) and see if you see any entries
> in
> > > the template_store_ref table. I understand you are on a KVM based env,
> > so,
> > > select * from template_store_ref where template_id=4\G      -
> template_id
> > > = 4 - refers to a built-in template that gets downloaded.
> > >
> > > Do you see any exceptions when trying to register a new template ?
> > > For management server logs - look into
> > > /var/log/cloudstack/management/management-server.log
> > > Another place to look at would be the SSVM (which plays an integral
> role
> > > in downloading templates)
> > > Please refer to
> > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/
> > SSVM%2C+templates%2C+Secondary+storage+troubleshooting
> > > to log into and debug the SSVM.  To increase the log level in your
> SSVM -
> > > you can run the following:
> > > sed -i 's/INFO/DEBUG/g' /usr/local/cloud/systemvm/conf/log4j-cloud.xml
> > and
> > > then restart the cloud service : systemctl restart cloud
> > > In the SSVM, you can observe the logs at /var/log/cloud.log
> > >
> > > To setup an SSL enabled env you could follow this link -
> > > https://www.shapeblue.com/securing-cloudstack-4-11-with-https-tls/ or
> as
> > > a temporary hack, you can enter the SSVMs IP Address in the browser's
> url
> > > field with https scheme (https://<IP Address>) and accept the risk,
> > > before trying to upload the template.
> > >
> > > Hope this helps.
> > >
> > > Thanks
> > >
> > >
> > > ________________________________
> > > From: DL <do...@gmail.com>
> > > Sent: Tuesday, September 21, 2021 10:51 AM
> > > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> > > Subject: Re: Problem with Templates/ISO
> > >
> > > The system VMs are up and running.
> > > The Zone shows enabled.
> > >
> > > I have another VM in VirtualBox serving as the gateway server for the
> > > cloudstack VM.
> > > The gateway IP is 172.16.10.1. The cloudstack VM's IP is 172.16.10.2.
> > > As instructed, the gateway server is only a gateway, not a DHCP server.
> > > The cloudstack VM can use the gateway to access the Internet fine.
> > > I can SSH from the gateway server into the cloudstack VM fine.
> > >
> > > How do I make my env setup SSL enabled?
> > > Am I supposed to see some existing Templates/ISOs when creating a new
> VM
> > > instance? Or am I supposed to create some Templates/ISOs by myself
> first?
> > >
> > >
> > >
> > > On Tue, Sep 21, 2021 at 12:20 AM Pearl d'Silva <
> > pearl.dsilva@shapeblue.com
> > > <ma...@shapeblue.com>> wrote:
> > > Hi Douglas,
> > >
> > > Could you please let us know the following:
> > >
> > >   *   Do you see the systemVMs are up and running (Infratructure ->
> > System
> > > VMs)?
> > >   *   Is the zone enabled? (Infrastructure -> Zones (specific zone's
> > > Allocation State))
> > >
> > > Providing some insight into the state of your env - by answering the
> > above
> > > questions, may help us diagnose the issue better wrt template
> > registration
> > > failure. With regards to template/iso upload(from local) failure - this
> > > would be expected if your env setup isn't SSL enabled. The issues you
> may
> > > be facing could also be due to your infrastructure / network topology.
> > > The Quick installation guide is up to date and should work, however if
> > you
> > > are facing issues you may refer to
> > > https://github.com/shapeblue/hackerbook/blob/main/1-user.md to setup a
> > > basic env. Another resource you could look at is
> > > https://github.com/shapeblue/mbx - this will setup an env for you -
> > > please do follow the Readme. That said, if you see any issues with the
> > > documentation, you can report them i.e., create an issue/ pull request
> > > against the respective projects on GitHub and we can help improve them.
> > >
> > > Thanks,
> > > Pearl
> > >
> > >
> > >
> > > ________________________________
> > > From: DL <do...@gmail.com>>
> > > Sent: Tuesday, September 21, 2021 12:43 AM
> > > To: users@cloudstack.apache.org<ma...@cloudstack.apache.org> <
> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > > Subject: Re: Problem with Templates/ISO
> > >
> > > Hi Pearl,
> > >
> > > Following your solution, I added the Secondary Storage, and now two
> > > Templates and two ISOs shows under the Images tab.
> > > However, I still couldn't see any Templates/ISOs in the Template/ISO
> > > configuration page when I tried to create a new VM instance.
> > >
> > > I tried to Register ISO also. If I use an online ISO, cloudstack would
> > show
> > > me that the url hostname cannot be resolved. (Of course, I can use the
> > > browser to download the ISO fine)
> > > If I want to upload an ISO from the local machine, cloudstack would
> > report
> > > an error saying that it cannot reach the management server (or some web
> > > browser extensions may have blocked the request). I have a single
> machine
> > > doing all the things. I also checked that all required processes are
> > > running. My browser doesn't use any extensions.
> > >
> > > I am using a CentOS 7 virtual machine within VirtualBox to follow the
> > Quick
> > > Installation Guide (
> > > http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig
> .
> > html
> > > ).
> > > I have made everything identical to that of the Quick Installation
> Guide.
> > > However, I still encountered various issues.
> > >
> > > The first issue is that after I configured the Zone, Pod, Cluster, etc,
> > and
> > > launched the Zone, every time (I have done this with multiple VMs) the
> > > system would hang at the last step "Adding Host" forever. I really mean
> > > forever. And it didn't even report what error it encountered. I have to
> > > close the window. After this, I would see, the host has been added to
> the
> > > Zone successfully. However, the Primary Storage and the Secondary
> Storage
> > > were not added. I believe this is why I needed to add the Secondary
> > Storage
> > > (and also the Primary Storage) manually.
> > > But after this, I still could not see/add any Templates/ISOs.
> > >
> > >
> > > I didn't expect so many issues by just following the simplest Quick
> > > Installation Guide.
> > > Is there anything I should pay special attention to while following the
> > > Quick Installation Guide?
> > > Does the Quick Installation Guide still work for the latest version? I
> do
> > > notice that the instructions don't mention some options I was faced
> with
> > > during the installation/configuration process. I just chose default
> > > options. Would this cause any issues?
> > > Are there any better Installation Guides I should try instead?
> > > Are there any existing clouds (built with CloudStack) that I can play
> > with
> > > for free (or with minimal costs)?
> > >
> > > Sorry for asking so many questions. I just want to get started.
> > >
> > > Best regards,
> > >
> > >
> > > On Mon, Sep 20, 2021 at 12:55 AM Pearl d'Silva <
> > pearl.dsilva@shapeblue.com
> > > <ma...@shapeblue.com>>
> > > wrote:
> > >
> > > > Hi Douglas,
> > > >
> > > >
> > > > That seems to be the issue, you will need to add a store to the zone.
> > You
> > > > can do that either via UI / command line. On the UI, there is the
> "Add
> > > > Secondary Storage" button, provide the zone, the server IP/name, and
> > the
> > > > path (in your case, /export/secondary).
> > > >
> > > >
> > > > Thanks,
> > > > Pearl
> > > > ________________________________
> > > > From: DL <do...@gmail.com>>
> > > > Sent: Monday, September 20, 2021 10:16 AM
> > > > To: users@cloudstack.apache.org<ma...@cloudstack.apache.org>
> <
> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > > > Subject: Re: Problem with Templates/ISO
> > > >
> > > > @Pearl
> > > > I can go to the Infrastructure -> Secondary Storage tab. However,
> > nothing
> > > > is there.
> > > >
> > > > @Harikrishna
> > > > Thank you also for getting back to me!
> > > >
> > > > Here is what I found related to the error in the log:
> > > >
> > > > 2021-09-20 00:27:12,093 DEBUG [c.c.a.ApiServlet]
> > > > (qtp1136768342-20:ctx-d9bd1f44) (logid:a56ace1d) ===START===
> > 172.16.10.2
> > > > -- GET
> > > >
> > > >
> > > listall=true&templatefilter=all&showunique=true&page=1&
> > pagesize=20&command=listTemplates&response=json
> > > > 2021-09-20 00:27:12,097 DEBUG [c.c.a.ApiServer]
> > > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) CIDRs
> > from
> > > > which account 'Acct[2e801633-1977-11ec-98da-5254005ad990-admin]' is
> > > allowed
> > > > to perform API calls: 0.0.0.0/0,::/0<http://0.0.0.0/0,::/0>
> > > > 2021-09-20 00:27:12,110 ERROR [c.c.a.ApiServer]
> > > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d)
> unhandled
> > > > exception executing api command: [Ljava.lang.String;@421e6f13
> > > > com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
> > > > com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> > template_store_ref.id<
> > > http://template_store_ref.id>,
> > > > template_store_ref.store_id, template_store_ref.template_id,
> > > > template_store_ref.store_role, template_store_ref.created,
> > > > template_store_ref.last_updated, template_store_ref.download_pct,
> > > > template_store_ref.size, template_store_ref.physical_size,
> > > > template_store_ref.download_state, template_store_ref.local_path,
> > > > template_store_ref.error_str, template_store_ref.job_id,
> > > > template_store_ref.install_path, template_store_ref.url,
> > > > template_store_ref.download_url, template_store_ref.download_
> > url_created,
> > > > template_store_ref.is_copy, template_store_ref.destroyed,
> > > > template_store_ref.update_count, template_store_ref.updated,
> > > > template_store_ref.state, template_store_ref.ref_cnt FROM
> > > > template_store_ref WHERE template_store_ref.template_id = 3  AND
> > > > template_store_ref.download_state != 'BYPASSED'  AND
> > > > template_store_ref.destroyed = 0  AND template_store_ref.store_id IN
> )
> > > > at
> > > >
> > > >
> > > com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(
> > GenericDaoBase.java:423)
> > > > at
> > > >
> > > >
> > > com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(
> > GenericDaoBase.java:359)
> > > > at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:348)
> > > > at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:1308)
> > > > at
> > > >
> > > >
> > > org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl.
> > listByTemplateNotBypassed(TemplateDataStoreDaoImpl.java:431)
> > > > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.
> > invoke0(Native
> > > > Method)
> > > > at
> > > >
> > > >
> > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:62)
> > > > at
> > > >
> > > >
> > > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:43)
> > > > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > > > at
> > > >
> > > >
> > > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
> > (AopUtils.java:344)
> > > > at
> > > >
> > > >
> > > org.springframework.aop.framework.ReflectiveMethodInvocation.
> > invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> > > > at
> > > >
> > > >
> > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> > ReflectiveMethodInvocation.java:163)
> > > > at
> > > >
> > > >
> > > com.cloud.utils.db.TransactionContextInterceptor.invoke(
> > TransactionContextInterceptor.java:34)
> > > > at
> > > >
> > > >
> > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> > ReflectiveMethodInvocation.java:175)
> > > > at
> > > >
> > > >
> > > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(
> > ExposeInvocationInterceptor.java:97)
> > > > at
> > > >
> > > >
> > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> > ReflectiveMethodInvocation.java:186)
> > > > at
> > > >
> > > >
> > > org.springframework.aop.framework.JdkDynamicAopProxy.
> > invoke(JdkDynamicAopProxy.java:215)
> > > > at com.sun.proxy.$Proxy79.listByTemplateNotBypassed(Unknown Source)
> > > > at
> > > >
> > > >
> > > com.cloud.api.query.dao.TemplateJoinDaoImpl.newTemplateResponse(
> > TemplateJoinDaoImpl.java:165)
> > > > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.
> > invoke0(Native
> > > > Method)
> > > > at
> > > >
> > > >
> > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:62)
> > > > at
> > > >
> > > >
> > > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:43)
> > > > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > > > at
> > > >
> > > >
> > > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
> > (AopUtils.java:344)
> > > > at
> > > >
> > > >
> > > org.springframework.aop.framework.ReflectiveMethodInvocation.
> > invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> > > > at
> > > >
> > > >
> > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> > ReflectiveMethodInvocation.java:163)
> > > > at
> > > >
> > > >
> > > com.cloud.utils.db.TransactionContextInterceptor.invoke(
> > TransactionContextInterceptor.java:34)
> > > > at
> > > >
> > > >
> > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> > ReflectiveMethodInvocation.java:175)
> > > > at
> > > >
> > > >
> > > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(
> > ExposeInvocationInterceptor.java:97)
> > > > at
> > > >
> > > >
> > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> > ReflectiveMethodInvocation.java:186)
> > > > at
> > > >
> > > >
> > > org.springframework.aop.framework.JdkDynamicAopProxy.
> > invoke(JdkDynamicAopProxy.java:215)
> > > > at com.sun.proxy.$Proxy308.newTemplateResponse(Unknown Source)
> > > > at com.cloud.api.ApiDBUtils.newTemplateResponse(ApiDBUtils.java:2022)
> > > > at
> > > >
> > > >
> > > com.cloud.api.query.ViewResponseHelper.createTemplateResponse(
> > ViewResponseHelper.java:590)
> > > > at
> > > >
> > > >
> > > com.cloud.api.query.QueryManagerImpl.listTemplates(
> > QueryManagerImpl.java:3336)
> > > > at
> > > >
> > > >
> > > org.apache.cloudstack.api.command.user.template.
> > ListTemplatesCmd.execute(ListTemplatesCmd.java:180)
> > > > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
> > > > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:764)
> > > > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588)
> > > > at com.cloud.api.ApiServlet.processRequestInContext(
> > ApiServlet.java:321)
> > > > at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134)
> > > > at
> > > >
> > > >
> > >
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(
> > DefaultManagedContext.java:55)
> > > > at
> > > >
> > > >
> > > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
> > callWithContext(DefaultManagedContext.java:102)
> > > > at
> > > >
> > > >
> > > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
> > runWithContext(DefaultManagedContext.java:52)
> > > > at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131)
> > > > at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93)
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.servlet.ServletHolder$NotAsync.
> > service(ServletHolder.java:1443)
> > > > at org.eclipse.jetty.servlet.ServletHolder.handle(
> > ServletHolder.java:791)
> > > > at
> > > >
> > > org.eclipse.jetty.servlet.ServletHandler.doHandle(
> > ServletHandler.java:550)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.server.handler.ScopedHandler.handle(
> > ScopedHandler.java:143)
> > > > at
> > > >
> > > org.eclipse.jetty.security.SecurityHandler.handle(
> > SecurityHandler.java:602)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> > HandlerWrapper.java:127)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.server.handler.ScopedHandler.
> > nextHandle(ScopedHandler.java:235)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.server.session.SessionHandler.
> > doHandle(SessionHandler.java:1624)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.server.handler.ScopedHandler.
> > nextHandle(ScopedHandler.java:233)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.server.handler.ContextHandler.
> > doHandle(ContextHandler.java:1435)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.server.handler.ScopedHandler.
> > nextScope(ScopedHandler.java:188)
> > > > at
> > > > org.eclipse.jetty.servlet.ServletHandler.doScope(
> > ServletHandler.java:501)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.server.session.SessionHandler.
> > doScope(SessionHandler.java:1594)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.server.handler.ScopedHandler.
> > nextScope(ScopedHandler.java:186)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.server.handler.ContextHandler.
> > doScope(ContextHandler.java:1350)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.server.handler.ScopedHandler.handle(
> > ScopedHandler.java:141)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.server.handler.gzip.GzipHandler.
> > handle(GzipHandler.java:766)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.server.handler.HandlerCollection.
> > handle(HandlerCollection.java:146)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> > HandlerWrapper.java:127)
> > > > at org.eclipse.jetty.server.Server.handle(Server.java:516)
> > > > at
> > > >
> > > org.eclipse.jetty.server.HttpChannel.lambda$handle$1(
> > HttpChannel.java:388)
> > > > at
> org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
> > > > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
> > > > at
> > > >
> > > org.eclipse.jetty.server.HttpConnection.onFillable(
> > HttpConnection.java:273)
> > > > at
> > > > org.eclipse.jetty.io<http://org.eclipse.jetty.io>
> > > > .AbstractConnection$ReadCallback.succeeded(
> > AbstractConnection.java:311)
> > > > at org.eclipse.jetty.io<http://org.eclipse.jetty.io
> > > >.FillInterest.fillable(FillInterest.java:105)
> > > > at org.eclipse.jetty.io<http://org.eclipse.jetty.io
> > > >.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
> > runTask(EatWhatYouKill.java:336)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
> > doProduce(EatWhatYouKill.java:313)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
> > tryProduce(EatWhatYouKill.java:171)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(
> > EatWhatYouKill.java:129)
> > > > at
> > > >
> > > >
> > >
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(
> > ReservedThreadExecutor.java:375)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
> > QueuedThreadPool.java:773)
> > > > at
> > > >
> > > >
> > > org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(
> > QueuedThreadPool.java:905)
> > > > at java.base/java.lang.Thread.run(Thread.java:829)
> > > > Caused by: java.sql.SQLSyntaxErrorException: You have an error in
> your
> > > SQL
> > > > syntax; check the manual that corresponds to your MySQL server
> version
> > > for
> > > > the right syntax to use near ')' at line 1
> > > > at
> > > >
> > > com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(
> > SQLError.java:120)
> > > > at
> > > >
> > > com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(
> > SQLError.java:97)
> > > > at
> > > >
> > > >
> > > com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(
> > SQLExceptionsMapping.java:122)
> > > > ... 87 more
> > > > 2021-09-20 00:27:12,122 DEBUG [c.c.a.ApiServlet]
> > > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d)
> ===END===
> > > >  172.16.10.2 -- GET
> > > >
> > > >
> > > listall=true&templatefilter=all&showunique=true&page=1&
> > pagesize=20&command=listTemplates&response=json
> > > >
> > > >
> > > > Could you help me to pinpoint what I may have done wrong?
> > > >
> > > > On Mon, Sep 20, 2021 at 12:38 AM Harikrishna Patnala <
> > > > Harikrishna.Patnala@shapeblue.com<mailto:
> > > Harikrishna.Patnala@shapeblue.com>> wrote:
> > > >
> > > > > Sorry, logs at /var/log/cloudstack/management/management-server.log
> > > > > ________________________________
> > > > > From: Harikrishna Patnala <Harikrishna.Patnala@shapeblue.com
> <mailto:
> > > Harikrishna.Patnala@shapeblue.com>>
> > > > > Sent: Monday, September 20, 2021 10:04 AM
> > > > > To: users@cloudstack.apache.org<mailto:users@cloudstack.apache.org
> >
> > <
> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > > > > Subject: Re: Problem with Templates/ISO
> > > > >
> > > > >
> > > > > Hi Douglas,
> > > > >
> > > > > Firstly, welcome to CloudStack.
> > > > >
> > > > > This looks to me like DB changes did not apply properly during
> > > > > installation. Did you observe any issues in the logs during the
> > > > management
> > > > > server installation or start.
> > > > >
> > > > > You can check the logs at
> > > > > /usr/share/cloudstack/management/management-server.log and see the
> > > exact
> > > > > reason for DB sql exception when you perform the list templates
> > > > operation.
> > > > >
> > > > > As mentioned already there is no change in the system VM template
> > from
> > > > > 4.15.1 to 4.15.2
> > > > >
> > > > > Regards,
> > > > > Harikrishna
> > > > > ________________________________
> > > > > From: DL <do...@gmail.com>>
> > > > > Sent: Monday, September 20, 2021 9:38 AM
> > > > > To: users@cloudstack.apache.org<mailto:users@cloudstack.apache.org
> >
> > <
> > > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > > > > Subject: Problem with Templates/ISO
> > > > >
> > > > > Hello there,
> > > > >
> > > > > I am a new CloutStack user and a new user on this mailing list.
> After
> > > > > following the Quick Installation Guide, I ended up with empty
> > > > Template/ISOs
> > > > > when I attempted to create a VM instance.
> > > > >
> > > > > If I go to Images/Templates, I got 500 Internal Server Error:
> > > > >
> > > > > Request Failed (530)
> > > > > DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> > > > > template_store_ref.id<http://template_store_ref.id>,
> > > template_store_ref.store_id,
> > > > > template_store_ref.template_id, template_store_ref.store_role,
> > > > > template_store_ref.created, template_store_ref.last_updated,
> > > > > template_store_ref.download_pct, template_store_ref.size,
> > > > > template_store_ref.physical_size,
> template_store_ref.download_state,
> > > > > template_store_ref.local_path, template_store_ref.error_str,
> > > > > template_store_ref.job_id, template_store_ref.install_path,
> > > > > template_store_ref.url, template_store_ref.download_url,
> > > > > template_store_ref.download_url_created,
> template_store_ref.is_copy,
> > > > > template_store_ref.destroyed, template_store_ref.update_count,
> > > > > template_store_ref.updated, template_store_ref.state,
> > > > > template_store_ref.ref_cnt FROM template_store_ref WHERE
> > > > > template_store_ref.template_id = 3 AND
> > > template_store_ref.download_state
> > > > !=
> > > > > 'BYPASSED' AND template_store_ref.destroyed = 0 AND
> > > > > template_store_ref.store_id IN )
> > > > >
> > > > > Could someone help me fix this issue?
> > > > >
> > > > > The quick installation guide I followed says it is for 4.15.2.0
> > > > > installation. However, in the System Template Setup section, this
> > > > command:
> > > > > """
> > > > >
> > > > >
> > > >
> > > /usr/share/cloudstack-common/scripts/storage/secondary/
> > cloud-install-sys-tmplt
> > > > > -m /export/secondary -u
> > > > >
> > > > >
> > > >
> > > https://download.cloudstack.org/systemvm/4.15/
> > systemvmtemplate-4.15.1-kvm.qcow2.bz2
> > > > > -h
> > > > > <
> > > >
> > > https://download.cloudstack.org/systemvm/4.15/
> > systemvmtemplate-4.15.1-kvm.qcow2.bz2-h
> > > > >
> > > > > kvm -F
> > > > > """
> > > > > seems to suggest that the process will download template vms for
> the
> > > > > 4.15.1.0 version?
> > > > >
> > > > > Could this be the reason? Does anyone have an idea about when the
> > > > Template
> > > > > for the 4.15.2.0 version will be available?
> > > > >
> > > > > Best regards,
> > > > > Douglas
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>

Re: Problem with Templates/ISO

Posted by Wei ZHOU <us...@gmail.com>.
It looks ssvm is not working well.
Please make sure that ssvm can connect to internet.

-Wei

On Tuesday, 21 September 2021, DL <do...@gmail.com> wrote:

> The "SystemVM Template (KVM)" is ready. However, the "CentOS 5.5(64bit) no
> GUI (KVM)" template is not ready; the status says "Unable to resolve
> download.cloudstack.org."
> This issue is similar to the error I encountered when I tried to register
> an online ISO.
> If I use the browser, I can visit any website. I can ping
> download.cloudstack.org from the terminal fine. However, cloudstack seems
> not able to reach the public Internet.
> Is CloudStack using a different way to reach the Internet?
>
>
>
> On Tue, Sep 21, 2021 at 2:10 AM Pearl d'Silva <pe...@shapeblue.com>
> wrote:
>
> > Hi,
> >
> > One of the reasons why the templates may not be showing up in the VM
> > deployment wizard is because they aren't in the ready state. You can
> verify
> > that by going into the respective template's info and in the zone tab
> you'd
> > probably notice that the template(s) aren't in ready state. Ideally, once
> > the SystemVMs, essentially, Secondary storage VM(SSVM) is up, it should
> > sync the templates (the systemVM template (that you had initially seeded)
> > and the built-in template). Do you see an errors in the management server
> > logs that could be helpful.
> > Can you log into your database (cloud) and see if you see any entries in
> > the template_store_ref table. I understand you are on a KVM based env,
> so,
> > select * from template_store_ref where template_id=4\G      - template_id
> > = 4 - refers to a built-in template that gets downloaded.
> >
> > Do you see any exceptions when trying to register a new template ?
> > For management server logs - look into
> > /var/log/cloudstack/management/management-server.log
> > Another place to look at would be the SSVM (which plays an integral role
> > in downloading templates)
> > Please refer to
> > https://cwiki.apache.org/confluence/display/CLOUDSTACK/
> SSVM%2C+templates%2C+Secondary+storage+troubleshooting
> > to log into and debug the SSVM.  To increase the log level in your SSVM -
> > you can run the following:
> > sed -i 's/INFO/DEBUG/g' /usr/local/cloud/systemvm/conf/log4j-cloud.xml
> and
> > then restart the cloud service : systemctl restart cloud
> > In the SSVM, you can observe the logs at /var/log/cloud.log
> >
> > To setup an SSL enabled env you could follow this link -
> > https://www.shapeblue.com/securing-cloudstack-4-11-with-https-tls/ or as
> > a temporary hack, you can enter the SSVMs IP Address in the browser's url
> > field with https scheme (https://<IP Address>) and accept the risk,
> > before trying to upload the template.
> >
> > Hope this helps.
> >
> > Thanks
> >
> >
> > ________________________________
> > From: DL <do...@gmail.com>
> > Sent: Tuesday, September 21, 2021 10:51 AM
> > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> > Subject: Re: Problem with Templates/ISO
> >
> > The system VMs are up and running.
> > The Zone shows enabled.
> >
> > I have another VM in VirtualBox serving as the gateway server for the
> > cloudstack VM.
> > The gateway IP is 172.16.10.1. The cloudstack VM's IP is 172.16.10.2.
> > As instructed, the gateway server is only a gateway, not a DHCP server.
> > The cloudstack VM can use the gateway to access the Internet fine.
> > I can SSH from the gateway server into the cloudstack VM fine.
> >
> > How do I make my env setup SSL enabled?
> > Am I supposed to see some existing Templates/ISOs when creating a new VM
> > instance? Or am I supposed to create some Templates/ISOs by myself first?
> >
> >
> >
> > On Tue, Sep 21, 2021 at 12:20 AM Pearl d'Silva <
> pearl.dsilva@shapeblue.com
> > <ma...@shapeblue.com>> wrote:
> > Hi Douglas,
> >
> > Could you please let us know the following:
> >
> >   *   Do you see the systemVMs are up and running (Infratructure ->
> System
> > VMs)?
> >   *   Is the zone enabled? (Infrastructure -> Zones (specific zone's
> > Allocation State))
> >
> > Providing some insight into the state of your env - by answering the
> above
> > questions, may help us diagnose the issue better wrt template
> registration
> > failure. With regards to template/iso upload(from local) failure - this
> > would be expected if your env setup isn't SSL enabled. The issues you may
> > be facing could also be due to your infrastructure / network topology.
> > The Quick installation guide is up to date and should work, however if
> you
> > are facing issues you may refer to
> > https://github.com/shapeblue/hackerbook/blob/main/1-user.md to setup a
> > basic env. Another resource you could look at is
> > https://github.com/shapeblue/mbx - this will setup an env for you -
> > please do follow the Readme. That said, if you see any issues with the
> > documentation, you can report them i.e., create an issue/ pull request
> > against the respective projects on GitHub and we can help improve them.
> >
> > Thanks,
> > Pearl
> >
> >
> >
> > ________________________________
> > From: DL <do...@gmail.com>>
> > Sent: Tuesday, September 21, 2021 12:43 AM
> > To: users@cloudstack.apache.org<ma...@cloudstack.apache.org> <
> > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > Subject: Re: Problem with Templates/ISO
> >
> > Hi Pearl,
> >
> > Following your solution, I added the Secondary Storage, and now two
> > Templates and two ISOs shows under the Images tab.
> > However, I still couldn't see any Templates/ISOs in the Template/ISO
> > configuration page when I tried to create a new VM instance.
> >
> > I tried to Register ISO also. If I use an online ISO, cloudstack would
> show
> > me that the url hostname cannot be resolved. (Of course, I can use the
> > browser to download the ISO fine)
> > If I want to upload an ISO from the local machine, cloudstack would
> report
> > an error saying that it cannot reach the management server (or some web
> > browser extensions may have blocked the request). I have a single machine
> > doing all the things. I also checked that all required processes are
> > running. My browser doesn't use any extensions.
> >
> > I am using a CentOS 7 virtual machine within VirtualBox to follow the
> Quick
> > Installation Guide (
> > http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.
> html
> > ).
> > I have made everything identical to that of the Quick Installation Guide.
> > However, I still encountered various issues.
> >
> > The first issue is that after I configured the Zone, Pod, Cluster, etc,
> and
> > launched the Zone, every time (I have done this with multiple VMs) the
> > system would hang at the last step "Adding Host" forever. I really mean
> > forever. And it didn't even report what error it encountered. I have to
> > close the window. After this, I would see, the host has been added to the
> > Zone successfully. However, the Primary Storage and the Secondary Storage
> > were not added. I believe this is why I needed to add the Secondary
> Storage
> > (and also the Primary Storage) manually.
> > But after this, I still could not see/add any Templates/ISOs.
> >
> >
> > I didn't expect so many issues by just following the simplest Quick
> > Installation Guide.
> > Is there anything I should pay special attention to while following the
> > Quick Installation Guide?
> > Does the Quick Installation Guide still work for the latest version? I do
> > notice that the instructions don't mention some options I was faced with
> > during the installation/configuration process. I just chose default
> > options. Would this cause any issues?
> > Are there any better Installation Guides I should try instead?
> > Are there any existing clouds (built with CloudStack) that I can play
> with
> > for free (or with minimal costs)?
> >
> > Sorry for asking so many questions. I just want to get started.
> >
> > Best regards,
> >
> >
> > On Mon, Sep 20, 2021 at 12:55 AM Pearl d'Silva <
> pearl.dsilva@shapeblue.com
> > <ma...@shapeblue.com>>
> > wrote:
> >
> > > Hi Douglas,
> > >
> > >
> > > That seems to be the issue, you will need to add a store to the zone.
> You
> > > can do that either via UI / command line. On the UI, there is the "Add
> > > Secondary Storage" button, provide the zone, the server IP/name, and
> the
> > > path (in your case, /export/secondary).
> > >
> > >
> > > Thanks,
> > > Pearl
> > > ________________________________
> > > From: DL <do...@gmail.com>>
> > > Sent: Monday, September 20, 2021 10:16 AM
> > > To: users@cloudstack.apache.org<ma...@cloudstack.apache.org> <
> > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > > Subject: Re: Problem with Templates/ISO
> > >
> > > @Pearl
> > > I can go to the Infrastructure -> Secondary Storage tab. However,
> nothing
> > > is there.
> > >
> > > @Harikrishna
> > > Thank you also for getting back to me!
> > >
> > > Here is what I found related to the error in the log:
> > >
> > > 2021-09-20 00:27:12,093 DEBUG [c.c.a.ApiServlet]
> > > (qtp1136768342-20:ctx-d9bd1f44) (logid:a56ace1d) ===START===
> 172.16.10.2
> > > -- GET
> > >
> > >
> > listall=true&templatefilter=all&showunique=true&page=1&
> pagesize=20&command=listTemplates&response=json
> > > 2021-09-20 00:27:12,097 DEBUG [c.c.a.ApiServer]
> > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) CIDRs
> from
> > > which account 'Acct[2e801633-1977-11ec-98da-5254005ad990-admin]' is
> > allowed
> > > to perform API calls: 0.0.0.0/0,::/0<http://0.0.0.0/0,::/0>
> > > 2021-09-20 00:27:12,110 ERROR [c.c.a.ApiServer]
> > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) unhandled
> > > exception executing api command: [Ljava.lang.String;@421e6f13
> > > com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
> > > com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> template_store_ref.id<
> > http://template_store_ref.id>,
> > > template_store_ref.store_id, template_store_ref.template_id,
> > > template_store_ref.store_role, template_store_ref.created,
> > > template_store_ref.last_updated, template_store_ref.download_pct,
> > > template_store_ref.size, template_store_ref.physical_size,
> > > template_store_ref.download_state, template_store_ref.local_path,
> > > template_store_ref.error_str, template_store_ref.job_id,
> > > template_store_ref.install_path, template_store_ref.url,
> > > template_store_ref.download_url, template_store_ref.download_
> url_created,
> > > template_store_ref.is_copy, template_store_ref.destroyed,
> > > template_store_ref.update_count, template_store_ref.updated,
> > > template_store_ref.state, template_store_ref.ref_cnt FROM
> > > template_store_ref WHERE template_store_ref.template_id = 3  AND
> > > template_store_ref.download_state != 'BYPASSED'  AND
> > > template_store_ref.destroyed = 0  AND template_store_ref.store_id IN )
> > > at
> > >
> > >
> > com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(
> GenericDaoBase.java:423)
> > > at
> > >
> > >
> > com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(
> GenericDaoBase.java:359)
> > > at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:348)
> > > at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:1308)
> > > at
> > >
> > >
> > org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl.
> listByTemplateNotBypassed(TemplateDataStoreDaoImpl.java:431)
> > > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.
> invoke0(Native
> > > Method)
> > > at
> > >
> > >
> > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> > > at
> > >
> > >
> > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> > > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > > at
> > >
> > >
> > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
> (AopUtils.java:344)
> > > at
> > >
> > >
> > org.springframework.aop.framework.ReflectiveMethodInvocation.
> invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> > > at
> > >
> > >
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:163)
> > > at
> > >
> > >
> > com.cloud.utils.db.TransactionContextInterceptor.invoke(
> TransactionContextInterceptor.java:34)
> > > at
> > >
> > >
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:175)
> > > at
> > >
> > >
> > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(
> ExposeInvocationInterceptor.java:97)
> > > at
> > >
> > >
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:186)
> > > at
> > >
> > >
> > org.springframework.aop.framework.JdkDynamicAopProxy.
> invoke(JdkDynamicAopProxy.java:215)
> > > at com.sun.proxy.$Proxy79.listByTemplateNotBypassed(Unknown Source)
> > > at
> > >
> > >
> > com.cloud.api.query.dao.TemplateJoinDaoImpl.newTemplateResponse(
> TemplateJoinDaoImpl.java:165)
> > > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.
> invoke0(Native
> > > Method)
> > > at
> > >
> > >
> > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> > > at
> > >
> > >
> > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> > > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > > at
> > >
> > >
> > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
> (AopUtils.java:344)
> > > at
> > >
> > >
> > org.springframework.aop.framework.ReflectiveMethodInvocation.
> invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> > > at
> > >
> > >
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:163)
> > > at
> > >
> > >
> > com.cloud.utils.db.TransactionContextInterceptor.invoke(
> TransactionContextInterceptor.java:34)
> > > at
> > >
> > >
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:175)
> > > at
> > >
> > >
> > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(
> ExposeInvocationInterceptor.java:97)
> > > at
> > >
> > >
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:186)
> > > at
> > >
> > >
> > org.springframework.aop.framework.JdkDynamicAopProxy.
> invoke(JdkDynamicAopProxy.java:215)
> > > at com.sun.proxy.$Proxy308.newTemplateResponse(Unknown Source)
> > > at com.cloud.api.ApiDBUtils.newTemplateResponse(ApiDBUtils.java:2022)
> > > at
> > >
> > >
> > com.cloud.api.query.ViewResponseHelper.createTemplateResponse(
> ViewResponseHelper.java:590)
> > > at
> > >
> > >
> > com.cloud.api.query.QueryManagerImpl.listTemplates(
> QueryManagerImpl.java:3336)
> > > at
> > >
> > >
> > org.apache.cloudstack.api.command.user.template.
> ListTemplatesCmd.execute(ListTemplatesCmd.java:180)
> > > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
> > > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:764)
> > > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588)
> > > at com.cloud.api.ApiServlet.processRequestInContext(
> ApiServlet.java:321)
> > > at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134)
> > > at
> > >
> > >
> > org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(
> DefaultManagedContext.java:55)
> > > at
> > >
> > >
> > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
> callWithContext(DefaultManagedContext.java:102)
> > > at
> > >
> > >
> > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
> runWithContext(DefaultManagedContext.java:52)
> > > at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131)
> > > at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93)
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
> > > at
> > >
> > >
> > org.eclipse.jetty.servlet.ServletHolder$NotAsync.
> service(ServletHolder.java:1443)
> > > at org.eclipse.jetty.servlet.ServletHolder.handle(
> ServletHolder.java:791)
> > > at
> > >
> > org.eclipse.jetty.servlet.ServletHandler.doHandle(
> ServletHandler.java:550)
> > > at
> > >
> > >
> > org.eclipse.jetty.server.handler.ScopedHandler.handle(
> ScopedHandler.java:143)
> > > at
> > >
> > org.eclipse.jetty.security.SecurityHandler.handle(
> SecurityHandler.java:602)
> > > at
> > >
> > >
> > org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> HandlerWrapper.java:127)
> > > at
> > >
> > >
> > org.eclipse.jetty.server.handler.ScopedHandler.
> nextHandle(ScopedHandler.java:235)
> > > at
> > >
> > >
> > org.eclipse.jetty.server.session.SessionHandler.
> doHandle(SessionHandler.java:1624)
> > > at
> > >
> > >
> > org.eclipse.jetty.server.handler.ScopedHandler.
> nextHandle(ScopedHandler.java:233)
> > > at
> > >
> > >
> > org.eclipse.jetty.server.handler.ContextHandler.
> doHandle(ContextHandler.java:1435)
> > > at
> > >
> > >
> > org.eclipse.jetty.server.handler.ScopedHandler.
> nextScope(ScopedHandler.java:188)
> > > at
> > > org.eclipse.jetty.servlet.ServletHandler.doScope(
> ServletHandler.java:501)
> > > at
> > >
> > >
> > org.eclipse.jetty.server.session.SessionHandler.
> doScope(SessionHandler.java:1594)
> > > at
> > >
> > >
> > org.eclipse.jetty.server.handler.ScopedHandler.
> nextScope(ScopedHandler.java:186)
> > > at
> > >
> > >
> > org.eclipse.jetty.server.handler.ContextHandler.
> doScope(ContextHandler.java:1350)
> > > at
> > >
> > >
> > org.eclipse.jetty.server.handler.ScopedHandler.handle(
> ScopedHandler.java:141)
> > > at
> > >
> > >
> > org.eclipse.jetty.server.handler.gzip.GzipHandler.
> handle(GzipHandler.java:766)
> > > at
> > >
> > >
> > org.eclipse.jetty.server.handler.HandlerCollection.
> handle(HandlerCollection.java:146)
> > > at
> > >
> > >
> > org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> HandlerWrapper.java:127)
> > > at org.eclipse.jetty.server.Server.handle(Server.java:516)
> > > at
> > >
> > org.eclipse.jetty.server.HttpChannel.lambda$handle$1(
> HttpChannel.java:388)
> > > at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
> > > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
> > > at
> > >
> > org.eclipse.jetty.server.HttpConnection.onFillable(
> HttpConnection.java:273)
> > > at
> > > org.eclipse.jetty.io<http://org.eclipse.jetty.io>
> > > .AbstractConnection$ReadCallback.succeeded(
> AbstractConnection.java:311)
> > > at org.eclipse.jetty.io<http://org.eclipse.jetty.io
> > >.FillInterest.fillable(FillInterest.java:105)
> > > at org.eclipse.jetty.io<http://org.eclipse.jetty.io
> > >.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> > > at
> > >
> > >
> > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
> runTask(EatWhatYouKill.java:336)
> > > at
> > >
> > >
> > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
> doProduce(EatWhatYouKill.java:313)
> > > at
> > >
> > >
> > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.
> tryProduce(EatWhatYouKill.java:171)
> > > at
> > >
> > >
> > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(
> EatWhatYouKill.java:129)
> > > at
> > >
> > >
> > org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(
> ReservedThreadExecutor.java:375)
> > > at
> > >
> > >
> > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
> QueuedThreadPool.java:773)
> > > at
> > >
> > >
> > org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(
> QueuedThreadPool.java:905)
> > > at java.base/java.lang.Thread.run(Thread.java:829)
> > > Caused by: java.sql.SQLSyntaxErrorException: You have an error in your
> > SQL
> > > syntax; check the manual that corresponds to your MySQL server version
> > for
> > > the right syntax to use near ')' at line 1
> > > at
> > >
> > com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(
> SQLError.java:120)
> > > at
> > >
> > com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(
> SQLError.java:97)
> > > at
> > >
> > >
> > com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(
> SQLExceptionsMapping.java:122)
> > > ... 87 more
> > > 2021-09-20 00:27:12,122 DEBUG [c.c.a.ApiServlet]
> > > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) ===END===
> > >  172.16.10.2 -- GET
> > >
> > >
> > listall=true&templatefilter=all&showunique=true&page=1&
> pagesize=20&command=listTemplates&response=json
> > >
> > >
> > > Could you help me to pinpoint what I may have done wrong?
> > >
> > > On Mon, Sep 20, 2021 at 12:38 AM Harikrishna Patnala <
> > > Harikrishna.Patnala@shapeblue.com<mailto:
> > Harikrishna.Patnala@shapeblue.com>> wrote:
> > >
> > > > Sorry, logs at /var/log/cloudstack/management/management-server.log
> > > > ________________________________
> > > > From: Harikrishna Patnala <Harikrishna.Patnala@shapeblue.com<mailto:
> > Harikrishna.Patnala@shapeblue.com>>
> > > > Sent: Monday, September 20, 2021 10:04 AM
> > > > To: users@cloudstack.apache.org<ma...@cloudstack.apache.org>
> <
> > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > > > Subject: Re: Problem with Templates/ISO
> > > >
> > > >
> > > > Hi Douglas,
> > > >
> > > > Firstly, welcome to CloudStack.
> > > >
> > > > This looks to me like DB changes did not apply properly during
> > > > installation. Did you observe any issues in the logs during the
> > > management
> > > > server installation or start.
> > > >
> > > > You can check the logs at
> > > > /usr/share/cloudstack/management/management-server.log and see the
> > exact
> > > > reason for DB sql exception when you perform the list templates
> > > operation.
> > > >
> > > > As mentioned already there is no change in the system VM template
> from
> > > > 4.15.1 to 4.15.2
> > > >
> > > > Regards,
> > > > Harikrishna
> > > > ________________________________
> > > > From: DL <do...@gmail.com>>
> > > > Sent: Monday, September 20, 2021 9:38 AM
> > > > To: users@cloudstack.apache.org<ma...@cloudstack.apache.org>
> <
> > users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > > > Subject: Problem with Templates/ISO
> > > >
> > > > Hello there,
> > > >
> > > > I am a new CloutStack user and a new user on this mailing list. After
> > > > following the Quick Installation Guide, I ended up with empty
> > > Template/ISOs
> > > > when I attempted to create a VM instance.
> > > >
> > > > If I go to Images/Templates, I got 500 Internal Server Error:
> > > >
> > > > Request Failed (530)
> > > > DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> > > > template_store_ref.id<http://template_store_ref.id>,
> > template_store_ref.store_id,
> > > > template_store_ref.template_id, template_store_ref.store_role,
> > > > template_store_ref.created, template_store_ref.last_updated,
> > > > template_store_ref.download_pct, template_store_ref.size,
> > > > template_store_ref.physical_size, template_store_ref.download_state,
> > > > template_store_ref.local_path, template_store_ref.error_str,
> > > > template_store_ref.job_id, template_store_ref.install_path,
> > > > template_store_ref.url, template_store_ref.download_url,
> > > > template_store_ref.download_url_created, template_store_ref.is_copy,
> > > > template_store_ref.destroyed, template_store_ref.update_count,
> > > > template_store_ref.updated, template_store_ref.state,
> > > > template_store_ref.ref_cnt FROM template_store_ref WHERE
> > > > template_store_ref.template_id = 3 AND
> > template_store_ref.download_state
> > > !=
> > > > 'BYPASSED' AND template_store_ref.destroyed = 0 AND
> > > > template_store_ref.store_id IN )
> > > >
> > > > Could someone help me fix this issue?
> > > >
> > > > The quick installation guide I followed says it is for 4.15.2.0
> > > > installation. However, in the System Template Setup section, this
> > > command:
> > > > """
> > > >
> > > >
> > >
> > /usr/share/cloudstack-common/scripts/storage/secondary/
> cloud-install-sys-tmplt
> > > > -m /export/secondary -u
> > > >
> > > >
> > >
> > https://download.cloudstack.org/systemvm/4.15/
> systemvmtemplate-4.15.1-kvm.qcow2.bz2
> > > > -h
> > > > <
> > >
> > https://download.cloudstack.org/systemvm/4.15/
> systemvmtemplate-4.15.1-kvm.qcow2.bz2-h
> > > >
> > > > kvm -F
> > > > """
> > > > seems to suggest that the process will download template vms for the
> > > > 4.15.1.0 version?
> > > >
> > > > Could this be the reason? Does anyone have an idea about when the
> > > Template
> > > > for the 4.15.2.0 version will be available?
> > > >
> > > > Best regards,
> > > > Douglas
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
> >
>

Re: Problem with Templates/ISO

Posted by DL <do...@gmail.com>.
The "SystemVM Template (KVM)" is ready. However, the "CentOS 5.5(64bit) no
GUI (KVM)" template is not ready; the status says "Unable to resolve
download.cloudstack.org."
This issue is similar to the error I encountered when I tried to register
an online ISO.
If I use the browser, I can visit any website. I can ping
download.cloudstack.org from the terminal fine. However, cloudstack seems
not able to reach the public Internet.
Is CloudStack using a different way to reach the Internet?



On Tue, Sep 21, 2021 at 2:10 AM Pearl d'Silva <pe...@shapeblue.com>
wrote:

> Hi,
>
> One of the reasons why the templates may not be showing up in the VM
> deployment wizard is because they aren't in the ready state. You can verify
> that by going into the respective template's info and in the zone tab you'd
> probably notice that the template(s) aren't in ready state. Ideally, once
> the SystemVMs, essentially, Secondary storage VM(SSVM) is up, it should
> sync the templates (the systemVM template (that you had initially seeded)
> and the built-in template). Do you see an errors in the management server
> logs that could be helpful.
> Can you log into your database (cloud) and see if you see any entries in
> the template_store_ref table. I understand you are on a KVM based env, so,
> select * from template_store_ref where template_id=4\G      - template_id
> = 4 - refers to a built-in template that gets downloaded.
>
> Do you see any exceptions when trying to register a new template ?
> For management server logs - look into
> /var/log/cloudstack/management/management-server.log
> Another place to look at would be the SSVM (which plays an integral role
> in downloading templates)
> Please refer to
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/SSVM%2C+templates%2C+Secondary+storage+troubleshooting
> to log into and debug the SSVM.  To increase the log level in your SSVM -
> you can run the following:
> sed -i 's/INFO/DEBUG/g' /usr/local/cloud/systemvm/conf/log4j-cloud.xml and
> then restart the cloud service : systemctl restart cloud
> In the SSVM, you can observe the logs at /var/log/cloud.log
>
> To setup an SSL enabled env you could follow this link -
> https://www.shapeblue.com/securing-cloudstack-4-11-with-https-tls/ or as
> a temporary hack, you can enter the SSVMs IP Address in the browser's url
> field with https scheme (https://<IP Address>) and accept the risk,
> before trying to upload the template.
>
> Hope this helps.
>
> Thanks
>
>
> ________________________________
> From: DL <do...@gmail.com>
> Sent: Tuesday, September 21, 2021 10:51 AM
> To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> Subject: Re: Problem with Templates/ISO
>
> The system VMs are up and running.
> The Zone shows enabled.
>
> I have another VM in VirtualBox serving as the gateway server for the
> cloudstack VM.
> The gateway IP is 172.16.10.1. The cloudstack VM's IP is 172.16.10.2.
> As instructed, the gateway server is only a gateway, not a DHCP server.
> The cloudstack VM can use the gateway to access the Internet fine.
> I can SSH from the gateway server into the cloudstack VM fine.
>
> How do I make my env setup SSL enabled?
> Am I supposed to see some existing Templates/ISOs when creating a new VM
> instance? Or am I supposed to create some Templates/ISOs by myself first?
>
>
>
> On Tue, Sep 21, 2021 at 12:20 AM Pearl d'Silva <pearl.dsilva@shapeblue.com
> <ma...@shapeblue.com>> wrote:
> Hi Douglas,
>
> Could you please let us know the following:
>
>   *   Do you see the systemVMs are up and running (Infratructure -> System
> VMs)?
>   *   Is the zone enabled? (Infrastructure -> Zones (specific zone's
> Allocation State))
>
> Providing some insight into the state of your env - by answering the above
> questions, may help us diagnose the issue better wrt template registration
> failure. With regards to template/iso upload(from local) failure - this
> would be expected if your env setup isn't SSL enabled. The issues you may
> be facing could also be due to your infrastructure / network topology.
> The Quick installation guide is up to date and should work, however if you
> are facing issues you may refer to
> https://github.com/shapeblue/hackerbook/blob/main/1-user.md to setup a
> basic env. Another resource you could look at is
> https://github.com/shapeblue/mbx - this will setup an env for you -
> please do follow the Readme. That said, if you see any issues with the
> documentation, you can report them i.e., create an issue/ pull request
> against the respective projects on GitHub and we can help improve them.
>
> Thanks,
> Pearl
>
>
>
> ________________________________
> From: DL <do...@gmail.com>>
> Sent: Tuesday, September 21, 2021 12:43 AM
> To: users@cloudstack.apache.org<ma...@cloudstack.apache.org> <
> users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> Subject: Re: Problem with Templates/ISO
>
> Hi Pearl,
>
> Following your solution, I added the Secondary Storage, and now two
> Templates and two ISOs shows under the Images tab.
> However, I still couldn't see any Templates/ISOs in the Template/ISO
> configuration page when I tried to create a new VM instance.
>
> I tried to Register ISO also. If I use an online ISO, cloudstack would show
> me that the url hostname cannot be resolved. (Of course, I can use the
> browser to download the ISO fine)
> If I want to upload an ISO from the local machine, cloudstack would report
> an error saying that it cannot reach the management server (or some web
> browser extensions may have blocked the request). I have a single machine
> doing all the things. I also checked that all required processes are
> running. My browser doesn't use any extensions.
>
> I am using a CentOS 7 virtual machine within VirtualBox to follow the Quick
> Installation Guide (
> http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.html
> ).
> I have made everything identical to that of the Quick Installation Guide.
> However, I still encountered various issues.
>
> The first issue is that after I configured the Zone, Pod, Cluster, etc, and
> launched the Zone, every time (I have done this with multiple VMs) the
> system would hang at the last step "Adding Host" forever. I really mean
> forever. And it didn't even report what error it encountered. I have to
> close the window. After this, I would see, the host has been added to the
> Zone successfully. However, the Primary Storage and the Secondary Storage
> were not added. I believe this is why I needed to add the Secondary Storage
> (and also the Primary Storage) manually.
> But after this, I still could not see/add any Templates/ISOs.
>
>
> I didn't expect so many issues by just following the simplest Quick
> Installation Guide.
> Is there anything I should pay special attention to while following the
> Quick Installation Guide?
> Does the Quick Installation Guide still work for the latest version? I do
> notice that the instructions don't mention some options I was faced with
> during the installation/configuration process. I just chose default
> options. Would this cause any issues?
> Are there any better Installation Guides I should try instead?
> Are there any existing clouds (built with CloudStack) that I can play with
> for free (or with minimal costs)?
>
> Sorry for asking so many questions. I just want to get started.
>
> Best regards,
>
>
> On Mon, Sep 20, 2021 at 12:55 AM Pearl d'Silva <pearl.dsilva@shapeblue.com
> <ma...@shapeblue.com>>
> wrote:
>
> > Hi Douglas,
> >
> >
> > That seems to be the issue, you will need to add a store to the zone. You
> > can do that either via UI / command line. On the UI, there is the "Add
> > Secondary Storage" button, provide the zone, the server IP/name, and the
> > path (in your case, /export/secondary).
> >
> >
> > Thanks,
> > Pearl
> > ________________________________
> > From: DL <do...@gmail.com>>
> > Sent: Monday, September 20, 2021 10:16 AM
> > To: users@cloudstack.apache.org<ma...@cloudstack.apache.org> <
> users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > Subject: Re: Problem with Templates/ISO
> >
> > @Pearl
> > I can go to the Infrastructure -> Secondary Storage tab. However, nothing
> > is there.
> >
> > @Harikrishna
> > Thank you also for getting back to me!
> >
> > Here is what I found related to the error in the log:
> >
> > 2021-09-20 00:27:12,093 DEBUG [c.c.a.ApiServlet]
> > (qtp1136768342-20:ctx-d9bd1f44) (logid:a56ace1d) ===START===  172.16.10.2
> > -- GET
> >
> >
> listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json
> > 2021-09-20 00:27:12,097 DEBUG [c.c.a.ApiServer]
> > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) CIDRs from
> > which account 'Acct[2e801633-1977-11ec-98da-5254005ad990-admin]' is
> allowed
> > to perform API calls: 0.0.0.0/0,::/0<http://0.0.0.0/0,::/0>
> > 2021-09-20 00:27:12,110 ERROR [c.c.a.ApiServer]
> > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) unhandled
> > exception executing api command: [Ljava.lang.String;@421e6f13
> > com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
> > com.mysql.cj.jdbc.ClientPreparedStatement: SELECT template_store_ref.id<
> http://template_store_ref.id>,
> > template_store_ref.store_id, template_store_ref.template_id,
> > template_store_ref.store_role, template_store_ref.created,
> > template_store_ref.last_updated, template_store_ref.download_pct,
> > template_store_ref.size, template_store_ref.physical_size,
> > template_store_ref.download_state, template_store_ref.local_path,
> > template_store_ref.error_str, template_store_ref.job_id,
> > template_store_ref.install_path, template_store_ref.url,
> > template_store_ref.download_url, template_store_ref.download_url_created,
> > template_store_ref.is_copy, template_store_ref.destroyed,
> > template_store_ref.update_count, template_store_ref.updated,
> > template_store_ref.state, template_store_ref.ref_cnt FROM
> > template_store_ref WHERE template_store_ref.template_id = 3  AND
> > template_store_ref.download_state != 'BYPASSED'  AND
> > template_store_ref.destroyed = 0  AND template_store_ref.store_id IN )
> > at
> >
> >
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:423)
> > at
> >
> >
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:359)
> > at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:348)
> > at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:1308)
> > at
> >
> >
> org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl.listByTemplateNotBypassed(TemplateDataStoreDaoImpl.java:431)
> > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> > at
> >
> >
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> >
> >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > at
> >
> >
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
> > at
> >
> >
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
> > at
> >
> >
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
> > at
> >
> >
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
> > at com.sun.proxy.$Proxy79.listByTemplateNotBypassed(Unknown Source)
> > at
> >
> >
> com.cloud.api.query.dao.TemplateJoinDaoImpl.newTemplateResponse(TemplateJoinDaoImpl.java:165)
> > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> > at
> >
> >
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> >
> >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > at
> >
> >
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
> > at
> >
> >
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
> > at
> >
> >
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
> > at
> >
> >
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
> > at com.sun.proxy.$Proxy308.newTemplateResponse(Unknown Source)
> > at com.cloud.api.ApiDBUtils.newTemplateResponse(ApiDBUtils.java:2022)
> > at
> >
> >
> com.cloud.api.query.ViewResponseHelper.createTemplateResponse(ViewResponseHelper.java:590)
> > at
> >
> >
> com.cloud.api.query.QueryManagerImpl.listTemplates(QueryManagerImpl.java:3336)
> > at
> >
> >
> org.apache.cloudstack.api.command.user.template.ListTemplatesCmd.execute(ListTemplatesCmd.java:180)
> > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
> > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:764)
> > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588)
> > at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:321)
> > at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134)
> > at
> >
> >
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
> > at
> >
> >
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
> > at
> >
> >
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
> > at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131)
> > at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
> > at
> >
> >
> org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1443)
> > at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
> > at
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> > at
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
> > at
> >
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> > at
> >
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> > at
> > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> > at
> >
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> > at
> >
> >
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:766)
> > at
> >
> >
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> > at
> >
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> > at org.eclipse.jetty.server.Server.handle(Server.java:516)
> > at
> >
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
> > at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
> > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
> > at
> >
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
> > at
> > org.eclipse.jetty.io<http://org.eclipse.jetty.io>
> > .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> > at org.eclipse.jetty.io<http://org.eclipse.jetty.io
> >.FillInterest.fillable(FillInterest.java:105)
> > at org.eclipse.jetty.io<http://org.eclipse.jetty.io
> >.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> > at
> >
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
> > at
> >
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
> > at
> >
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
> > at
> >
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
> > at
> >
> >
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
> > at
> >
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
> > at
> >
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
> > at java.base/java.lang.Thread.run(Thread.java:829)
> > Caused by: java.sql.SQLSyntaxErrorException: You have an error in your
> SQL
> > syntax; check the manual that corresponds to your MySQL server version
> for
> > the right syntax to use near ')' at line 1
> > at
> >
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
> > at
> >
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
> > at
> >
> >
> com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
> > ... 87 more
> > 2021-09-20 00:27:12,122 DEBUG [c.c.a.ApiServlet]
> > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) ===END===
> >  172.16.10.2 -- GET
> >
> >
> listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json
> >
> >
> > Could you help me to pinpoint what I may have done wrong?
> >
> > On Mon, Sep 20, 2021 at 12:38 AM Harikrishna Patnala <
> > Harikrishna.Patnala@shapeblue.com<mailto:
> Harikrishna.Patnala@shapeblue.com>> wrote:
> >
> > > Sorry, logs at /var/log/cloudstack/management/management-server.log
> > > ________________________________
> > > From: Harikrishna Patnala <Harikrishna.Patnala@shapeblue.com<mailto:
> Harikrishna.Patnala@shapeblue.com>>
> > > Sent: Monday, September 20, 2021 10:04 AM
> > > To: users@cloudstack.apache.org<ma...@cloudstack.apache.org> <
> users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > > Subject: Re: Problem with Templates/ISO
> > >
> > >
> > > Hi Douglas,
> > >
> > > Firstly, welcome to CloudStack.
> > >
> > > This looks to me like DB changes did not apply properly during
> > > installation. Did you observe any issues in the logs during the
> > management
> > > server installation or start.
> > >
> > > You can check the logs at
> > > /usr/share/cloudstack/management/management-server.log and see the
> exact
> > > reason for DB sql exception when you perform the list templates
> > operation.
> > >
> > > As mentioned already there is no change in the system VM template from
> > > 4.15.1 to 4.15.2
> > >
> > > Regards,
> > > Harikrishna
> > > ________________________________
> > > From: DL <do...@gmail.com>>
> > > Sent: Monday, September 20, 2021 9:38 AM
> > > To: users@cloudstack.apache.org<ma...@cloudstack.apache.org> <
> users@cloudstack.apache.org<ma...@cloudstack.apache.org>>
> > > Subject: Problem with Templates/ISO
> > >
> > > Hello there,
> > >
> > > I am a new CloutStack user and a new user on this mailing list. After
> > > following the Quick Installation Guide, I ended up with empty
> > Template/ISOs
> > > when I attempted to create a VM instance.
> > >
> > > If I go to Images/Templates, I got 500 Internal Server Error:
> > >
> > > Request Failed (530)
> > > DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> > > template_store_ref.id<http://template_store_ref.id>,
> template_store_ref.store_id,
> > > template_store_ref.template_id, template_store_ref.store_role,
> > > template_store_ref.created, template_store_ref.last_updated,
> > > template_store_ref.download_pct, template_store_ref.size,
> > > template_store_ref.physical_size, template_store_ref.download_state,
> > > template_store_ref.local_path, template_store_ref.error_str,
> > > template_store_ref.job_id, template_store_ref.install_path,
> > > template_store_ref.url, template_store_ref.download_url,
> > > template_store_ref.download_url_created, template_store_ref.is_copy,
> > > template_store_ref.destroyed, template_store_ref.update_count,
> > > template_store_ref.updated, template_store_ref.state,
> > > template_store_ref.ref_cnt FROM template_store_ref WHERE
> > > template_store_ref.template_id = 3 AND
> template_store_ref.download_state
> > !=
> > > 'BYPASSED' AND template_store_ref.destroyed = 0 AND
> > > template_store_ref.store_id IN )
> > >
> > > Could someone help me fix this issue?
> > >
> > > The quick installation guide I followed says it is for 4.15.2.0
> > > installation. However, in the System Template Setup section, this
> > command:
> > > """
> > >
> > >
> >
> /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt
> > > -m /export/secondary -u
> > >
> > >
> >
> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2
> > > -h
> > > <
> >
> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2-h
> > >
> > > kvm -F
> > > """
> > > seems to suggest that the process will download template vms for the
> > > 4.15.1.0 version?
> > >
> > > Could this be the reason? Does anyone have an idea about when the
> > Template
> > > for the 4.15.2.0 version will be available?
> > >
> > > Best regards,
> > > Douglas
> >
> >
> >
> >
>
>
>
>
>
>
>

Re: Problem with Templates/ISO

Posted by Pearl d'Silva <pe...@shapeblue.com>.
Hi,

One of the reasons why the templates may not be showing up in the VM deployment wizard is because they aren't in the ready state. You can verify that by going into the respective template's info and in the zone tab you'd probably notice that the template(s) aren't in ready state. Ideally, once the SystemVMs, essentially, Secondary storage VM(SSVM) is up, it should sync the templates (the systemVM template (that you had initially seeded) and the built-in template). Do you see an errors in the management server logs that could be helpful.
Can you log into your database (cloud) and see if you see any entries in the template_store_ref table. I understand you are on a KVM based env, so,
select * from template_store_ref where template_id=4\G      - template_id = 4 - refers to a built-in template that gets downloaded.

Do you see any exceptions when trying to register a new template ?
For management server logs - look into /var/log/cloudstack/management/management-server.log
Another place to look at would be the SSVM (which plays an integral role in downloading templates)
Please refer to https://cwiki.apache.org/confluence/display/CLOUDSTACK/SSVM%2C+templates%2C+Secondary+storage+troubleshooting to log into and debug the SSVM.  To increase the log level in your SSVM - you can run the following:
sed -i 's/INFO/DEBUG/g' /usr/local/cloud/systemvm/conf/log4j-cloud.xml and then restart the cloud service : systemctl restart cloud
In the SSVM, you can observe the logs at /var/log/cloud.log

To setup an SSL enabled env you could follow this link - https://www.shapeblue.com/securing-cloudstack-4-11-with-https-tls/ or as a temporary hack, you can enter the SSVMs IP Address in the browser's url field with https scheme (https://<IP Address>) and accept the risk, before trying to upload the template.

Hope this helps.

Thanks


________________________________
From: DL <do...@gmail.com>
Sent: Tuesday, September 21, 2021 10:51 AM
To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
Subject: Re: Problem with Templates/ISO

The system VMs are up and running.
The Zone shows enabled.

I have another VM in VirtualBox serving as the gateway server for the cloudstack VM.
The gateway IP is 172.16.10.1. The cloudstack VM's IP is 172.16.10.2.
As instructed, the gateway server is only a gateway, not a DHCP server.
The cloudstack VM can use the gateway to access the Internet fine.
I can SSH from the gateway server into the cloudstack VM fine.

How do I make my env setup SSL enabled?
Am I supposed to see some existing Templates/ISOs when creating a new VM instance? Or am I supposed to create some Templates/ISOs by myself first?



On Tue, Sep 21, 2021 at 12:20 AM Pearl d'Silva <pe...@shapeblue.com>> wrote:
Hi Douglas,

Could you please let us know the following:

  *   Do you see the systemVMs are up and running (Infratructure -> System VMs)?
  *   Is the zone enabled? (Infrastructure -> Zones (specific zone's Allocation State))

Providing some insight into the state of your env - by answering the above questions, may help us diagnose the issue better wrt template registration failure. With regards to template/iso upload(from local) failure - this would be expected if your env setup isn't SSL enabled. The issues you may be facing could also be due to your infrastructure / network topology.
The Quick installation guide is up to date and should work, however if you are facing issues you may refer to https://github.com/shapeblue/hackerbook/blob/main/1-user.md to setup a basic env. Another resource you could look at is https://github.com/shapeblue/mbx - this will setup an env for you - please do follow the Readme. That said, if you see any issues with the documentation, you can report them i.e., create an issue/ pull request against the respective projects on GitHub and we can help improve them.

Thanks,
Pearl



________________________________
From: DL <do...@gmail.com>>
Sent: Tuesday, September 21, 2021 12:43 AM
To: users@cloudstack.apache.org<ma...@cloudstack.apache.org> <us...@cloudstack.apache.org>>
Subject: Re: Problem with Templates/ISO

Hi Pearl,

Following your solution, I added the Secondary Storage, and now two
Templates and two ISOs shows under the Images tab.
However, I still couldn't see any Templates/ISOs in the Template/ISO
configuration page when I tried to create a new VM instance.

I tried to Register ISO also. If I use an online ISO, cloudstack would show
me that the url hostname cannot be resolved. (Of course, I can use the
browser to download the ISO fine)
If I want to upload an ISO from the local machine, cloudstack would report
an error saying that it cannot reach the management server (or some web
browser extensions may have blocked the request). I have a single machine
doing all the things. I also checked that all required processes are
running. My browser doesn't use any extensions.

I am using a CentOS 7 virtual machine within VirtualBox to follow the Quick
Installation Guide (
http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.html
).
I have made everything identical to that of the Quick Installation Guide.
However, I still encountered various issues.

The first issue is that after I configured the Zone, Pod, Cluster, etc, and
launched the Zone, every time (I have done this with multiple VMs) the
system would hang at the last step "Adding Host" forever. I really mean
forever. And it didn't even report what error it encountered. I have to
close the window. After this, I would see, the host has been added to the
Zone successfully. However, the Primary Storage and the Secondary Storage
were not added. I believe this is why I needed to add the Secondary Storage
(and also the Primary Storage) manually.
But after this, I still could not see/add any Templates/ISOs.


I didn't expect so many issues by just following the simplest Quick
Installation Guide.
Is there anything I should pay special attention to while following the
Quick Installation Guide?
Does the Quick Installation Guide still work for the latest version? I do
notice that the instructions don't mention some options I was faced with
during the installation/configuration process. I just chose default
options. Would this cause any issues?
Are there any better Installation Guides I should try instead?
Are there any existing clouds (built with CloudStack) that I can play with
for free (or with minimal costs)?

Sorry for asking so many questions. I just want to get started.

Best regards,


On Mon, Sep 20, 2021 at 12:55 AM Pearl d'Silva <pe...@shapeblue.com>>
wrote:

> Hi Douglas,
>
>
> That seems to be the issue, you will need to add a store to the zone. You
> can do that either via UI / command line. On the UI, there is the "Add
> Secondary Storage" button, provide the zone, the server IP/name, and the
> path (in your case, /export/secondary).
>
>
> Thanks,
> Pearl
> ________________________________
> From: DL <do...@gmail.com>>
> Sent: Monday, September 20, 2021 10:16 AM
> To: users@cloudstack.apache.org<ma...@cloudstack.apache.org> <us...@cloudstack.apache.org>>
> Subject: Re: Problem with Templates/ISO
>
> @Pearl
> I can go to the Infrastructure -> Secondary Storage tab. However, nothing
> is there.
>
> @Harikrishna
> Thank you also for getting back to me!
>
> Here is what I found related to the error in the log:
>
> 2021-09-20 00:27:12,093 DEBUG [c.c.a.ApiServlet]
> (qtp1136768342-20:ctx-d9bd1f44) (logid:a56ace1d) ===START===  172.16.10.2
> -- GET
>
>  listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json
> 2021-09-20 00:27:12,097 DEBUG [c.c.a.ApiServer]
> (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) CIDRs from
> which account 'Acct[2e801633-1977-11ec-98da-5254005ad990-admin]' is allowed
> to perform API calls: 0.0.0.0/0,::/0<http://0.0.0.0/0,::/0>
> 2021-09-20 00:27:12,110 ERROR [c.c.a.ApiServer]
> (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) unhandled
> exception executing api command: [Ljava.lang.String;@421e6f13
> com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
> com.mysql.cj.jdbc.ClientPreparedStatement: SELECT template_store_ref.id<http://template_store_ref.id>,
> template_store_ref.store_id, template_store_ref.template_id,
> template_store_ref.store_role, template_store_ref.created,
> template_store_ref.last_updated, template_store_ref.download_pct,
> template_store_ref.size, template_store_ref.physical_size,
> template_store_ref.download_state, template_store_ref.local_path,
> template_store_ref.error_str, template_store_ref.job_id,
> template_store_ref.install_path, template_store_ref.url,
> template_store_ref.download_url, template_store_ref.download_url_created,
> template_store_ref.is_copy, template_store_ref.destroyed,
> template_store_ref.update_count, template_store_ref.updated,
> template_store_ref.state, template_store_ref.ref_cnt FROM
> template_store_ref WHERE template_store_ref.template_id = 3  AND
> template_store_ref.download_state != 'BYPASSED'  AND
> template_store_ref.destroyed = 0  AND template_store_ref.store_id IN )
> at
>
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:423)
> at
>
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:359)
> at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:348)
> at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:1308)
> at
>
> org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl.listByTemplateNotBypassed(TemplateDataStoreDaoImpl.java:431)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
>
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
>
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at
>
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
> at
>
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
> at
>
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
> at
>
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
> at com.sun.proxy.$Proxy79.listByTemplateNotBypassed(Unknown Source)
> at
>
> com.cloud.api.query.dao.TemplateJoinDaoImpl.newTemplateResponse(TemplateJoinDaoImpl.java:165)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
>
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
>
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at
>
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
> at
>
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
> at
>
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
> at
>
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
> at com.sun.proxy.$Proxy308.newTemplateResponse(Unknown Source)
> at com.cloud.api.ApiDBUtils.newTemplateResponse(ApiDBUtils.java:2022)
> at
>
> com.cloud.api.query.ViewResponseHelper.createTemplateResponse(ViewResponseHelper.java:590)
> at
>
> com.cloud.api.query.QueryManagerImpl.listTemplates(QueryManagerImpl.java:3336)
> at
>
> org.apache.cloudstack.api.command.user.template.ListTemplatesCmd.execute(ListTemplatesCmd.java:180)
> at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:764)
> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588)
> at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:321)
> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134)
> at
>
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
> at
>
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
> at
>
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
> at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131)
> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
> at
>
> org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1443)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
> at
>
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> at
>
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> at
>
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> at
>
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> at
>
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
>
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:766)
> at
>
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> at
>
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.Server.handle(Server.java:516)
> at
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
> at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
> at
> org.eclipse.jetty.io<http://org.eclipse.jetty.io>
> .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> at org.eclipse.jetty.io<http://org.eclipse.jetty.io>.FillInterest.fillable(FillInterest.java:105)
> at org.eclipse.jetty.io<http://org.eclipse.jetty.io>.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> at
>
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
> at
>
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
> at
>
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
> at
>
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
> at
>
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
> at
>
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
> at
>
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
> at java.base/java.lang.Thread.run(Thread.java:829)
> Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL
> syntax; check the manual that corresponds to your MySQL server version for
> the right syntax to use near ')' at line 1
> at
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
> at
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
> at
>
> com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
> ... 87 more
> 2021-09-20 00:27:12,122 DEBUG [c.c.a.ApiServlet]
> (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) ===END===
>  172.16.10.2 -- GET
>
>  listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json
>
>
> Could you help me to pinpoint what I may have done wrong?
>
> On Mon, Sep 20, 2021 at 12:38 AM Harikrishna Patnala <
> Harikrishna.Patnala@shapeblue.com<ma...@shapeblue.com>> wrote:
>
> > Sorry, logs at /var/log/cloudstack/management/management-server.log
> > ________________________________
> > From: Harikrishna Patnala <Ha...@shapeblue.com>>
> > Sent: Monday, September 20, 2021 10:04 AM
> > To: users@cloudstack.apache.org<ma...@cloudstack.apache.org> <us...@cloudstack.apache.org>>
> > Subject: Re: Problem with Templates/ISO
> >
> >
> > Hi Douglas,
> >
> > Firstly, welcome to CloudStack.
> >
> > This looks to me like DB changes did not apply properly during
> > installation. Did you observe any issues in the logs during the
> management
> > server installation or start.
> >
> > You can check the logs at
> > /usr/share/cloudstack/management/management-server.log and see the exact
> > reason for DB sql exception when you perform the list templates
> operation.
> >
> > As mentioned already there is no change in the system VM template from
> > 4.15.1 to 4.15.2
> >
> > Regards,
> > Harikrishna
> > ________________________________
> > From: DL <do...@gmail.com>>
> > Sent: Monday, September 20, 2021 9:38 AM
> > To: users@cloudstack.apache.org<ma...@cloudstack.apache.org> <us...@cloudstack.apache.org>>
> > Subject: Problem with Templates/ISO
> >
> > Hello there,
> >
> > I am a new CloutStack user and a new user on this mailing list. After
> > following the Quick Installation Guide, I ended up with empty
> Template/ISOs
> > when I attempted to create a VM instance.
> >
> > If I go to Images/Templates, I got 500 Internal Server Error:
> >
> > Request Failed (530)
> > DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> > template_store_ref.id<http://template_store_ref.id>, template_store_ref.store_id,
> > template_store_ref.template_id, template_store_ref.store_role,
> > template_store_ref.created, template_store_ref.last_updated,
> > template_store_ref.download_pct, template_store_ref.size,
> > template_store_ref.physical_size, template_store_ref.download_state,
> > template_store_ref.local_path, template_store_ref.error_str,
> > template_store_ref.job_id, template_store_ref.install_path,
> > template_store_ref.url, template_store_ref.download_url,
> > template_store_ref.download_url_created, template_store_ref.is_copy,
> > template_store_ref.destroyed, template_store_ref.update_count,
> > template_store_ref.updated, template_store_ref.state,
> > template_store_ref.ref_cnt FROM template_store_ref WHERE
> > template_store_ref.template_id = 3 AND template_store_ref.download_state
> !=
> > 'BYPASSED' AND template_store_ref.destroyed = 0 AND
> > template_store_ref.store_id IN )
> >
> > Could someone help me fix this issue?
> >
> > The quick installation guide I followed says it is for 4.15.2.0
> > installation. However, in the System Template Setup section, this
> command:
> > """
> >
> >
> /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt
> > -m /export/secondary -u
> >
> >
> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2
> > -h
> > <
> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2-h
> >
> > kvm -F
> > """
> > seems to suggest that the process will download template vms for the
> > 4.15.1.0 version?
> >
> > Could this be the reason? Does anyone have an idea about when the
> Template
> > for the 4.15.2.0 version will be available?
> >
> > Best regards,
> > Douglas
>
>
>
>




 


Re: Problem with Templates/ISO

Posted by DL <do...@gmail.com>.
If I go to Infrastructure -> Management Servers, I can see that 3 of them
are down, 1 is up. (This is the case for my deployment with IP address
172.16.10.3; for my deployment with IP address 172.16.10.2, 3 of them are
down, and 3 of them are up.)
Is this normal?
It seems that some services are not running?


On Tue, Sep 21, 2021 at 1:21 AM DL <do...@gmail.com> wrote:

> The system VMs are up and running.
> The Zone shows enabled.
>
> I have another VM in VirtualBox serving as the gateway server for the
> cloudstack VM.
> The gateway IP is 172.16.10.1. The cloudstack VM's IP is 172.16.10.2.
> As instructed, the gateway server is only a gateway, not a DHCP server.
> The cloudstack VM can use the gateway to access the Internet fine.
> I can SSH from the gateway server into the cloudstack VM fine.
>
> How do I make my env setup SSL enabled?
> Am I supposed to see some existing Templates/ISOs when creating a new VM
> instance? Or am I supposed to create some Templates/ISOs by myself first?
>
>
>
> On Tue, Sep 21, 2021 at 12:20 AM Pearl d'Silva <pe...@shapeblue.com>
> wrote:
>
>> Hi Douglas,
>>
>> Could you please let us know the following:
>>
>>   *   Do you see the systemVMs are up and running (Infratructure ->
>> System VMs)?
>>   *   Is the zone enabled? (Infrastructure -> Zones (specific zone's
>> Allocation State))
>>
>> Providing some insight into the state of your env - by answering the
>> above questions, may help us diagnose the issue better wrt template
>> registration failure. With regards to template/iso upload(from local)
>> failure - this would be expected if your env setup isn't SSL enabled. The
>> issues you may be facing could also be due to your infrastructure / network
>> topology.
>> The Quick installation guide is up to date and should work, however if
>> you are facing issues you may refer to
>> https://github.com/shapeblue/hackerbook/blob/main/1-user.md to setup a
>> basic env. Another resource you could look at is
>> https://github.com/shapeblue/mbx - this will setup an env for you -
>> please do follow the Readme. That said, if you see any issues with the
>> documentation, you can report them i.e., create an issue/ pull request
>> against the respective projects on GitHub and we can help improve them.
>>
>> Thanks,
>> Pearl
>>
>>
>>
>> ________________________________
>> From: DL <do...@gmail.com>
>> Sent: Tuesday, September 21, 2021 12:43 AM
>> To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
>> Subject: Re: Problem with Templates/ISO
>>
>> Hi Pearl,
>>
>> Following your solution, I added the Secondary Storage, and now two
>> Templates and two ISOs shows under the Images tab.
>> However, I still couldn't see any Templates/ISOs in the Template/ISO
>> configuration page when I tried to create a new VM instance.
>>
>> I tried to Register ISO also. If I use an online ISO, cloudstack would
>> show
>> me that the url hostname cannot be resolved. (Of course, I can use the
>> browser to download the ISO fine)
>> If I want to upload an ISO from the local machine, cloudstack would report
>> an error saying that it cannot reach the management server (or some web
>> browser extensions may have blocked the request). I have a single machine
>> doing all the things. I also checked that all required processes are
>> running. My browser doesn't use any extensions.
>>
>> I am using a CentOS 7 virtual machine within VirtualBox to follow the
>> Quick
>> Installation Guide (
>>
>> http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.html
>> ).
>> I have made everything identical to that of the Quick Installation Guide.
>> However, I still encountered various issues.
>>
>> The first issue is that after I configured the Zone, Pod, Cluster, etc,
>> and
>> launched the Zone, every time (I have done this with multiple VMs) the
>> system would hang at the last step "Adding Host" forever. I really mean
>> forever. And it didn't even report what error it encountered. I have to
>> close the window. After this, I would see, the host has been added to the
>> Zone successfully. However, the Primary Storage and the Secondary Storage
>> were not added. I believe this is why I needed to add the Secondary
>> Storage
>> (and also the Primary Storage) manually.
>> But after this, I still could not see/add any Templates/ISOs.
>>
>>
>> I didn't expect so many issues by just following the simplest Quick
>> Installation Guide.
>> Is there anything I should pay special attention to while following the
>> Quick Installation Guide?
>> Does the Quick Installation Guide still work for the latest version? I do
>> notice that the instructions don't mention some options I was faced with
>> during the installation/configuration process. I just chose default
>> options. Would this cause any issues?
>> Are there any better Installation Guides I should try instead?
>> Are there any existing clouds (built with CloudStack) that I can play with
>> for free (or with minimal costs)?
>>
>> Sorry for asking so many questions. I just want to get started.
>>
>> Best regards,
>>
>>
>> On Mon, Sep 20, 2021 at 12:55 AM Pearl d'Silva <
>> pearl.dsilva@shapeblue.com>
>> wrote:
>>
>> > Hi Douglas,
>> >
>> >
>> > That seems to be the issue, you will need to add a store to the zone.
>> You
>> > can do that either via UI / command line. On the UI, there is the "Add
>> > Secondary Storage" button, provide the zone, the server IP/name, and the
>> > path (in your case, /export/secondary).
>> >
>> >
>> > Thanks,
>> > Pearl
>> > ________________________________
>> > From: DL <do...@gmail.com>
>> > Sent: Monday, September 20, 2021 10:16 AM
>> > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
>> > Subject: Re: Problem with Templates/ISO
>> >
>> > @Pearl
>> > I can go to the Infrastructure -> Secondary Storage tab. However,
>> nothing
>> > is there.
>> >
>> > @Harikrishna
>> > Thank you also for getting back to me!
>> >
>> > Here is what I found related to the error in the log:
>> >
>> > 2021-09-20 00:27:12,093 DEBUG [c.c.a.ApiServlet]
>> > (qtp1136768342-20:ctx-d9bd1f44) (logid:a56ace1d) ===START===
>> 172.16.10.2
>> > -- GET
>> >
>> >
>> listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json
>> > 2021-09-20 00:27:12,097 DEBUG [c.c.a.ApiServer]
>> > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) CIDRs from
>> > which account 'Acct[2e801633-1977-11ec-98da-5254005ad990-admin]' is
>> allowed
>> > to perform API calls: 0.0.0.0/0,::/0
>> > 2021-09-20 00:27:12,110 ERROR [c.c.a.ApiServer]
>> > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) unhandled
>> > exception executing api command: [Ljava.lang.String;@421e6f13
>> > com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
>> > com.mysql.cj.jdbc.ClientPreparedStatement: SELECT template_store_ref.id
>> ,
>> > template_store_ref.store_id, template_store_ref.template_id,
>> > template_store_ref.store_role, template_store_ref.created,
>> > template_store_ref.last_updated, template_store_ref.download_pct,
>> > template_store_ref.size, template_store_ref.physical_size,
>> > template_store_ref.download_state, template_store_ref.local_path,
>> > template_store_ref.error_str, template_store_ref.job_id,
>> > template_store_ref.install_path, template_store_ref.url,
>> > template_store_ref.download_url,
>> template_store_ref.download_url_created,
>> > template_store_ref.is_copy, template_store_ref.destroyed,
>> > template_store_ref.update_count, template_store_ref.updated,
>> > template_store_ref.state, template_store_ref.ref_cnt FROM
>> > template_store_ref WHERE template_store_ref.template_id = 3  AND
>> > template_store_ref.download_state != 'BYPASSED'  AND
>> > template_store_ref.destroyed = 0  AND template_store_ref.store_id IN )
>> > at
>> >
>> >
>> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:423)
>> > at
>> >
>> >
>> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:359)
>> > at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:348)
>> > at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:1308)
>> > at
>> >
>> >
>> org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl.listByTemplateNotBypassed(TemplateDataStoreDaoImpl.java:431)
>> > at
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
>> > Method)
>> > at
>> >
>> >
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>> > at
>> >
>> >
>> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>> > at
>> >
>> >
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
>> > at
>> >
>> >
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
>> > at
>> >
>> >
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
>> > at
>> >
>> >
>> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
>> > at
>> >
>> >
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
>> > at
>> >
>> >
>> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
>> > at
>> >
>> >
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
>> > at
>> >
>> >
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
>> > at com.sun.proxy.$Proxy79.listByTemplateNotBypassed(Unknown Source)
>> > at
>> >
>> >
>> com.cloud.api.query.dao.TemplateJoinDaoImpl.newTemplateResponse(TemplateJoinDaoImpl.java:165)
>> > at
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
>> > Method)
>> > at
>> >
>> >
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>> > at
>> >
>> >
>> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>> > at
>> >
>> >
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
>> > at
>> >
>> >
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
>> > at
>> >
>> >
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
>> > at
>> >
>> >
>> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
>> > at
>> >
>> >
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
>> > at
>> >
>> >
>> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
>> > at
>> >
>> >
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
>> > at
>> >
>> >
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
>> > at com.sun.proxy.$Proxy308.newTemplateResponse(Unknown Source)
>> > at com.cloud.api.ApiDBUtils.newTemplateResponse(ApiDBUtils.java:2022)
>> > at
>> >
>> >
>> com.cloud.api.query.ViewResponseHelper.createTemplateResponse(ViewResponseHelper.java:590)
>> > at
>> >
>> >
>> com.cloud.api.query.QueryManagerImpl.listTemplates(QueryManagerImpl.java:3336)
>> > at
>> >
>> >
>> org.apache.cloudstack.api.command.user.template.ListTemplatesCmd.execute(ListTemplatesCmd.java:180)
>> > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
>> > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:764)
>> > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588)
>> > at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:321)
>> > at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134)
>> > at
>> >
>> >
>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
>> > at
>> >
>> >
>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
>> > at
>> >
>> >
>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
>> > at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131)
>> > at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93)
>> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
>> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
>> > at
>> >
>> >
>> org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1443)
>> > at
>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
>> > at
>> >
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>> > at
>> >
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
>> > at
>> >
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:766)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
>> > at
>> >
>> >
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
>> > at org.eclipse.jetty.server.Server.handle(Server.java:516)
>> > at
>> >
>> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
>> > at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
>> > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
>> > at
>> >
>> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
>> > at
>> > org.eclipse.jetty.io
>> > .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
>> > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
>> > at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
>> > at
>> >
>> >
>> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
>> > at
>> >
>> >
>> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
>> > at
>> >
>> >
>> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
>> > at
>> >
>> >
>> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
>> > at
>> >
>> >
>> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
>> > at
>> >
>> >
>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
>> > at
>> >
>> >
>> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
>> > at java.base/java.lang.Thread.run(Thread.java:829)
>> > Caused by: java.sql.SQLSyntaxErrorException: You have an error in your
>> SQL
>> > syntax; check the manual that corresponds to your MySQL server version
>> for
>> > the right syntax to use near ')' at line 1
>> > at
>> >
>> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
>> > at
>> >
>> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
>> > at
>> >
>> >
>> com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
>> > ... 87 more
>> > 2021-09-20 00:27:12,122 DEBUG [c.c.a.ApiServlet]
>> > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) ===END===
>> >  172.16.10.2 -- GET
>> >
>> >
>> listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json
>> >
>> >
>> > Could you help me to pinpoint what I may have done wrong?
>> >
>> > On Mon, Sep 20, 2021 at 12:38 AM Harikrishna Patnala <
>> > Harikrishna.Patnala@shapeblue.com> wrote:
>> >
>> > > Sorry, logs at /var/log/cloudstack/management/management-server.log
>> > > ________________________________
>> > > From: Harikrishna Patnala <Ha...@shapeblue.com>
>> > > Sent: Monday, September 20, 2021 10:04 AM
>> > > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
>> > > Subject: Re: Problem with Templates/ISO
>> > >
>> > >
>> > > Hi Douglas,
>> > >
>> > > Firstly, welcome to CloudStack.
>> > >
>> > > This looks to me like DB changes did not apply properly during
>> > > installation. Did you observe any issues in the logs during the
>> > management
>> > > server installation or start.
>> > >
>> > > You can check the logs at
>> > > /usr/share/cloudstack/management/management-server.log and see the
>> exact
>> > > reason for DB sql exception when you perform the list templates
>> > operation.
>> > >
>> > > As mentioned already there is no change in the system VM template from
>> > > 4.15.1 to 4.15.2
>> > >
>> > > Regards,
>> > > Harikrishna
>> > > ________________________________
>> > > From: DL <do...@gmail.com>
>> > > Sent: Monday, September 20, 2021 9:38 AM
>> > > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
>> > > Subject: Problem with Templates/ISO
>> > >
>> > > Hello there,
>> > >
>> > > I am a new CloutStack user and a new user on this mailing list. After
>> > > following the Quick Installation Guide, I ended up with empty
>> > Template/ISOs
>> > > when I attempted to create a VM instance.
>> > >
>> > > If I go to Images/Templates, I got 500 Internal Server Error:
>> > >
>> > > Request Failed (530)
>> > > DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
>> > > template_store_ref.id, template_store_ref.store_id,
>> > > template_store_ref.template_id, template_store_ref.store_role,
>> > > template_store_ref.created, template_store_ref.last_updated,
>> > > template_store_ref.download_pct, template_store_ref.size,
>> > > template_store_ref.physical_size, template_store_ref.download_state,
>> > > template_store_ref.local_path, template_store_ref.error_str,
>> > > template_store_ref.job_id, template_store_ref.install_path,
>> > > template_store_ref.url, template_store_ref.download_url,
>> > > template_store_ref.download_url_created, template_store_ref.is_copy,
>> > > template_store_ref.destroyed, template_store_ref.update_count,
>> > > template_store_ref.updated, template_store_ref.state,
>> > > template_store_ref.ref_cnt FROM template_store_ref WHERE
>> > > template_store_ref.template_id = 3 AND
>> template_store_ref.download_state
>> > !=
>> > > 'BYPASSED' AND template_store_ref.destroyed = 0 AND
>> > > template_store_ref.store_id IN )
>> > >
>> > > Could someone help me fix this issue?
>> > >
>> > > The quick installation guide I followed says it is for 4.15.2.0
>> > > installation. However, in the System Template Setup section, this
>> > command:
>> > > """
>> > >
>> > >
>> >
>> /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt
>> > > -m /export/secondary -u
>> > >
>> > >
>> >
>> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2
>> > > -h
>> > > <
>> >
>> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2-h
>> > >
>> > > kvm -F
>> > > """
>> > > seems to suggest that the process will download template vms for the
>> > > 4.15.1.0 version?
>> > >
>> > > Could this be the reason? Does anyone have an idea about when the
>> > Template
>> > > for the 4.15.2.0 version will be available?
>> > >
>> > > Best regards,
>> > > Douglas
>> >
>> >
>> >
>> >
>>
>>
>>
>>

Re: Problem with Templates/ISO

Posted by DL <do...@gmail.com>.
The system VMs are up and running.
The Zone shows enabled.

I have another VM in VirtualBox serving as the gateway server for the
cloudstack VM.
The gateway IP is 172.16.10.1. The cloudstack VM's IP is 172.16.10.2.
As instructed, the gateway server is only a gateway, not a DHCP server.
The cloudstack VM can use the gateway to access the Internet fine.
I can SSH from the gateway server into the cloudstack VM fine.

How do I make my env setup SSL enabled?
Am I supposed to see some existing Templates/ISOs when creating a new VM
instance? Or am I supposed to create some Templates/ISOs by myself first?



On Tue, Sep 21, 2021 at 12:20 AM Pearl d'Silva <pe...@shapeblue.com>
wrote:

> Hi Douglas,
>
> Could you please let us know the following:
>
>   *   Do you see the systemVMs are up and running (Infratructure -> System
> VMs)?
>   *   Is the zone enabled? (Infrastructure -> Zones (specific zone's
> Allocation State))
>
> Providing some insight into the state of your env - by answering the above
> questions, may help us diagnose the issue better wrt template registration
> failure. With regards to template/iso upload(from local) failure - this
> would be expected if your env setup isn't SSL enabled. The issues you may
> be facing could also be due to your infrastructure / network topology.
> The Quick installation guide is up to date and should work, however if you
> are facing issues you may refer to
> https://github.com/shapeblue/hackerbook/blob/main/1-user.md to setup a
> basic env. Another resource you could look at is
> https://github.com/shapeblue/mbx - this will setup an env for you -
> please do follow the Readme. That said, if you see any issues with the
> documentation, you can report them i.e., create an issue/ pull request
> against the respective projects on GitHub and we can help improve them.
>
> Thanks,
> Pearl
>
>
>
> ________________________________
> From: DL <do...@gmail.com>
> Sent: Tuesday, September 21, 2021 12:43 AM
> To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> Subject: Re: Problem with Templates/ISO
>
> Hi Pearl,
>
> Following your solution, I added the Secondary Storage, and now two
> Templates and two ISOs shows under the Images tab.
> However, I still couldn't see any Templates/ISOs in the Template/ISO
> configuration page when I tried to create a new VM instance.
>
> I tried to Register ISO also. If I use an online ISO, cloudstack would show
> me that the url hostname cannot be resolved. (Of course, I can use the
> browser to download the ISO fine)
> If I want to upload an ISO from the local machine, cloudstack would report
> an error saying that it cannot reach the management server (or some web
> browser extensions may have blocked the request). I have a single machine
> doing all the things. I also checked that all required processes are
> running. My browser doesn't use any extensions.
>
> I am using a CentOS 7 virtual machine within VirtualBox to follow the Quick
> Installation Guide (
> http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.html
> ).
> I have made everything identical to that of the Quick Installation Guide.
> However, I still encountered various issues.
>
> The first issue is that after I configured the Zone, Pod, Cluster, etc, and
> launched the Zone, every time (I have done this with multiple VMs) the
> system would hang at the last step "Adding Host" forever. I really mean
> forever. And it didn't even report what error it encountered. I have to
> close the window. After this, I would see, the host has been added to the
> Zone successfully. However, the Primary Storage and the Secondary Storage
> were not added. I believe this is why I needed to add the Secondary Storage
> (and also the Primary Storage) manually.
> But after this, I still could not see/add any Templates/ISOs.
>
>
> I didn't expect so many issues by just following the simplest Quick
> Installation Guide.
> Is there anything I should pay special attention to while following the
> Quick Installation Guide?
> Does the Quick Installation Guide still work for the latest version? I do
> notice that the instructions don't mention some options I was faced with
> during the installation/configuration process. I just chose default
> options. Would this cause any issues?
> Are there any better Installation Guides I should try instead?
> Are there any existing clouds (built with CloudStack) that I can play with
> for free (or with minimal costs)?
>
> Sorry for asking so many questions. I just want to get started.
>
> Best regards,
>
>
> On Mon, Sep 20, 2021 at 12:55 AM Pearl d'Silva <pearl.dsilva@shapeblue.com
> >
> wrote:
>
> > Hi Douglas,
> >
> >
> > That seems to be the issue, you will need to add a store to the zone. You
> > can do that either via UI / command line. On the UI, there is the "Add
> > Secondary Storage" button, provide the zone, the server IP/name, and the
> > path (in your case, /export/secondary).
> >
> >
> > Thanks,
> > Pearl
> > ________________________________
> > From: DL <do...@gmail.com>
> > Sent: Monday, September 20, 2021 10:16 AM
> > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> > Subject: Re: Problem with Templates/ISO
> >
> > @Pearl
> > I can go to the Infrastructure -> Secondary Storage tab. However, nothing
> > is there.
> >
> > @Harikrishna
> > Thank you also for getting back to me!
> >
> > Here is what I found related to the error in the log:
> >
> > 2021-09-20 00:27:12,093 DEBUG [c.c.a.ApiServlet]
> > (qtp1136768342-20:ctx-d9bd1f44) (logid:a56ace1d) ===START===  172.16.10.2
> > -- GET
> >
> >
> listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json
> > 2021-09-20 00:27:12,097 DEBUG [c.c.a.ApiServer]
> > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) CIDRs from
> > which account 'Acct[2e801633-1977-11ec-98da-5254005ad990-admin]' is
> allowed
> > to perform API calls: 0.0.0.0/0,::/0
> > 2021-09-20 00:27:12,110 ERROR [c.c.a.ApiServer]
> > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) unhandled
> > exception executing api command: [Ljava.lang.String;@421e6f13
> > com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
> > com.mysql.cj.jdbc.ClientPreparedStatement: SELECT template_store_ref.id,
> > template_store_ref.store_id, template_store_ref.template_id,
> > template_store_ref.store_role, template_store_ref.created,
> > template_store_ref.last_updated, template_store_ref.download_pct,
> > template_store_ref.size, template_store_ref.physical_size,
> > template_store_ref.download_state, template_store_ref.local_path,
> > template_store_ref.error_str, template_store_ref.job_id,
> > template_store_ref.install_path, template_store_ref.url,
> > template_store_ref.download_url, template_store_ref.download_url_created,
> > template_store_ref.is_copy, template_store_ref.destroyed,
> > template_store_ref.update_count, template_store_ref.updated,
> > template_store_ref.state, template_store_ref.ref_cnt FROM
> > template_store_ref WHERE template_store_ref.template_id = 3  AND
> > template_store_ref.download_state != 'BYPASSED'  AND
> > template_store_ref.destroyed = 0  AND template_store_ref.store_id IN )
> > at
> >
> >
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:423)
> > at
> >
> >
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:359)
> > at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:348)
> > at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:1308)
> > at
> >
> >
> org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl.listByTemplateNotBypassed(TemplateDataStoreDaoImpl.java:431)
> > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> > at
> >
> >
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> >
> >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > at
> >
> >
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
> > at
> >
> >
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
> > at
> >
> >
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
> > at
> >
> >
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
> > at com.sun.proxy.$Proxy79.listByTemplateNotBypassed(Unknown Source)
> > at
> >
> >
> com.cloud.api.query.dao.TemplateJoinDaoImpl.newTemplateResponse(TemplateJoinDaoImpl.java:165)
> > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> > at
> >
> >
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> >
> >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > at
> >
> >
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
> > at
> >
> >
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
> > at
> >
> >
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
> > at
> >
> >
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
> > at
> >
> >
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
> > at com.sun.proxy.$Proxy308.newTemplateResponse(Unknown Source)
> > at com.cloud.api.ApiDBUtils.newTemplateResponse(ApiDBUtils.java:2022)
> > at
> >
> >
> com.cloud.api.query.ViewResponseHelper.createTemplateResponse(ViewResponseHelper.java:590)
> > at
> >
> >
> com.cloud.api.query.QueryManagerImpl.listTemplates(QueryManagerImpl.java:3336)
> > at
> >
> >
> org.apache.cloudstack.api.command.user.template.ListTemplatesCmd.execute(ListTemplatesCmd.java:180)
> > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
> > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:764)
> > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588)
> > at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:321)
> > at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134)
> > at
> >
> >
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
> > at
> >
> >
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
> > at
> >
> >
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
> > at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131)
> > at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
> > at
> >
> >
> org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1443)
> > at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
> > at
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> > at
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
> > at
> >
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> > at
> >
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> > at
> > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> > at
> >
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> > at
> >
> >
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:766)
> > at
> >
> >
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> > at
> >
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> > at org.eclipse.jetty.server.Server.handle(Server.java:516)
> > at
> >
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
> > at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
> > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
> > at
> >
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
> > at
> > org.eclipse.jetty.io
> > .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
> > at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> > at
> >
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
> > at
> >
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
> > at
> >
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
> > at
> >
> >
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
> > at
> >
> >
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
> > at
> >
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
> > at
> >
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
> > at java.base/java.lang.Thread.run(Thread.java:829)
> > Caused by: java.sql.SQLSyntaxErrorException: You have an error in your
> SQL
> > syntax; check the manual that corresponds to your MySQL server version
> for
> > the right syntax to use near ')' at line 1
> > at
> >
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
> > at
> >
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
> > at
> >
> >
> com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
> > ... 87 more
> > 2021-09-20 00:27:12,122 DEBUG [c.c.a.ApiServlet]
> > (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) ===END===
> >  172.16.10.2 -- GET
> >
> >
> listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json
> >
> >
> > Could you help me to pinpoint what I may have done wrong?
> >
> > On Mon, Sep 20, 2021 at 12:38 AM Harikrishna Patnala <
> > Harikrishna.Patnala@shapeblue.com> wrote:
> >
> > > Sorry, logs at /var/log/cloudstack/management/management-server.log
> > > ________________________________
> > > From: Harikrishna Patnala <Ha...@shapeblue.com>
> > > Sent: Monday, September 20, 2021 10:04 AM
> > > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> > > Subject: Re: Problem with Templates/ISO
> > >
> > >
> > > Hi Douglas,
> > >
> > > Firstly, welcome to CloudStack.
> > >
> > > This looks to me like DB changes did not apply properly during
> > > installation. Did you observe any issues in the logs during the
> > management
> > > server installation or start.
> > >
> > > You can check the logs at
> > > /usr/share/cloudstack/management/management-server.log and see the
> exact
> > > reason for DB sql exception when you perform the list templates
> > operation.
> > >
> > > As mentioned already there is no change in the system VM template from
> > > 4.15.1 to 4.15.2
> > >
> > > Regards,
> > > Harikrishna
> > > ________________________________
> > > From: DL <do...@gmail.com>
> > > Sent: Monday, September 20, 2021 9:38 AM
> > > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> > > Subject: Problem with Templates/ISO
> > >
> > > Hello there,
> > >
> > > I am a new CloutStack user and a new user on this mailing list. After
> > > following the Quick Installation Guide, I ended up with empty
> > Template/ISOs
> > > when I attempted to create a VM instance.
> > >
> > > If I go to Images/Templates, I got 500 Internal Server Error:
> > >
> > > Request Failed (530)
> > > DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> > > template_store_ref.id, template_store_ref.store_id,
> > > template_store_ref.template_id, template_store_ref.store_role,
> > > template_store_ref.created, template_store_ref.last_updated,
> > > template_store_ref.download_pct, template_store_ref.size,
> > > template_store_ref.physical_size, template_store_ref.download_state,
> > > template_store_ref.local_path, template_store_ref.error_str,
> > > template_store_ref.job_id, template_store_ref.install_path,
> > > template_store_ref.url, template_store_ref.download_url,
> > > template_store_ref.download_url_created, template_store_ref.is_copy,
> > > template_store_ref.destroyed, template_store_ref.update_count,
> > > template_store_ref.updated, template_store_ref.state,
> > > template_store_ref.ref_cnt FROM template_store_ref WHERE
> > > template_store_ref.template_id = 3 AND
> template_store_ref.download_state
> > !=
> > > 'BYPASSED' AND template_store_ref.destroyed = 0 AND
> > > template_store_ref.store_id IN )
> > >
> > > Could someone help me fix this issue?
> > >
> > > The quick installation guide I followed says it is for 4.15.2.0
> > > installation. However, in the System Template Setup section, this
> > command:
> > > """
> > >
> > >
> >
> /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt
> > > -m /export/secondary -u
> > >
> > >
> >
> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2
> > > -h
> > > <
> >
> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2-h
> > >
> > > kvm -F
> > > """
> > > seems to suggest that the process will download template vms for the
> > > 4.15.1.0 version?
> > >
> > > Could this be the reason? Does anyone have an idea about when the
> > Template
> > > for the 4.15.2.0 version will be available?
> > >
> > > Best regards,
> > > Douglas
> >
> >
> >
> >
>
>
>
>

Re: Problem with Templates/ISO

Posted by Pearl d'Silva <pe...@shapeblue.com>.
Hi Douglas,

Could you please let us know the following:

  *   Do you see the systemVMs are up and running (Infratructure -> System VMs)?
  *   Is the zone enabled? (Infrastructure -> Zones (specific zone's Allocation State))

Providing some insight into the state of your env - by answering the above questions, may help us diagnose the issue better wrt template registration failure. With regards to template/iso upload(from local) failure - this would be expected if your env setup isn't SSL enabled. The issues you may be facing could also be due to your infrastructure / network topology.
The Quick installation guide is up to date and should work, however if you are facing issues you may refer to https://github.com/shapeblue/hackerbook/blob/main/1-user.md to setup a basic env. Another resource you could look at is https://github.com/shapeblue/mbx - this will setup an env for you - please do follow the Readme. That said, if you see any issues with the documentation, you can report them i.e., create an issue/ pull request against the respective projects on GitHub and we can help improve them.

Thanks,
Pearl



________________________________
From: DL <do...@gmail.com>
Sent: Tuesday, September 21, 2021 12:43 AM
To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
Subject: Re: Problem with Templates/ISO

Hi Pearl,

Following your solution, I added the Secondary Storage, and now two
Templates and two ISOs shows under the Images tab.
However, I still couldn't see any Templates/ISOs in the Template/ISO
configuration page when I tried to create a new VM instance.

I tried to Register ISO also. If I use an online ISO, cloudstack would show
me that the url hostname cannot be resolved. (Of course, I can use the
browser to download the ISO fine)
If I want to upload an ISO from the local machine, cloudstack would report
an error saying that it cannot reach the management server (or some web
browser extensions may have blocked the request). I have a single machine
doing all the things. I also checked that all required processes are
running. My browser doesn't use any extensions.

I am using a CentOS 7 virtual machine within VirtualBox to follow the Quick
Installation Guide (
http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.html
).
I have made everything identical to that of the Quick Installation Guide.
However, I still encountered various issues.

The first issue is that after I configured the Zone, Pod, Cluster, etc, and
launched the Zone, every time (I have done this with multiple VMs) the
system would hang at the last step "Adding Host" forever. I really mean
forever. And it didn't even report what error it encountered. I have to
close the window. After this, I would see, the host has been added to the
Zone successfully. However, the Primary Storage and the Secondary Storage
were not added. I believe this is why I needed to add the Secondary Storage
(and also the Primary Storage) manually.
But after this, I still could not see/add any Templates/ISOs.


I didn't expect so many issues by just following the simplest Quick
Installation Guide.
Is there anything I should pay special attention to while following the
Quick Installation Guide?
Does the Quick Installation Guide still work for the latest version? I do
notice that the instructions don't mention some options I was faced with
during the installation/configuration process. I just chose default
options. Would this cause any issues?
Are there any better Installation Guides I should try instead?
Are there any existing clouds (built with CloudStack) that I can play with
for free (or with minimal costs)?

Sorry for asking so many questions. I just want to get started.

Best regards,


On Mon, Sep 20, 2021 at 12:55 AM Pearl d'Silva <pe...@shapeblue.com>
wrote:

> Hi Douglas,
>
>
> That seems to be the issue, you will need to add a store to the zone. You
> can do that either via UI / command line. On the UI, there is the "Add
> Secondary Storage" button, provide the zone, the server IP/name, and the
> path (in your case, /export/secondary).
>
>
> Thanks,
> Pearl
> ________________________________
> From: DL <do...@gmail.com>
> Sent: Monday, September 20, 2021 10:16 AM
> To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> Subject: Re: Problem with Templates/ISO
>
> @Pearl
> I can go to the Infrastructure -> Secondary Storage tab. However, nothing
> is there.
>
> @Harikrishna
> Thank you also for getting back to me!
>
> Here is what I found related to the error in the log:
>
> 2021-09-20 00:27:12,093 DEBUG [c.c.a.ApiServlet]
> (qtp1136768342-20:ctx-d9bd1f44) (logid:a56ace1d) ===START===  172.16.10.2
> -- GET
>
>  listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json
> 2021-09-20 00:27:12,097 DEBUG [c.c.a.ApiServer]
> (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) CIDRs from
> which account 'Acct[2e801633-1977-11ec-98da-5254005ad990-admin]' is allowed
> to perform API calls: 0.0.0.0/0,::/0
> 2021-09-20 00:27:12,110 ERROR [c.c.a.ApiServer]
> (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) unhandled
> exception executing api command: [Ljava.lang.String;@421e6f13
> com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
> com.mysql.cj.jdbc.ClientPreparedStatement: SELECT template_store_ref.id,
> template_store_ref.store_id, template_store_ref.template_id,
> template_store_ref.store_role, template_store_ref.created,
> template_store_ref.last_updated, template_store_ref.download_pct,
> template_store_ref.size, template_store_ref.physical_size,
> template_store_ref.download_state, template_store_ref.local_path,
> template_store_ref.error_str, template_store_ref.job_id,
> template_store_ref.install_path, template_store_ref.url,
> template_store_ref.download_url, template_store_ref.download_url_created,
> template_store_ref.is_copy, template_store_ref.destroyed,
> template_store_ref.update_count, template_store_ref.updated,
> template_store_ref.state, template_store_ref.ref_cnt FROM
> template_store_ref WHERE template_store_ref.template_id = 3  AND
> template_store_ref.download_state != 'BYPASSED'  AND
> template_store_ref.destroyed = 0  AND template_store_ref.store_id IN )
> at
>
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:423)
> at
>
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:359)
> at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:348)
> at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:1308)
> at
>
> org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl.listByTemplateNotBypassed(TemplateDataStoreDaoImpl.java:431)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
>
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
>
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at
>
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
> at
>
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
> at
>
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
> at
>
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
> at com.sun.proxy.$Proxy79.listByTemplateNotBypassed(Unknown Source)
> at
>
> com.cloud.api.query.dao.TemplateJoinDaoImpl.newTemplateResponse(TemplateJoinDaoImpl.java:165)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
>
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
>
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at
>
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
> at
>
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
> at
>
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
> at
>
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
> at com.sun.proxy.$Proxy308.newTemplateResponse(Unknown Source)
> at com.cloud.api.ApiDBUtils.newTemplateResponse(ApiDBUtils.java:2022)
> at
>
> com.cloud.api.query.ViewResponseHelper.createTemplateResponse(ViewResponseHelper.java:590)
> at
>
> com.cloud.api.query.QueryManagerImpl.listTemplates(QueryManagerImpl.java:3336)
> at
>
> org.apache.cloudstack.api.command.user.template.ListTemplatesCmd.execute(ListTemplatesCmd.java:180)
> at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:764)
> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588)
> at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:321)
> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134)
> at
>
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
> at
>
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
> at
>
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
> at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131)
> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
> at
>
> org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1443)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
> at
>
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> at
>
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> at
>
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> at
>
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> at
>
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
>
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:766)
> at
>
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> at
>
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.Server.handle(Server.java:516)
> at
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
> at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
> at
> org.eclipse.jetty.io
> .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
> at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> at
>
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
> at
>
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
> at
>
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
> at
>
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
> at
>
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
> at
>
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
> at
>
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
> at java.base/java.lang.Thread.run(Thread.java:829)
> Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL
> syntax; check the manual that corresponds to your MySQL server version for
> the right syntax to use near ')' at line 1
> at
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
> at
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
> at
>
> com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
> ... 87 more
> 2021-09-20 00:27:12,122 DEBUG [c.c.a.ApiServlet]
> (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) ===END===
>  172.16.10.2 -- GET
>
>  listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json
>
>
> Could you help me to pinpoint what I may have done wrong?
>
> On Mon, Sep 20, 2021 at 12:38 AM Harikrishna Patnala <
> Harikrishna.Patnala@shapeblue.com> wrote:
>
> > Sorry, logs at /var/log/cloudstack/management/management-server.log
> > ________________________________
> > From: Harikrishna Patnala <Ha...@shapeblue.com>
> > Sent: Monday, September 20, 2021 10:04 AM
> > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> > Subject: Re: Problem with Templates/ISO
> >
> >
> > Hi Douglas,
> >
> > Firstly, welcome to CloudStack.
> >
> > This looks to me like DB changes did not apply properly during
> > installation. Did you observe any issues in the logs during the
> management
> > server installation or start.
> >
> > You can check the logs at
> > /usr/share/cloudstack/management/management-server.log and see the exact
> > reason for DB sql exception when you perform the list templates
> operation.
> >
> > As mentioned already there is no change in the system VM template from
> > 4.15.1 to 4.15.2
> >
> > Regards,
> > Harikrishna
> > ________________________________
> > From: DL <do...@gmail.com>
> > Sent: Monday, September 20, 2021 9:38 AM
> > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> > Subject: Problem with Templates/ISO
> >
> > Hello there,
> >
> > I am a new CloutStack user and a new user on this mailing list. After
> > following the Quick Installation Guide, I ended up with empty
> Template/ISOs
> > when I attempted to create a VM instance.
> >
> > If I go to Images/Templates, I got 500 Internal Server Error:
> >
> > Request Failed (530)
> > DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> > template_store_ref.id, template_store_ref.store_id,
> > template_store_ref.template_id, template_store_ref.store_role,
> > template_store_ref.created, template_store_ref.last_updated,
> > template_store_ref.download_pct, template_store_ref.size,
> > template_store_ref.physical_size, template_store_ref.download_state,
> > template_store_ref.local_path, template_store_ref.error_str,
> > template_store_ref.job_id, template_store_ref.install_path,
> > template_store_ref.url, template_store_ref.download_url,
> > template_store_ref.download_url_created, template_store_ref.is_copy,
> > template_store_ref.destroyed, template_store_ref.update_count,
> > template_store_ref.updated, template_store_ref.state,
> > template_store_ref.ref_cnt FROM template_store_ref WHERE
> > template_store_ref.template_id = 3 AND template_store_ref.download_state
> !=
> > 'BYPASSED' AND template_store_ref.destroyed = 0 AND
> > template_store_ref.store_id IN )
> >
> > Could someone help me fix this issue?
> >
> > The quick installation guide I followed says it is for 4.15.2.0
> > installation. However, in the System Template Setup section, this
> command:
> > """
> >
> >
> /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt
> > -m /export/secondary -u
> >
> >
> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2
> > -h
> > <
> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2-h
> >
> > kvm -F
> > """
> > seems to suggest that the process will download template vms for the
> > 4.15.1.0 version?
> >
> > Could this be the reason? Does anyone have an idea about when the
> Template
> > for the 4.15.2.0 version will be available?
> >
> > Best regards,
> > Douglas
>
>
>
>

 


Re: Problem with Templates/ISO

Posted by DL <do...@gmail.com>.
Hi Pearl,

Following your solution, I added the Secondary Storage, and now two
Templates and two ISOs shows under the Images tab.
However, I still couldn't see any Templates/ISOs in the Template/ISO
configuration page when I tried to create a new VM instance.

I tried to Register ISO also. If I use an online ISO, cloudstack would show
me that the url hostname cannot be resolved. (Of course, I can use the
browser to download the ISO fine)
If I want to upload an ISO from the local machine, cloudstack would report
an error saying that it cannot reach the management server (or some web
browser extensions may have blocked the request). I have a single machine
doing all the things. I also checked that all required processes are
running. My browser doesn't use any extensions.

I am using a CentOS 7 virtual machine within VirtualBox to follow the Quick
Installation Guide (
http://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.html
).
I have made everything identical to that of the Quick Installation Guide.
However, I still encountered various issues.

The first issue is that after I configured the Zone, Pod, Cluster, etc, and
launched the Zone, every time (I have done this with multiple VMs) the
system would hang at the last step "Adding Host" forever. I really mean
forever. And it didn't even report what error it encountered. I have to
close the window. After this, I would see, the host has been added to the
Zone successfully. However, the Primary Storage and the Secondary Storage
were not added. I believe this is why I needed to add the Secondary Storage
(and also the Primary Storage) manually.
But after this, I still could not see/add any Templates/ISOs.


I didn't expect so many issues by just following the simplest Quick
Installation Guide.
Is there anything I should pay special attention to while following the
Quick Installation Guide?
Does the Quick Installation Guide still work for the latest version? I do
notice that the instructions don't mention some options I was faced with
during the installation/configuration process. I just chose default
options. Would this cause any issues?
Are there any better Installation Guides I should try instead?
Are there any existing clouds (built with CloudStack) that I can play with
for free (or with minimal costs)?

Sorry for asking so many questions. I just want to get started.

Best regards,


On Mon, Sep 20, 2021 at 12:55 AM Pearl d'Silva <pe...@shapeblue.com>
wrote:

> Hi Douglas,
>
>
> That seems to be the issue, you will need to add a store to the zone. You
> can do that either via UI / command line. On the UI, there is the "Add
> Secondary Storage" button, provide the zone, the server IP/name, and the
> path (in your case, /export/secondary).
>
>
> Thanks,
> Pearl
> ________________________________
> From: DL <do...@gmail.com>
> Sent: Monday, September 20, 2021 10:16 AM
> To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> Subject: Re: Problem with Templates/ISO
>
> @Pearl
> I can go to the Infrastructure -> Secondary Storage tab. However, nothing
> is there.
>
> @Harikrishna
> Thank you also for getting back to me!
>
> Here is what I found related to the error in the log:
>
> 2021-09-20 00:27:12,093 DEBUG [c.c.a.ApiServlet]
> (qtp1136768342-20:ctx-d9bd1f44) (logid:a56ace1d) ===START===  172.16.10.2
> -- GET
>
>  listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json
> 2021-09-20 00:27:12,097 DEBUG [c.c.a.ApiServer]
> (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) CIDRs from
> which account 'Acct[2e801633-1977-11ec-98da-5254005ad990-admin]' is allowed
> to perform API calls: 0.0.0.0/0,::/0
> 2021-09-20 00:27:12,110 ERROR [c.c.a.ApiServer]
> (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) unhandled
> exception executing api command: [Ljava.lang.String;@421e6f13
> com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
> com.mysql.cj.jdbc.ClientPreparedStatement: SELECT template_store_ref.id,
> template_store_ref.store_id, template_store_ref.template_id,
> template_store_ref.store_role, template_store_ref.created,
> template_store_ref.last_updated, template_store_ref.download_pct,
> template_store_ref.size, template_store_ref.physical_size,
> template_store_ref.download_state, template_store_ref.local_path,
> template_store_ref.error_str, template_store_ref.job_id,
> template_store_ref.install_path, template_store_ref.url,
> template_store_ref.download_url, template_store_ref.download_url_created,
> template_store_ref.is_copy, template_store_ref.destroyed,
> template_store_ref.update_count, template_store_ref.updated,
> template_store_ref.state, template_store_ref.ref_cnt FROM
> template_store_ref WHERE template_store_ref.template_id = 3  AND
> template_store_ref.download_state != 'BYPASSED'  AND
> template_store_ref.destroyed = 0  AND template_store_ref.store_id IN )
> at
>
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:423)
> at
>
> com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:359)
> at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:348)
> at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:1308)
> at
>
> org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl.listByTemplateNotBypassed(TemplateDataStoreDaoImpl.java:431)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
>
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
>
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at
>
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
> at
>
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
> at
>
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
> at
>
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
> at com.sun.proxy.$Proxy79.listByTemplateNotBypassed(Unknown Source)
> at
>
> com.cloud.api.query.dao.TemplateJoinDaoImpl.newTemplateResponse(TemplateJoinDaoImpl.java:165)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
>
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
>
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at
>
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
> at
>
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
> at
>
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
> at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
> at
>
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
> at com.sun.proxy.$Proxy308.newTemplateResponse(Unknown Source)
> at com.cloud.api.ApiDBUtils.newTemplateResponse(ApiDBUtils.java:2022)
> at
>
> com.cloud.api.query.ViewResponseHelper.createTemplateResponse(ViewResponseHelper.java:590)
> at
>
> com.cloud.api.query.QueryManagerImpl.listTemplates(QueryManagerImpl.java:3336)
> at
>
> org.apache.cloudstack.api.command.user.template.ListTemplatesCmd.execute(ListTemplatesCmd.java:180)
> at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:764)
> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588)
> at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:321)
> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134)
> at
>
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
> at
>
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
> at
>
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
> at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131)
> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
> at
>
> org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1443)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
> at
>
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> at
>
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> at
>
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> at
>
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> at
>
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
>
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:766)
> at
>
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> at
>
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.Server.handle(Server.java:516)
> at
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
> at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
> at
> org.eclipse.jetty.io
> .AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
> at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> at
>
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
> at
>
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
> at
>
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
> at
>
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
> at
>
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
> at
>
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
> at
>
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
> at java.base/java.lang.Thread.run(Thread.java:829)
> Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL
> syntax; check the manual that corresponds to your MySQL server version for
> the right syntax to use near ')' at line 1
> at
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
> at
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
> at
>
> com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
> ... 87 more
> 2021-09-20 00:27:12,122 DEBUG [c.c.a.ApiServlet]
> (qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) ===END===
>  172.16.10.2 -- GET
>
>  listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json
>
>
> Could you help me to pinpoint what I may have done wrong?
>
> On Mon, Sep 20, 2021 at 12:38 AM Harikrishna Patnala <
> Harikrishna.Patnala@shapeblue.com> wrote:
>
> > Sorry, logs at /var/log/cloudstack/management/management-server.log
> > ________________________________
> > From: Harikrishna Patnala <Ha...@shapeblue.com>
> > Sent: Monday, September 20, 2021 10:04 AM
> > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> > Subject: Re: Problem with Templates/ISO
> >
> >
> > Hi Douglas,
> >
> > Firstly, welcome to CloudStack.
> >
> > This looks to me like DB changes did not apply properly during
> > installation. Did you observe any issues in the logs during the
> management
> > server installation or start.
> >
> > You can check the logs at
> > /usr/share/cloudstack/management/management-server.log and see the exact
> > reason for DB sql exception when you perform the list templates
> operation.
> >
> > As mentioned already there is no change in the system VM template from
> > 4.15.1 to 4.15.2
> >
> > Regards,
> > Harikrishna
> > ________________________________
> > From: DL <do...@gmail.com>
> > Sent: Monday, September 20, 2021 9:38 AM
> > To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> > Subject: Problem with Templates/ISO
> >
> > Hello there,
> >
> > I am a new CloutStack user and a new user on this mailing list. After
> > following the Quick Installation Guide, I ended up with empty
> Template/ISOs
> > when I attempted to create a VM instance.
> >
> > If I go to Images/Templates, I got 500 Internal Server Error:
> >
> > Request Failed (530)
> > DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> > template_store_ref.id, template_store_ref.store_id,
> > template_store_ref.template_id, template_store_ref.store_role,
> > template_store_ref.created, template_store_ref.last_updated,
> > template_store_ref.download_pct, template_store_ref.size,
> > template_store_ref.physical_size, template_store_ref.download_state,
> > template_store_ref.local_path, template_store_ref.error_str,
> > template_store_ref.job_id, template_store_ref.install_path,
> > template_store_ref.url, template_store_ref.download_url,
> > template_store_ref.download_url_created, template_store_ref.is_copy,
> > template_store_ref.destroyed, template_store_ref.update_count,
> > template_store_ref.updated, template_store_ref.state,
> > template_store_ref.ref_cnt FROM template_store_ref WHERE
> > template_store_ref.template_id = 3 AND template_store_ref.download_state
> !=
> > 'BYPASSED' AND template_store_ref.destroyed = 0 AND
> > template_store_ref.store_id IN )
> >
> > Could someone help me fix this issue?
> >
> > The quick installation guide I followed says it is for 4.15.2.0
> > installation. However, in the System Template Setup section, this
> command:
> > """
> >
> >
> /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt
> > -m /export/secondary -u
> >
> >
> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2
> > -h
> > <
> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2-h
> >
> > kvm -F
> > """
> > seems to suggest that the process will download template vms for the
> > 4.15.1.0 version?
> >
> > Could this be the reason? Does anyone have an idea about when the
> Template
> > for the 4.15.2.0 version will be available?
> >
> > Best regards,
> > Douglas
>
>
>
>

Re: Problem with Templates/ISO

Posted by Pearl d'Silva <pe...@shapeblue.com>.
Hi Douglas,


That seems to be the issue, you will need to add a store to the zone. You can do that either via UI / command line. On the UI, there is the "Add Secondary Storage" button, provide the zone, the server IP/name, and the path (in your case, /export/secondary).


Thanks,
Pearl
________________________________
From: DL <do...@gmail.com>
Sent: Monday, September 20, 2021 10:16 AM
To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
Subject: Re: Problem with Templates/ISO

@Pearl
I can go to the Infrastructure -> Secondary Storage tab. However, nothing
is there.

@Harikrishna
Thank you also for getting back to me!

Here is what I found related to the error in the log:

2021-09-20 00:27:12,093 DEBUG [c.c.a.ApiServlet]
(qtp1136768342-20:ctx-d9bd1f44) (logid:a56ace1d) ===START===  172.16.10.2
-- GET
 listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json
2021-09-20 00:27:12,097 DEBUG [c.c.a.ApiServer]
(qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) CIDRs from
which account 'Acct[2e801633-1977-11ec-98da-5254005ad990-admin]' is allowed
to perform API calls: 0.0.0.0/0,::/0
2021-09-20 00:27:12,110 ERROR [c.c.a.ApiServer]
(qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) unhandled
exception executing api command: [Ljava.lang.String;@421e6f13
com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
com.mysql.cj.jdbc.ClientPreparedStatement: SELECT template_store_ref.id,
template_store_ref.store_id, template_store_ref.template_id,
template_store_ref.store_role, template_store_ref.created,
template_store_ref.last_updated, template_store_ref.download_pct,
template_store_ref.size, template_store_ref.physical_size,
template_store_ref.download_state, template_store_ref.local_path,
template_store_ref.error_str, template_store_ref.job_id,
template_store_ref.install_path, template_store_ref.url,
template_store_ref.download_url, template_store_ref.download_url_created,
template_store_ref.is_copy, template_store_ref.destroyed,
template_store_ref.update_count, template_store_ref.updated,
template_store_ref.state, template_store_ref.ref_cnt FROM
template_store_ref WHERE template_store_ref.template_id = 3  AND
template_store_ref.download_state != 'BYPASSED'  AND
template_store_ref.destroyed = 0  AND template_store_ref.store_id IN )
at
com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:423)
at
com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:359)
at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:348)
at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:1308)
at
org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl.listByTemplateNotBypassed(TemplateDataStoreDaoImpl.java:431)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at
com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
at com.sun.proxy.$Proxy79.listByTemplateNotBypassed(Unknown Source)
at
com.cloud.api.query.dao.TemplateJoinDaoImpl.newTemplateResponse(TemplateJoinDaoImpl.java:165)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at
com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
at com.sun.proxy.$Proxy308.newTemplateResponse(Unknown Source)
at com.cloud.api.ApiDBUtils.newTemplateResponse(ApiDBUtils.java:2022)
at
com.cloud.api.query.ViewResponseHelper.createTemplateResponse(ViewResponseHelper.java:590)
at
com.cloud.api.query.QueryManagerImpl.listTemplates(QueryManagerImpl.java:3336)
at
org.apache.cloudstack.api.command.user.template.ListTemplatesCmd.execute(ListTemplatesCmd.java:180)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
at com.cloud.api.ApiServer.queueCommand(ApiServer.java:764)
at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588)
at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:321)
at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131)
at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
at
org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1443)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
at
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
at
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at
org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:766)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at
org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at
org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL
syntax; check the manual that corresponds to your MySQL server version for
the right syntax to use near ')' at line 1
at
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
at
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
... 87 more
2021-09-20 00:27:12,122 DEBUG [c.c.a.ApiServlet]
(qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) ===END===
 172.16.10.2 -- GET
 listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json


Could you help me to pinpoint what I may have done wrong?

On Mon, Sep 20, 2021 at 12:38 AM Harikrishna Patnala <
Harikrishna.Patnala@shapeblue.com> wrote:

> Sorry, logs at /var/log/cloudstack/management/management-server.log
> ________________________________
> From: Harikrishna Patnala <Ha...@shapeblue.com>
> Sent: Monday, September 20, 2021 10:04 AM
> To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> Subject: Re: Problem with Templates/ISO
>
>
> Hi Douglas,
>
> Firstly, welcome to CloudStack.
>
> This looks to me like DB changes did not apply properly during
> installation. Did you observe any issues in the logs during the management
> server installation or start.
>
> You can check the logs at
> /usr/share/cloudstack/management/management-server.log and see the exact
> reason for DB sql exception when you perform the list templates operation.
>
> As mentioned already there is no change in the system VM template from
> 4.15.1 to 4.15.2
>
> Regards,
> Harikrishna
> ________________________________
> From: DL <do...@gmail.com>
> Sent: Monday, September 20, 2021 9:38 AM
> To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> Subject: Problem with Templates/ISO
>
> Hello there,
>
> I am a new CloutStack user and a new user on this mailing list. After
> following the Quick Installation Guide, I ended up with empty Template/ISOs
> when I attempted to create a VM instance.
>
> If I go to Images/Templates, I got 500 Internal Server Error:
>
> Request Failed (530)
> DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> template_store_ref.id, template_store_ref.store_id,
> template_store_ref.template_id, template_store_ref.store_role,
> template_store_ref.created, template_store_ref.last_updated,
> template_store_ref.download_pct, template_store_ref.size,
> template_store_ref.physical_size, template_store_ref.download_state,
> template_store_ref.local_path, template_store_ref.error_str,
> template_store_ref.job_id, template_store_ref.install_path,
> template_store_ref.url, template_store_ref.download_url,
> template_store_ref.download_url_created, template_store_ref.is_copy,
> template_store_ref.destroyed, template_store_ref.update_count,
> template_store_ref.updated, template_store_ref.state,
> template_store_ref.ref_cnt FROM template_store_ref WHERE
> template_store_ref.template_id = 3 AND template_store_ref.download_state !=
> 'BYPASSED' AND template_store_ref.destroyed = 0 AND
> template_store_ref.store_id IN )
>
> Could someone help me fix this issue?
>
> The quick installation guide I followed says it is for 4.15.2.0
> installation. However, in the System Template Setup section, this command:
> """
>
> /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt
> -m /export/secondary -u
>
> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2
> -h
> <https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2-h>
> kvm -F
> """
> seems to suggest that the process will download template vms for the
> 4.15.1.0 version?
>
> Could this be the reason? Does anyone have an idea about when the Template
> for the 4.15.2.0 version will be available?
>
> Best regards,
> Douglas

 


Re: Problem with Templates/ISO

Posted by DL <do...@gmail.com>.
@Pearl
I can go to the Infrastructure -> Secondary Storage tab. However, nothing
is there.

@Harikrishna
Thank you also for getting back to me!

Here is what I found related to the error in the log:

2021-09-20 00:27:12,093 DEBUG [c.c.a.ApiServlet]
(qtp1136768342-20:ctx-d9bd1f44) (logid:a56ace1d) ===START===  172.16.10.2
-- GET
 listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json
2021-09-20 00:27:12,097 DEBUG [c.c.a.ApiServer]
(qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) CIDRs from
which account 'Acct[2e801633-1977-11ec-98da-5254005ad990-admin]' is allowed
to perform API calls: 0.0.0.0/0,::/0
2021-09-20 00:27:12,110 ERROR [c.c.a.ApiServer]
(qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) unhandled
exception executing api command: [Ljava.lang.String;@421e6f13
com.cloud.utils.exception.CloudRuntimeException: DB Exception on:
com.mysql.cj.jdbc.ClientPreparedStatement: SELECT template_store_ref.id,
template_store_ref.store_id, template_store_ref.template_id,
template_store_ref.store_role, template_store_ref.created,
template_store_ref.last_updated, template_store_ref.download_pct,
template_store_ref.size, template_store_ref.physical_size,
template_store_ref.download_state, template_store_ref.local_path,
template_store_ref.error_str, template_store_ref.job_id,
template_store_ref.install_path, template_store_ref.url,
template_store_ref.download_url, template_store_ref.download_url_created,
template_store_ref.is_copy, template_store_ref.destroyed,
template_store_ref.update_count, template_store_ref.updated,
template_store_ref.state, template_store_ref.ref_cnt FROM
template_store_ref WHERE template_store_ref.template_id = 3  AND
template_store_ref.download_state != 'BYPASSED'  AND
template_store_ref.destroyed = 0  AND template_store_ref.store_id IN )
at
com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:423)
at
com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:359)
at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:348)
at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:1308)
at
org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl.listByTemplateNotBypassed(TemplateDataStoreDaoImpl.java:431)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at
com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
at com.sun.proxy.$Proxy79.listByTemplateNotBypassed(Unknown Source)
at
com.cloud.api.query.dao.TemplateJoinDaoImpl.newTemplateResponse(TemplateJoinDaoImpl.java:165)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at
com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
at com.sun.proxy.$Proxy308.newTemplateResponse(Unknown Source)
at com.cloud.api.ApiDBUtils.newTemplateResponse(ApiDBUtils.java:2022)
at
com.cloud.api.query.ViewResponseHelper.createTemplateResponse(ViewResponseHelper.java:590)
at
com.cloud.api.query.QueryManagerImpl.listTemplates(QueryManagerImpl.java:3336)
at
org.apache.cloudstack.api.command.user.template.ListTemplatesCmd.execute(ListTemplatesCmd.java:180)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
at com.cloud.api.ApiServer.queueCommand(ApiServer.java:764)
at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588)
at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:321)
at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131)
at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
at
org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1443)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
at
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
at
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at
org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:766)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at
org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at
org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL
syntax; check the manual that corresponds to your MySQL server version for
the right syntax to use near ')' at line 1
at
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
at
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
... 87 more
2021-09-20 00:27:12,122 DEBUG [c.c.a.ApiServlet]
(qtp1136768342-20:ctx-d9bd1f44 ctx-931ef03f) (logid:a56ace1d) ===END===
 172.16.10.2 -- GET
 listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json


Could you help me to pinpoint what I may have done wrong?

On Mon, Sep 20, 2021 at 12:38 AM Harikrishna Patnala <
Harikrishna.Patnala@shapeblue.com> wrote:

> Sorry, logs at /var/log/cloudstack/management/management-server.log
> ________________________________
> From: Harikrishna Patnala <Ha...@shapeblue.com>
> Sent: Monday, September 20, 2021 10:04 AM
> To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> Subject: Re: Problem with Templates/ISO
>
>
> Hi Douglas,
>
> Firstly, welcome to CloudStack.
>
> This looks to me like DB changes did not apply properly during
> installation. Did you observe any issues in the logs during the management
> server installation or start.
>
> You can check the logs at
> /usr/share/cloudstack/management/management-server.log and see the exact
> reason for DB sql exception when you perform the list templates operation.
>
> As mentioned already there is no change in the system VM template from
> 4.15.1 to 4.15.2
>
> Regards,
> Harikrishna
> ________________________________
> From: DL <do...@gmail.com>
> Sent: Monday, September 20, 2021 9:38 AM
> To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
> Subject: Problem with Templates/ISO
>
> Hello there,
>
> I am a new CloutStack user and a new user on this mailing list. After
> following the Quick Installation Guide, I ended up with empty Template/ISOs
> when I attempted to create a VM instance.
>
> If I go to Images/Templates, I got 500 Internal Server Error:
>
> Request Failed (530)
> DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
> template_store_ref.id, template_store_ref.store_id,
> template_store_ref.template_id, template_store_ref.store_role,
> template_store_ref.created, template_store_ref.last_updated,
> template_store_ref.download_pct, template_store_ref.size,
> template_store_ref.physical_size, template_store_ref.download_state,
> template_store_ref.local_path, template_store_ref.error_str,
> template_store_ref.job_id, template_store_ref.install_path,
> template_store_ref.url, template_store_ref.download_url,
> template_store_ref.download_url_created, template_store_ref.is_copy,
> template_store_ref.destroyed, template_store_ref.update_count,
> template_store_ref.updated, template_store_ref.state,
> template_store_ref.ref_cnt FROM template_store_ref WHERE
> template_store_ref.template_id = 3 AND template_store_ref.download_state !=
> 'BYPASSED' AND template_store_ref.destroyed = 0 AND
> template_store_ref.store_id IN )
>
> Could someone help me fix this issue?
>
> The quick installation guide I followed says it is for 4.15.2.0
> installation. However, in the System Template Setup section, this command:
> """
>
> /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt
> -m /export/secondary -u
>
> https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2
> -h
> <https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2-h>
> kvm -F
> """
> seems to suggest that the process will download template vms for the
> 4.15.1.0 version?
>
> Could this be the reason? Does anyone have an idea about when the Template
> for the 4.15.2.0 version will be available?
>
> Best regards,
> Douglas

Re: Problem with Templates/ISO

Posted by Harikrishna Patnala <Ha...@shapeblue.com>.
Sorry, logs at /var/log/cloudstack/management/management-server.log
________________________________
From: Harikrishna Patnala <Ha...@shapeblue.com>
Sent: Monday, September 20, 2021 10:04 AM
To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
Subject: Re: Problem with Templates/ISO


Hi Douglas,

Firstly, welcome to CloudStack.

This looks to me like DB changes did not apply properly during installation. Did you observe any issues in the logs during the management server installation or start.

You can check the logs at /usr/share/cloudstack/management/management-server.log and see the exact reason for DB sql exception when you perform the list templates operation.

As mentioned already there is no change in the system VM template from 4.15.1 to 4.15.2

Regards,
Harikrishna
________________________________
From: DL <do...@gmail.com>
Sent: Monday, September 20, 2021 9:38 AM
To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
Subject: Problem with Templates/ISO

Hello there,

I am a new CloutStack user and a new user on this mailing list. After
following the Quick Installation Guide, I ended up with empty Template/ISOs
when I attempted to create a VM instance.

If I go to Images/Templates, I got 500 Internal Server Error:

Request Failed (530)
DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
template_store_ref.id, template_store_ref.store_id,
template_store_ref.template_id, template_store_ref.store_role,
template_store_ref.created, template_store_ref.last_updated,
template_store_ref.download_pct, template_store_ref.size,
template_store_ref.physical_size, template_store_ref.download_state,
template_store_ref.local_path, template_store_ref.error_str,
template_store_ref.job_id, template_store_ref.install_path,
template_store_ref.url, template_store_ref.download_url,
template_store_ref.download_url_created, template_store_ref.is_copy,
template_store_ref.destroyed, template_store_ref.update_count,
template_store_ref.updated, template_store_ref.state,
template_store_ref.ref_cnt FROM template_store_ref WHERE
template_store_ref.template_id = 3 AND template_store_ref.download_state !=
'BYPASSED' AND template_store_ref.destroyed = 0 AND
template_store_ref.store_id IN )

Could someone help me fix this issue?

The quick installation guide I followed says it is for 4.15.2.0
installation. However, in the System Template Setup section, this command:
"""
/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt
-m /export/secondary -u
https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2
-h kvm -F
"""
seems to suggest that the process will download template vms for the
4.15.1.0 version?

Could this be the reason? Does anyone have an idea about when the Template
for the 4.15.2.0 version will be available?

Best regards,
Douglas




 


Re: Problem with Templates/ISO

Posted by Harikrishna Patnala <Ha...@shapeblue.com>.
Hi Douglas,

Firstly, welcome to CloudStack.

This looks to me like DB changes did not apply properly during installation. Did you observe any issues in the logs during the management server installation or start.

You can check the logs at /usr/share/cloudstack/management/management-server.log and see the exact reason for DB sql exception when you perform the list templates operation.

As mentioned already there is no change in the system VM template from 4.15.1 to 4.15.2

Regards,
Harikrishna
________________________________
From: DL <do...@gmail.com>
Sent: Monday, September 20, 2021 9:38 AM
To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
Subject: Problem with Templates/ISO

Hello there,

I am a new CloutStack user and a new user on this mailing list. After
following the Quick Installation Guide, I ended up with empty Template/ISOs
when I attempted to create a VM instance.

If I go to Images/Templates, I got 500 Internal Server Error:

Request Failed (530)
DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT
template_store_ref.id, template_store_ref.store_id,
template_store_ref.template_id, template_store_ref.store_role,
template_store_ref.created, template_store_ref.last_updated,
template_store_ref.download_pct, template_store_ref.size,
template_store_ref.physical_size, template_store_ref.download_state,
template_store_ref.local_path, template_store_ref.error_str,
template_store_ref.job_id, template_store_ref.install_path,
template_store_ref.url, template_store_ref.download_url,
template_store_ref.download_url_created, template_store_ref.is_copy,
template_store_ref.destroyed, template_store_ref.update_count,
template_store_ref.updated, template_store_ref.state,
template_store_ref.ref_cnt FROM template_store_ref WHERE
template_store_ref.template_id = 3 AND template_store_ref.download_state !=
'BYPASSED' AND template_store_ref.destroyed = 0 AND
template_store_ref.store_id IN )

Could someone help me fix this issue?

The quick installation guide I followed says it is for 4.15.2.0
installation. However, in the System Template Setup section, this command:
"""
/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt
-m /export/secondary -u
https://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.1-kvm.qcow2.bz2
-h kvm -F
"""
seems to suggest that the process will download template vms for the
4.15.1.0 version?

Could this be the reason? Does anyone have an idea about when the Template
for the 4.15.2.0 version will be available?

Best regards,
Douglas