You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Piers <pi...@rowan.id.au> on 2014/09/11 15:02:27 UTC

Re: UI HTTP Status 404 / Tomcat - Address already in use [UNFIXED]

On 11/09/14 19:11, Rohit Yadav wrote:
> Are you trying to setup a host where you want to run CloudStack and also use this host as a KVM host?
> If this is the case, then yes you can install cloudstack-agent and cloudstack-management on the same server.

Yes I am and this is understood. Thanks

> When you deploy cloudstack database give it a -i <IP address of this machine that is accessible from outside/browser>. Stop tomcat, make sure it’s not running along with CloudStack management server (which explains address/port in use issue).

I am not seeing anything in the logs that suggest the database server 
cannot be found (except for secondary storage this is a single machine 
set up).

I would appreciate a brief explanation as to why wiping and reinstalling 
does not lead to......well....a functioning web UI. Every time I 
reinstall the management server IP selected is 165.254.0.1 (which is 
      cloud0) - my previous fix is to edit 
/etc/cloudstack/management/db.properties to change it to the public IP. 
But that does not work now.

Do I have to manually wipe the bridges, reboot and start again?

I am keen to learn a solution and get comfortable with Cloudstack.

Any help appreciated

Cheers


Piers





Re: UI HTTP Status 404 / Tomcat - Address already in use [UNFIXED]

Posted by Kirk Kosinski <ki...@gmail.com>.
The IP that agents connect to is configured in CloudStack itself,
specifically the "host" parameter in Global Settings.  Try setting that
to the IP that the management server is listening on 8250/tcp, and
restart CloudStack.

Best regards,
Kirk

On 09/11/2014 06:31 PM, Piers wrote:
> On 12/09/14 11:13, Rohit Yadav wrote:
>>
>> To start again, you don’t have to remove the package or conf again and
>> again. Just shutdown all java services (management and agent, tomcat
>> etc.) and deploy the database, and finally start the management server.
> 
> Good to know - thank you
> 
>>> # configure with IP thanks to Rohit
>>> cloudstack-setup-databases cloud:xxxx@localhost
>>> --deploy-as=root:xxxxxx -i 192.168.5.1
>> After you setup databases, just run cloudstack-agent (if KVM) and
>> start the cloudstack-management. And you should be good. Make sure
>> you’ve openjdk 1.7 installed and if you run “java -version” it should
>> say 1.7 version etc. Else google on how to install/setup openjdk 1.7
>> as your default java version/tool.
>>
> 
> java version "1.7.0_65"
> OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17)
> OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
> 
> 
> 
>> Look in the logs for possible errors
>> /var/log/cloudstack/management/management-server.log
>>
>> Looks like you’re playing with KVM, you may try to set up CloudStack
>> cloud all in one box: http://bhaisaab.org/logs/cloudstack-kvm/
>>
>>
> 
> Getting closer:
> 
> [root@ade1]# tail /var/log/cloudstack/agent/agent.log
> 
> WARN  [utils.nio.NioConnection] (Agent-Selector:null) Unable to connect
> to remote: is there a server running on port 8250
> 
> 
> 
> 
> [root@ade1]# /etc/init.d/cloudstack-management start
> Starting cloudstack-management:                            [  OK  ]
> [root@ade1]# netstat -nap | grep 8250
> [root@ade1]#
> 
> I noticed that the IP the agent was looking on was different to the one
> in db.properties
> 
> I am going to wipe the database again and watch the a agent log as well
> as management to see where it is going wrong.
> 
> Thanks
> 
> Piers
> 


Re: UI HTTP Status 404 / Tomcat - Address already in use [UNFIXED]

Posted by Piers <pi...@rowan.id.au>.
On 12/09/14 11:13, Rohit Yadav wrote:
>
> To start again, you don’t have to remove the package or conf again and again. Just shutdown all java services (management and agent, tomcat etc.) and deploy the database, and finally start the management server.

Good to know - thank you

>> # configure with IP thanks to Rohit
>> cloudstack-setup-databases cloud:xxxx@localhost --deploy-as=root:xxxxxx -i 192.168.5.1
> After you setup databases, just run cloudstack-agent (if KVM) and start the cloudstack-management. And you should be good. Make sure you’ve openjdk 1.7 installed and if you run “java -version” it should say 1.7 version etc. Else google on how to install/setup openjdk 1.7 as your default java version/tool.
>

java version "1.7.0_65"
OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)



> Look in the logs for possible errors /var/log/cloudstack/management/management-server.log
>
> Looks like you’re playing with KVM, you may try to set up CloudStack cloud all in one box: http://bhaisaab.org/logs/cloudstack-kvm/
>
>

Getting closer:

[root@ade1]# tail /var/log/cloudstack/agent/agent.log

WARN  [utils.nio.NioConnection] (Agent-Selector:null) Unable to connect 
to remote: is there a server running on port 8250




[root@ade1]# /etc/init.d/cloudstack-management start
Starting cloudstack-management:                            [  OK  ]
[root@ade1]# netstat -nap | grep 8250
[root@ade1]#

I noticed that the IP the agent was looking on was different to the one 
in db.properties

I am going to wipe the database again and watch the a agent log as well 
as management to see where it is going wrong.

Thanks

Piers


Re: UI HTTP Status 404 / Tomcat - Address already in use [UNFIXED]

Posted by Rohit Yadav <ro...@shapeblue.com>.
Hi Piers,

On 12-Sep-2014, at 12:42 am, Piers <pi...@rowan.id.au> wrote:
> # purge cloudstack from the system and remove all traces of installation
> yum -y remove cloudstack-* tomcat*
> rm -fR /usr/share/cloudstack-*
> rm -fR /etc/cloudstack/
> # install management & usage
> yum -y install cloudstack-management cloudstack-usage

To start again, you don’t have to remove the package or conf again and again. Just shutdown all java services (management and agent, tomcat etc.) and deploy the database, and finally start the management server.

> # configure with IP thanks to Rohit
> cloudstack-setup-databases cloud:xxxx@localhost --deploy-as=root:xxxxxx -i 192.168.5.1

After you setup databases, just run cloudstack-agent (if KVM) and start the cloudstack-management. And you should be good. Make sure you’ve openjdk 1.7 installed and if you run “java -version” it should say 1.7 version etc. Else google on how to install/setup openjdk 1.7 as your default java version/tool.

> I can't get my head around why a purging followed by a clean install will not eventuate in a web UI and not a 404
>
> Any help appreciated.

Look in the logs for possible errors /var/log/cloudstack/management/management-server.log

Looks like you’re playing with KVM, you may try to set up CloudStack cloud all in one box: http://bhaisaab.org/logs/cloudstack-kvm/

Hope this helps.

Regards,
Rohit Yadav
Software Architect, ShapeBlue
M. +41 779015219 | rohit.yadav@shapeblue.com
Blog: bhaisaab.org | Twitter: @_bhaisaab



Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of South Africa and is traded under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Re: UI HTTP Status 404 / Tomcat - Address already in use [FIXED] {reboot}

Posted by Piers <pi...@rowan.id.au>.
I rebooted the machine and the UI came up.

Somewhere along the line repeatedly installing software leaves some 
remnants that we purged by a reboot.

Thanks

Piers

Re: UI HTTP Status 404 / Tomcat - Address already in use [UNFIXED]

Posted by Piers <pi...@rowan.id.au>.
On 11/09/14 23:17, Rohit Yadav wrote:
>
> After you install CloudStack and run cloudstack-setup-databases this tool will pick IP from the first valid nic it finds (cloud0 being the first one alphabetically, do a ifconfig to list nics and ips).
>
> To override, give a -i <ipt to this tool>, example:
>
> cloudstack-setup-database -i <IP you> <other params from docs>
>
>

Thanks for your help Rohit,

I have been running these commands from a batch file and still I get 
404. (I put them into a batch file because I ran into other problems *)

# Stop everything so 8080 is not used
/etc/init.d/cloudstack-management stop
/etc/init.d/cloudstack-agent stop
/etc/init.d/tomcat6 stop
# get rid of the databases
mysqladmin -uroot -ppwd drop cloud
mysqladmin -uroot -ppwd drop cloudbridge
mysqladmin -uroot -ppwd drop cloud_usage
# purge cloudstack from the system and remove all traces of installation
yum -y remove cloudstack-* tomcat*
rm -fR /usr/share/cloudstack-*
rm -fR /etc/cloudstack/
# install management & usage
yum -y install cloudstack-management cloudstack-usage
# configure with IP thanks to Rohit
cloudstack-setup-databases cloud:xxxx@localhost --deploy-as=root:xxxxxx 
-i 192.168.5.1
cloudstack-setup-management

I can't get my head around why a purging followed by a clean install 
will not eventuate in a web UI and not a 404

Any help appreciated.

Cheers

Piers


* As per my other list posts:

- Getting the networking suiting my set up from the guided install was 
working not desired

I have eth0-eth03 with the secondary storage server on 192.168.5.2 / 
eth2[IP 192.168.5.1] and a public IP on eth0. Ideally I would like to 
create instances on 192.168.5.0 (eth2) and allocate them Public IP's 
from the subnet on eth0

eth0 is bridged to cloudbr0

- Deleting the install via the GUI kept on complaining about things in 
use that I could not turn off

- Not being a production set up it is easier to wipe than 
break-it-until-its-fixed / fix-it-until-its-broken


Re: UI HTTP Status 404 / Tomcat - Address already in use [UNFIXED]

Posted by Rohit Yadav <ro...@shapeblue.com>.
On 11-Sep-2014, at 3:02 pm, Piers <pi...@rowan.id.au> wrote:
> I would appreciate a brief explanation as to why wiping and reinstalling does not lead to......well....a functioning web UI. Every time I reinstall the management server IP selected is 165.254.0.1 (which is      cloud0) - my previous fix is to edit /etc/cloudstack/management/db.properties to change it to the public IP. But that does not work now.
>
> Do I have to manually wipe the bridges, reboot and start again?
>
> I am keen to learn a solution and get comfortable with Cloudstack.

After you install CloudStack and run cloudstack-setup-databases this tool will pick IP from the first valid nic it finds (cloud0 being the first one alphabetically, do a ifconfig to list nics and ips).

To override, give a -i <ipt to this tool>, example:

cloudstack-setup-database -i <IP you> <other params from docs>

Hope this helps.

Regards,
Rohit Yadav
Software Architect, ShapeBlue
M. +41 779015219 | rohit.yadav@shapeblue.com
Blog: bhaisaab.org | Twitter: @_bhaisaab



Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of South Africa and is traded under license from Shape Blue Ltd. ShapeBlue is a registered trademark.