Fresh installation seems to be failing on Ubuntu 12.04

25 views
Skip to first unread message

bruce kissinger

unread,
Oct 2, 2014, 10:03:17 PM10/2/14
to cloudi-q...@googlegroups.com
I am trying to get Cloudi running on a machine running Ubuntu 12.04.  The cloudi installation seems to be successful but when I try to run the the example programs things don't seem to be working correctly.  There is probably a simple explanation and any advice would be greatly appreciated.

Some things that I've noticed are:

1) No log files appear to be generated.  I checked the cloudi.conf file in the source directory and the logging configuration appears to be wrong. It seems strange that the highlighted text below is commented out. 

{logging, [
    %{file, "path/to/logfile"},
    {level, trace}, % levels: off, fatal, error, warn, info, debug, trace
    %{syslog,
    % [{identity, "CloudI"},
    %  {facility, local0},
    %  {level, trace}]}, % CloudI log levels are mapped to syslog levels
    {formatters,
     [{any,
       [{formatter, cloudi_core_i_logger},
        {formatter_config,
         [{mode, legacy}]}]},
      {['STDOUT'],
       [{formatter, cloudi_core_i_logger},
        {formatter_config,
         [{mode, legacy_stdout}]}]},
      {['STDERR'],
       [{formatter, cloudi_core_i_logger},
        {formatter_config,
         [{mode, legacy_stderr}]}]}]},
    {redirect, undefined}
]}.

2) When I use the API nodes command, there are no nodes reported.  I would have that that at least one node would have been found.

curl http://localhost:6467/cloudi/api/erlang/nodes
[]

3) I followed the Quick Start documentation and created a new directory for some simple tests and then added the directory to the source path using the command:

curl -X POST -d '"'`pwd`'"' http://localhost:6467/cloudi/api/erlang/code_path_add

Then I created the hello_world.conf file and added it using the command:

curl -X POST -d @hello_world.conf http://localhost:6467/cloudi/api/erlang/services_add

Finally, I attempted to run it using the command:

curl http://localhost:6467/quickstart/hello/hello_world

Which seems to take about 30 seconds and then returns nothing.  The odd thing is that when I interrogate cloudi to see what services it knows about, I can see that the code path is correct, but the service is not listed.

curl http://localhost:6467/cloudi/api/erlang/code_path  -- correctly lists the directory that I created

curl http://localhost:6467/cloudi/api/erlang/services   -- this command returns a long list of the test programs, but the hello world service is not listed

Michael Truog

unread,
Oct 2, 2014, 10:27:56 PM10/2/14
to cloudi-q...@googlegroups.com
Hi Bruce,

The hello_world.conf could have an error in it or the HTTP request to http://localhost:6467/cloudi/api/erlang/services_add could have timed-out (cloudi_service_http_cowboy is set to timeout after 5000 milliseconds in the default cloudi.conf file).  The answer should be in your cloudi.log file.  The default location of the cloudi.log file is at /usr/local/var/log/cloudi/cloudi.log .  You should see an error that either mentions /cloudi/api/erlang/services_add or the hello_world service.  If it is a timeout, it may just be due to the machine being slightly slow as the tests are ran within the default configuration (the main CPU consumption occurs within the first 2 minutes when CloudI first starts-up).  When you develop with CloudI the default configuration tests are not necessary, so they just try to exercise everything to make sure the installation is ok.  If you search for "ERROR" within the cloudi.log, any entries you find are likely to be significant.

The nodes CloudI Service API call doesn't provide the local node as you may have expected, since it doesn't need to make a connection to itself.  If you startup two instances of CloudI with the default configuration they will locate each other and that will create an entry in the nodes list (that is due to the 'automatic' setting for nodes in the cloudi.conf file which makes it use the defaults for LAN multicast discovery).  If you are starting instances on the same machine, you will just need to make sure both installations are using different Erlang node names, so the -sname argument needs to be different in the separate vm.args files (i.e., with /usr/local/etc/cloudi/vm.args).

Tell me what you find in the cloudi.log file.  Otherwise, everything else seems ok.

Best Regards,
Michael
--
You received this message because you are subscribed to the Google Groups "CloudI Questions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudi-questio...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Truog

unread,
Oct 2, 2014, 10:33:12 PM10/2/14
to bruceki...@gmail.com, cloudi-q...@googlegroups.com
Actually, if you didn't receive anything back from the services_add CloudI Service API call, that would be a timeout.  If the hello_world.conf file was bad in a way that caused problems for configuration validation or the initialization of the service, you would have received an error.  So, if you retried the services_add it is likely to succeed now that your machine is more idle after the initial tests have finished executing, if you kept it running.  However, please check the cloudi.log file to confirm this.
Reply all
Reply to author
Forward
0 new messages