ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raymond Wilson <raymond_wil...@trimble.com>
Subject RE: Oddity running multiple server nodes locally
Date Thu, 07 Sep 2017 01:24:34 GMT
Correction to the information below.

The activator app does not stall on starting a local Ignite instance, it
stalls when calling Ignite.Start()

Apologies for the confusion, not sure how that happened!

-----Original Message-----
From: Raymond Wilson [mailto:raymond_wilson@trimble.com]
Sent: Thursday, September 7, 2017 11:47 AM
To: 'user@ignite.apache.org' <user@ignite.apache.org>
Subject: RE: Oddity running multiple server nodes locally

Ah - I think I see a gap in the logging configuration, and need to add the
following to the Ignite config:

Given:

        private static readonly ILog Log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

then:
          Logger = new IgniteLog4NetLogger(Log)

-----Original Message-----
From: Raymond Wilson [mailto:raymond_wilson@trimble.com]
Sent: Thursday, September 7, 2017 11:29 AM
To: 'user@ignite.apache.org' <user@ignite.apache.org>
Subject: RE: Oddity running multiple server nodes locally

Hi Val,

I'm not getting any obvious logging. I'm using Log4Net to configure
logging, and I am getting Ignite logging during some operations, but
perhaps I need to modify the logging configuration to pick up additional
information. I have both the Log4Net and Apache.Ignite.Log4Net nugget
packages installed.

Logging is configured like this:

    <appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender">
      <file type="log4net.Util.PatternString"
value="C:/Logs/%property{LogName}" />
      <appendToFile value="true" />
      <rollingStyle value="Size" />
      <maxSizeRollBackups value="10" />
      <maximumFileSize value="1000MB" />
      <staticLogFileName value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%-5p %d %5rms %-40.40c{1} %-18.18M -
%m%n" />
      </layout>
    </appender>

And in the program code itself logging is initialized lie this:

            string logFileName =
System.Diagnostics.Process.GetCurrentProcess().ProcessName + ".log";
            log4net.GlobalContext.Properties["LogName"] = logFileName;
            log4net.Config.XmlConfigurator.Configure();

I haven't done a (Java?) thread dump before, please let me know how I
should do this to get the information you need.

I do activation like this (a little simplified):

                    NodeID = Guid.NewGuid().ToString();

                    Log.InfoFormat("Creating new Ignite node with Role =
{0} & NodeID = {1}", role, NodeID);

                    IgniteConfiguration cfg = new IgniteConfiguration()
                    {
                        GridName = 'Grid',
                        IgniteInstanceName = 'Grid'
                        ClientMode = true,

                        JvmInitialMemoryMb = 512, // Set to minimum
advised memory for Ignite grid JVM of 512Mb
                        JvmMaxMemoryMb = 4 * 1024, // Set max to 4Gb

                        UserAttributes = new Dictionary<string, object>()
                        {
                            { "Role", role },
                            { "NodeID", NodeID }
                        },

                        DiscoverySpi = new TcpDiscoverySpi()
                        {
                            LocalAddress = "127.0.0.1",
                            LocalPort = 47500
                        }
                    };

                    try
                    {
                        IIgnite Grid = Ignition.Start(cfg);    <--
Activator hangs here
                    }
                    catch (Exception e)
                    {
                        Log.InfoFormat("Creation of new Ignite node with
Role = {0} & NodeID = {1} failed with exception {2}", role, NodeID, e);
                    }
                    finally
                    {
                        Log.InfoFormat("Completed creation of new Ignite
node with Role = {0} & NodeID = {1}", role, NodeID);
                    }

All the server nodes are created using the same grid name and instance
name.

Thanks,
Raymond.

-----Original Message-----
From: vkulichenko [mailto:valentin.kulichenko@gmail.com]
Sent: Thursday, September 7, 2017 11:15 AM
To: user@ignite.apache.org
Subject: Re: Oddity running multiple server nodes locally

Raymond,

Can you attach logs and thread dumps? Also can you show how you do the
activation?

-Val



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Mime
View raw message