Sunday, June 16, 2013

Either the Server Controller is running on the Host or is not listening on the port 2050


Lotus Domino: Change NIC Sequence Windows 2008 Server to be able to run server controller


First Solutions:






port 2050
If you do have multiple network interfaces (e.g. one for user, one for cluster, one for backup etc.) in a server with Windows 2008 you need to make sure that your main network interface is the first one in the sequence. Otherwise you might not be to connect to the Domino server controller. You will get the message “Either the Server Controller is not running on host <server name> or is not listening on port 2050″ although the server and controller are running
To change the sequence of the network cards do the following:
  • Click on “Network and Internet” -> “View Network Status and Tasks (Network sharing Center)” -> Change Adapter Settings
  • Press “Alt-N”
  • Click on “Advanced” -> “Advanced Settings” -> “Connections: Change NIC Sequence”
  • Now put your the main network interface card on top of the list and save the configuration.
port 2050 server controller



2nd Solutions



In one case, the issue was resolved by following the below steps:
1) Add the port 2050 in the windows firewall.
(From the windows, run type "firewall" and enter Windows Firewall with Advanced Security ->Inbound Rules)

2) Add the entry for the IP address which is mapped to server name in the local host file (e.g 10.10.10.5 INMAIL01/Acme).

3) Enable the below notes.ini parameter in the Domino server's notes.ini.

ServerController=1
TCPIP_ControllerTcpIpAddress=10.10.10.5:2050

Note: 10.10.20.5 is the IP address of the Domino server.

4) With the above settings done, restart the Operating System (OS).

You will see "Lotus Domino Server" service will be launched successfully when the OS is up and also administrator will be able to connect to Domino server using the Lotus Domino Console i.e Java Controller for Domino.



Friday, June 14, 2013

Setting up a IBM® Lotus® Domino® server as an SMTP server

SMTP Server

Setting up a IBM® Lotus® Domino® server as an SMTP server consists of enabling two separate tasks: a listener task and a routing task. Enabling the SMTP Listener allows a server to receive mail over SMTP. Enabling SMTP routing lets the Domino Router send mail to other servers using SMTP. You enable SMTP routing to destinations within the local Internet domain separately from SMTP routing to external destinations. It's also possible to enable SMTP routing on a server without enabling the Listener task, and vice-versa.
For example, to support POP3 and IMAP clients, which use SMTP to send mail, you must have at least one internal server running the SMTP Listener task. However, the server does not have to use SMTP when transferring messages it receives over SMTP to the next hop on the routing path. After the server has accepted a message over SMTP, it can use IBM® Lotus® Notes® routing to transfer the message to other servers.
By default, Domino uses Notes routing only and is not configured for SMTP routing. To have Domino use SMTP to send and receive mail, do the following:
Prepare your system for sending messages to the Internet by testing your Internet connection and verifying that DNS is set up properly.
Enable the SMTP Listener task in the Server document of each server you want to receive mail over SMTP
Enable SMTP routing within the local Internet domain so that servers can send mail over SMTP within the local Internet domain.
Enable SMTP to be used to send messages outside the local Internet domain.
Specify the relay host, if any, to be used when sending mail outside the local Internet domain. Configure a relay host for SMTP servers that do not have direct access to the Internet.
Set up inbound and outbound mail restrictions to protect against misuse of the mail infrastructure.
To allow POP3 or IMAP users who connect to Domino from an external network to send mail to external Internet domains, specify exceptions to inbound relay enforcement for authenticated users.
If you intend to allow users to access mail from POP3 or IMAP mail clients, you must install and enable these access protocols on users' mail servers. By default, Domino supports only Notes client access


Configuring Domino to send mail to a relay host or firewall  


A relay host can be a server within your organization or an Internet Service Provider (ISP) that routes messages addressed to destinations outside the local Internet domain. Often the same server acts as a firewall through which your organization funnels all messages outbound to the Internet. It can be a IBM® Lotus® Domino® server or another type of server -- for example, a UNIX® sendmail server.
To configure internal SMTP servers to send mail to a relay host, you specify the IP address or host name of the relay host in the Configuration Settings document. If connections from the internal mail server to an ISP mail server pass through a firewall, specify the internal interface of the of the firewall in this field, and configure the firewall to forward traffic received on port 25 to the ISP mail server.
Servers that do not route mail over SMTP require special configuration to transfer messages to a relay host or firewall.
Configuring multiple relay hosts
To enable greater control over outbound message routing, you can configure multiple relay hosts. Using multiple relay hosts enables Domino to route mail addressed to certain Internet domains to certain relay hosts, without first performing a DNS lookup. For example, you can split external SMTP mail routing so that Domino routes all outbound Internet mail along one path, except mail addressed to a specific domain, such as *.acmepartner.com, which it sends through a specific SMTP server.
To configure multiple relay hosts, create a Foreign SMTP Domain document for each set of destinations, and then create SMTP connection documents to match these foreign SMTP domain documents. For example, using the previous example, you would create one Foreign SMTP Domain document for *.* and another for *acmepartner.com.
Foreign SMTP Domain documents are used by servers that route mail over SMTP as well as those using NRPC. For servers that use SMTP routing, Foreign SMTP Domain document indicate the destinations that need relay hosts and the relay hosts to use in each case.
To set up a relay host
  1. Make sure you already have a Configuration Settings document for the server(s) to be configured.
  2. From the Domino Administrator, click the Configuration tab and then expand the Messaging section.
  3. Choose Configurations.
  4. Select the Configuration Settings document and then click Edit Configuration.
  5. Click the Router/SMTP - Basics tab.
  6. Complete this field, and then click Save & Close:
Field Enter
Relay host for messages leaving the local Internet domain The host name, domain name, or IP address of the server being used as a relay host.
A domain name is a valid entry only if the internal DNS contains an MX record for that domain and can resolve it to a host name.
When entering an IP address, enclose it within square brackets; for example, [127.0.0.1].
  7. The change takes effect after the next Router configuration update. To put the new setting into effect immediately, reload the routing configuration.
  8. After you set up a relay host, you can set up restrictions based on where the message originated or the message destination.

Saturday, June 8, 2013

Server Error: You are not authorized to use the server at lotus domino

Server Error: You are not authorized to use the server.

While setting up an additional server in a Domain, the following error occurs when you click the Finish button at the end of the server Setup configuration as the additional server is attempting to pull the Domino Directory from the Primary server:

Server Error: You are not authorized to use the server.



You are not authorized to use the server


Solutions:

In at least one case, the "Access Server" field on the Security tab of the Server document of the primary server had the "Users listed in all trusted directories" field checked. This option will allow all users who have Person documents in either in the Primary Domino directory or any secondary Domino directories to access the primary server. This will prevent access to the newly-registered server.
Disabling this option for the duration of the new server configuration allowed the setup to complete without error. Once the new server setup is complete you can restore this option.
Removing the check from "Users listed in all trusted directories" is required and the value in "and" field is required to be cleared.
In anothor case, the user had the "Check password on notes ID's" field set to Yes. Setting this field to No allowed the server setup to complete.


Friday, June 7, 2013

Setting up DOLS on a Lotus Domino Server


Setting up DOLS on a server 

IBM® Lotus® Domino™ Off-Line Services (DOLS) must be configured on the Domino server for users to be able to take applications off-line and use only a browser to work with them. You can enable any application for DOLS. The following templates are enabled for DOLS by default:
  • IBM® Lotus® Domino™ Web Access (MAIL8.NTF, DWA7.NTF, and iNOTES6.NTF)
  • Discussion - IBM® Lotus® Notes® and Web (R7) database (DISCSW7.NTF)

To configure DOLS during Domino Server Setup
1. Under "Setup Internet services for," select "Web Browsers (HTTP services)," and then click Customize.
2. In the "Domino tasks" list, select "DOLS Domino Off-Line Services."
3. At the end of setup, when you have the option to create an access control list entry, add the group LocalDomainAdmins to all databases and templates.
4. Accept the default option "Prohibit Anonymous access to all databases and templates." If you deselect this option, you must open the ACL for each DOLS application and assign No Access to Anonymous.
5. Make sure the following names are identical:
      • The TCP/IP DNS host name -- In Microsoft® Windows®, choose Start - Programs - Windows Explorer. Then choose Network Neighborhood properties - TCP/IP properties. On the DNS Configuration tab, look at the Host field.
      • The server name -- Open the Server document and look at the Server name field.
      • The Internet host name -- Open the Server document and look at the "Fully qualified Internet host name" field.
Note DOLS runs on Domino servers configured to work through a Microsoft IIS server.
To configure DOLS manually
If you do not configure DOLS during Domino Server Setup, you can configure DOLS manually by editing the Server document.
1. Open the Server document.
2. Click Internet Protocols - HTTP.
3. In the "DSAPI filter file names" field, enter the DSAPI filter file name that corresponds to the operating system that the server is running, and then restart the server:
      • Microsoft Windows - ndolextn
      • Linux® - libdolextn
      • IBM® AIX® - libdolextn
      • Solaris/Sparc - libdolextn
      • S390® - libdolextn
      • iSeries® - libdolextn
    Note On the iSeries platform, the Server document is updated when a new server is configured or an existing server is modified using the CFGDOMSVR or CHGDOMSVR CL command with DOLS(*YES) specified.

4. Create a DOLADMIN.NSF database from the template DOLADMIN.NTF.
5. After the database is created, restart the Domino administrator and click the Configuration tab. The name of the DOLADMIN.NSF is an option in the Navigation pane.
To set up DOLS on clustered servers
Before using DOLS on a clustered Domino server, make sure that:
      • The Domino server is either a Domino Utility Server or Domino Enterprise Server.
      • All servers in the cluster run the same release of Domino with DOLS
      • Clustered server management is running to handle both failover of replication and HTTP
      • Internet Cluster Manager is running
      • Subscription directories must have the same name on every clustered server. For example, if a subscription is under \data\Webmail user\7CD5957CB669AE2285256BDF00567AD8\, this name cannot be different on a different server in the cluster.
To configure DOLS on a server that uses Web Site documents
If you create a Web Site Document (a type of Internet Site document) on the Domino server, you must add the appropriate DOLS DSAPI filter filename to the DSAPI field in the Web Site document for DOLS to be enabled. If there are several Web Site documents, you must add the DSAPI filter filename to each one. To add the DOLS DSAPI filter filename to a Web Site document:
1. Open the Web Site document.
2. Click the Configuration tab.
3. In the "DSAPI filter" field, enter the DSAPI filter file name that corresponds to the operating system that the server is running, and then restart the server:
      • Win32 - ndolextn
      • Linux - libdolextn
      • IBM® AIX® - libdolextn
      • Solaris/Sparc - libdolextn
      • S390 - libdolextn
      • iSeries - libdolextn
For more information on Internet Site documents, see the topic "Configuring Internet sites with Web Site and Internet Site documents."
See also

Sunday, June 2, 2013

Connecting to .NET web service from Android

Connecting to .NET web service from Android

If you are having trouble using .NET Web Services with the Android Platform, you have probably reached to the solution here.

I am here demonstrating the steps using which you can consume data from the .NET web service in your android app. In order to use .Net web Service from your android application you need to first download the ksoap2 android API. Follow the link to download ksoap2 API for android.

After downloading the API, extract the zip file to the file system. Open your Android Project and navigate to the Project Properties. In the project properties go to Java Build Path and say Add External JARs.

Add the reference to the extracted ksoap2-j2se-full-2.1.2.jar file from the downloaded API. You are now ready to use ksoap2 to connect to the .NET web service via Android.

Let’s assume a .NET web service with two methods “Hello World” that returns a string and “Add” that accepts two numbers and returns their sum. Following is the WSDL file of the web service.

From the above WSDL file we get the following Information about the web service:
  • NameSpace: http://localhost/TestWebService/
  • Web Service URl: http://TestServer/Test/Service.asmx
  • Method “Hello World” SoapAction URL: http://localhost/TestWebService/HelloWorld
  • Method “Hello World” Output Type: String
  • Method “Add” SoapAction URL: http://localhost/TestWebService/Add
  • Method Hello World Input Type: Int, Int
  • Method Hello World Output Type: Int
In order to use this Web Service with our android app:
  1. Open the java file from where you would like to access the Web Service
  2. Include the class library for ksoap2

    import org.ksoap2.*;
    import org.ksoap2.serialization.*;
    import org.ksoap2.transport.*;
    import org.w3c.dom.Text;

  3. Define Web Service Properties in the class

    private static final String NAMESPACE = "http://localhost/TestWebService/";
    private static final String URL = " http://TestServer/Test/service.asmx";
    private static finaString HelloWorld_SOAP_ACTION ="http://localhost/TestWebService/HelloWorld";
    private static final String METHOD_NAME1 = "HelloWorld";
    private static final String Add_SOAP_ACTION ="http://localhost/TestWebService/Add";
    private static final String METHOD_NAME2 = "Add";

  4. Add methods to call the web service methods and retrieve the results

    public void GetHelloWorld() {

    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME1);
    SoapSerializationEnvelope envelope =
    new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.dotNet = true;
    envelope.setOutputSoapObject(request);
    HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

    try
    {
    androidHttpTransport.call(HelloWorld_SOAP_ACTION, envelope);
    java.lang.String receivedString = (String)envelope.getResponse();

    }
    catch(Exception e)
    {
    }

    }
    public void GetAdd() {

    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME2);

    PropertyInfo num1 = new PropertyInfo();
    num1.setName("a");
    num1.setValue(5);
    request.addProperty(num1);

    PropertyInfo num2 = new PropertyInfo();
    num2.setName("b");
    num2.setValue(9);
    request.addProperty(num2);

    SoapSerializationEnvelope envelope =
    new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.dotNet = true;
    envelope.setOutputSoapObject(request);
    HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

    try
    {
    androidHttpTransport.call(Add_SOAP_ACTION, envelope);
    java.lang.Integer receivedInt = (Integer)envelope.getResponse();

    }
    catch(Exception e)
    {
    }

    }

  5. If you app require access to an array, you can use the following code:

    ArrayList<String> a = new ArrayList<String>();
    try
    {
    androidHttpTransport.call(SOAP_ACTION, envelope);
    java.util.Vector<Object> receivedStrings = (java.util.Vector<Object>)envelope.getResponse();
    if(receivedStrings != null)
    {
    for(Object curStrings : receivedStrings)
    {
    a.add(curStrings.toString());
    }
    }
    }
    catch(Exception e)
    {
    }
I hope the above steps helps you if this is what you are looking for.

Reference by : http://composedcrap.blogspot.com/2009/08/connecting-to-net-web-service-from.html

Wednesday, May 29, 2013

Lotus domino user information export to excel


Lotus domino user  information export to excel


You can export domino users using following steps:
1. Create Agent
2. Run Agent

Create Agent:

Using two way you can create agent:
1. On Live server , open domino admin -> go to peoples->click Create->Agent->Put name(All User export) -Select type: Java- OK

-Open java file and paste the below code and Save it

2. If you don't want to do on live server, then copy the names.nsf file to your test server desktop and open it
             -open domino admin -> go to peoples->click Create->Agent->Put name(All User export) -Select type: Java-OK

-Open java file and paste  the below code and save it

Close the domino designer

--------------------------------------------------------------------------------------------


import lotus.domino.*;

import java.io.*;
import java.util.Iterator;
import java.util.Vector;
import java.lang.Enum;


public class JavaAgent extends AgentBase {

//no enums in the default java version supported by Domino :(
private class SMTPLocalPartTypeEnum {

static final int SHORTNAME = 2;
static final int FULLNAME = 0;
static final int COMMONNAME = 1;
}

private class AddressBuilder {
private Document _gddDoc;
private String _domainSepChar;
private int _smtpLocalPartType;
private boolean _isValidGDD;



AddressBuilder(Document gddDoc) throws Exception{
_gddDoc = gddDoc;
_domainSepChar = gddDoc.getItemValueString("SMTPNotesDomainSepChar");
_smtpLocalPartType = gddDoc.getItemValueInteger("SMTPLocalPart");

_isValidGDD = true;

if (gddDoc.getItemValueInteger("SMTPNotesDomainIncluded") != 0) {
System.out.println("domain(s) included is not set to none");
_isValidGDD = false;
}

if (gddDoc.getItemValueInteger("SMTPNotesDomainPos") == 1) {
System.out.println("Domains pos is not at left of the @ char");
_isValidGDD = false;
}

}


String buildInternetAddress(String mailDomain, Name name, String shortName) throws Exception {
if (!_isValidGDD)
return "";

String leftPart = "";

switch (_smtpLocalPartType)
{
case SMTPLocalPartTypeEnum.SHORTNAME:
leftPart = shortName;
break;
case SMTPLocalPartTypeEnum.COMMONNAME:
leftPart = name.getCommon().replace(' ', '_');
break;
case SMTPLocalPartTypeEnum.FULLNAME:
leftPart = name.getAbbreviated().replace(' ', '_');
break;

}

String ret = leftPart +_domainSepChar + mailDomain + "@" +
_gddDoc.getItemValueString("LocalPrimaryInternetDomain").toString();

return ret;

}

}

private class AddressBuilderProvider {


AddressBuilder _addressBuilder = null;
boolean _noGDD = false;
JavaAgent _agent;

AddressBuilderProvider(JavaAgent agent) {
_agent = agent;
}

AddressBuilder GetBuilder(String mailDomain) throws Exception
{
//for now ignore mailDomain and return default GDD or the single GDD found
if (_noGDD)
return null;

//based on further testing we may need to load different GDDs into a dictionary based on maildomain
//for now just use default gdd in case there are more than one or gdd found.
if (_addressBuilder != null)
return _addressBuilder;

View domains = _agent.getSession().getCurrentDatabase().getView("$Domains");


Document doc = domains.getFirstDocument();

if (doc == null)
System.out.println("first doc in dominas is null");


Document gdd = null;
while (doc != null)
{
System.out.println(doc.getItemValueString("DomainType").toString());
if (doc.getItemValueString("DomainType").toString().trim().compareTo("GlobalDomain") == 0)
{

gdd = doc;
if (doc.getItemValueInteger("DefaultGlobalDomain") == 1)
break;
}
doc = domains.getNextDocument(doc);
}

if (gdd == null)
{
System.out.println("gdd not found");
_noGDD = true;
return null;
}

_addressBuilder = new AddressBuilder(gdd);

return _addressBuilder;


}


}

private AddressBuilderProvider _addressBuilderProvider;

    public void NotesMain() {

    FileWriter fw = null;
      try {
   
     System.out.println("Starting...");
          Session session = getSession();
          AgentContext agentContext = session.getAgentContext();
          Database db = session.getCurrentDatabase();
          _addressBuilderProvider = new AddressBuilderProvider(this);
       
          View view = db.getView("$VIMPeople");
          view.setAutoUpdate(false);
          Document doc = view.getFirstDocument();
       
          File file = new File("AllUserexport.txt");
          if (file.exists())
         file.delete();
          file.createNewFile();
          fw = new FileWriter(file);
       
          String lineSeparator = (String) java.security.AccessController.doPrivileged(
                  new sun.security.action.GetPropertyAction("line.separator"));
       
          fw.append(lineSeparator);    
          fw.append(lineSeparator);
          fw.append(lineSeparator);
       
       
          while (doc != null)
          {
       
         Item fullName = doc.getFirstItem("FullName");        
         String dn = fullName.getValues().get(0).toString();
         System.out.println(dn);
         String shortName = doc.getItemValueString("ShortName").toLowerCase();
         Name name = session.createName(dn);
         fw.append("dn: ");
         fw.append(dn);
         fw.append(lineSeparator);
       
         Item givenName = doc.getFirstItem("FirstName");
         //if (givenName.getText().length() > 0)
         //{
         fw.append("FirstName: ");
         fw.append(givenName.getText());
         fw.append(lineSeparator);
         //}
       
        //  'MiddleInitial
       
         Item MiddleInitial = doc.getFirstItem("MiddleInitial");
             fw.append("MiddleInitial: ");
             fw.append(MiddleInitial.getText());
             fw.append(lineSeparator);
           
           
           
        Item lastName = doc.getFirstItem("LastName");
         fw.append("LastName: ");
         fw.append(lastName.getText());
         fw.append(lineSeparator);
       
        Item mailFile = doc.getFirstItem("MailFile");
           fw.append("MailFile: ");
           fw.append(mailFile.getText());
           fw.append(lineSeparator);
       
       
         Item mail = doc.getFirstItem("InternetAddress");
         System.out.println("mail:" + mail.getText() + " length:" + mail.getText().length());
         String internetAddress = mail.getText().trim() == null  || mail.getText().length() == 0 ? buildAutoGenInternetAddress(doc, name, shortName) : mail.getText();
         fw.append("mail: ");
         fw.append(internetAddress);
         fw.append(lineSeparator);
       
         Item mailDomain = doc.getFirstItem("MailDomain");
         String mailDomainStr = mailDomain.getText() == null ? "" : mailDomain.getText();
         fw.append("maildomain: ");
         fw.append(mailDomainStr);
         fw.append(lineSeparator);
       
         String userNames = getUserNamesLeftPartOnly(fullName) ;
      //    userNames = internetAddress == null || internetAddress.isEmpty() ? userNames :
          //userNames + ";" + getEmailAddrLeftPart(internetAddress);
         fw.append("usernames: ");
         fw.append(userNames);
         fw.append(lineSeparator);
       
       
         fw.append(lineSeparator);
       
         doc = view.getNextDocument(doc);
          }
       
          fw.append(lineSeparator);
       
       
          // (Your code goes here)

      } catch(Exception e) {
          e.printStackTrace();
          System.out.println(e.getMessage());
       }
      finally {
     if (fw != null)
try {
fw.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
      }
   }
 
    String getUserNamesLeftPartOnly(Item fullName) throws Exception {
    Vector userNames = fullName.getValues();
    StringBuilder sb = new StringBuilder();
    Iterator it = userNames.iterator();
    while (it.hasNext()) {
    String userName = (String)it.next();
    if (userName.indexOf("@")>0)
    sb.append(getEmailAddrLeftPart(userName));
    else
    sb.append(userName.toLowerCase());
    sb.append(";");
    }
    return sb.toString();
    }


    String getEmailAddrLeftPart(String emailAddress) throws Exception {
//int atPos = 0;
//atPos = emailAddress.indexOf("@");
//return emailAddress.substring(0,atPos).toLowerCase();
Name name = getSession().createName(emailAddress);
return name.getAddr822LocalPart().toLowerCase();

    }
 
    String buildAutoGenInternetAddress(Document personDoc, Name name, String shortName) throws Exception
    {
    System.out.println(" in buildAutoGenInternetAddress");
    String mailDomain = personDoc.getItemValueString("MailDomain").toString();
    if (mailDomain == "")
    return "";
   
    AddressBuilder addressBuilder = _addressBuilderProvider.GetBuilder(mailDomain);
    if (addressBuilder == null)
    return "";
   
   
    return addressBuilder.buildInternetAddress(mailDomain, name, shortName);
    }




}


Close the domino designer
------------------------------------------------------------------------------------------------

Export User information

  1.  Open Admin->Click Action->Click on All User export
  2. You will fine the AllUserexport.txt file in Lotus folder at admin client path


Reference: https://archive.atlassian.net/wiki/display/adminhelp/Domino+User+Export+Instructions


Monday, May 27, 2013

Fresh Mango from Rajshahi ,Bangladesh


Fresh Mango from  Rajshahi Bangladesh

We are 100 % fresh mango from Our Mango garden (Rajshahi). Our Mangoes
1.       Langra
2.       Karshapat
3.       GopalBog
4.       Lokna
5.       Fozli
Minimum order quantity is 20 KG. You will pay currier service charges. For any query please mail : info@makeslifestyle.com