Upload file using a Rapidminer Server Web App

by RMStaff ‎12-05-2016 09:33 AM - edited ‎12-16-2016 08:56 AM

Question

How can I upload a file (e.g. an Excel file) from my computer and process the results directly in RapidMiner Server?

Answer

Here is what you need:

 

  • RapidMiner Server up and running
  • The Text processing extension (on Server and on Studio)
  • Being able to create a Webservice from a RapidMiner process. See article How to create a webservice for details.

 

The solution in short:

 

  1. Create an HTML form which includes an input tag with type="file" and display it as a Web App visualization component
  2. Send the file via HTTP-Post to a RapidMiner process which has been published as a web service
  3. Store / Process the file and provide a success message

 

The solution in detail:

 

 

Spoiler

Hint

Using the special user "anonymous" makes the functionality much more convenient. This way the user who uploads the file does not need to reauthenticate himself for the upload. Therefore "anonymous" needs to have at least permission to execute within the folder in which the described processes are stored. See article Create and Manage "Special Users"  for further information.
In this case you need to grant the user anonymous the execute permissions for the folder where the processes are stored. If you want to store data, the user also needs the permission to write.
In addition you need to adapt the action URL. You need to include the keyword "public" between "rest" and "process" (http://localhost/api/rest/public/process/<web service name>)

 

  1. Create a folder in which you want to store the processes (and uploaded data if you wish) on the server.
  2. Now create the process which receives the uploaded file and processes it. The attached example process "Read file from web app - webservice" receives either one or two excel file(s) and stores them in the repository. Then it sends a success message.
  3. This process needs to be exported as webservice as described in the article How to create a webservice. Make sure that you have set the Output format to "HTML" and the MIME Type to "text/html".
  4. Create the process displaying the HTML form and set the Webservice URL as the value for the form "action" (see attached example process).
  5. Create the Upload component as "New visualization" component in your RapidMiner Server Web App.
  6. Make sure that you have set the Output format to "HTML" and the MIME Type to "text/html".

 

 

What are constraints of this feature?

  • If you enable the upload of multiple files at once (by using the keyword "multiple" in the HTML tag for the the input type="file") and you want to store them as one exampleset you have to ensure that the structure of the uploaded files is the same.
  • You can only upload as many files at once as you have input ports connected.
  • The operator "Publish to App" does not work in webservices since it is executed in a different session.

 

 Edit (2016/12/15):

I just uploaded new process versions which already store each uploaded file with the original name as well as the full file.

The webservice now also makes use of the Handle Exception Operator which helps you to deal with problems.

Edit (2016/12/16):

I just uploaded a new process version for the HTML form. It includes a version of the HTML form with which you can rename the file(s) you upload. Only works for single file uploads.

 

Output of example process "Read file from web app - HTML form"

 


 If you have selected a file for upload - the name is displayed

 


 

 Success message (output of the example process "Read file from web app - webservice")

 


RapidMiner Server Memory Setup

by RMStaff on ‎12-14-2016 04:24 PM

Question

For the memory configuration shown in server system informantion, how to interpret these different 'memory' terminoloies?

Answer

This is a snapshot of system settings as an example:

Total Memory setting will show you the amount of memory Java has right now acquired from the operation system. This is done automatically by the JVM, whenever more memory is required it will automatically increase up to the number shown as "Maximum Memory".

 

Free Memory (always less than Total Memory), refer to the allowed acquired memory not curtly in use. Don’t get scared if it is small.

 

Maximum Memory refers to the maximum memory amount defined during installation. The image attached shows that it can use up to 502 GB.

Therefore your settings are totally correct and you don't need to do anything before submitting big jobs to the server.

 

To change maximum amount of memory for RapidMiner server, please follow

http://community.rapidminer.com/t5/RapidMiner-Server-Knowledge-Base/How-do-I-change-the-maximum-amou...

More server settings can be found here http://docs.rapidminer.com/server/administration/maintenance/server-settings.html

Securing Cron in RapidMiner Server

by Community Manager on ‎10-13-2016 06:46 AM

Our thanks to @BalazsBarany for posting this on his blog

 

http://datascientist.at/2016/10/absicherung-fuer-cron-in-rapidminer-server/#english

How to Stop Jobs

by RMStaff on ‎09-23-2016 05:48 AM

RapidMiner studio users have the ability to submit jobs to be executed on RapidMiner server if they have the right set of permissions.

However sometimes the user may want to stop a job that was just submitted. SImilar need may arise for jobs that were scheduled to run and for some reason need to be interrupted. This article covers these use cases

 

1) Stopping a job submitted from Studio

 Users who have submitted the job from the Studio client, can do so using the "server monitor" panel. Server Monitor panel is hidden by default, but can be enabled by going through the Following Menu in the studio client 

View >> Show Panels >>Server Monitor (You can then drag the panel and dock it anywhere you like).

One the panel you should be able to see a list of all of the server that the studio client is connected to. You should also be able to see the list of current running jobs.

Ensure that the correct value of the the Filter Drop down is selected.

 

 

servermonitorpanel.png

 

To stop a job simply right click on the job and click on Stop

 


2016-09-23 10_27_46-__localserver_Basic Demo_process_delay sample – RapidMiner Studio Large 7.2.002 .pngYou can also see the Logs for that process by simply clicking on the "Show Log option" Expanding the process further will also show you more granular information about which step the process is currently executing and what steps have been completed.

 

2) Cancelling the job from RapidMiner Server Interface. 

Sometimes the administrator may desire to cancel job. This can be easily done from the server web interface.

After log in into the RapidMiner server, navigate to 

2016-09-23 10_40_59-RapidMiner Server.png

You should then see a list of currently Running and completed process, Running process appear with the blue play (Triangle) icon and completed process appear with green check mark. Failed process appear with a red cross sign.

Running process will have an additional option to abort the process. It look like square stop sign below the running process details.

of 2016-09-23 10_38_15-Inbox - bpatil@rapidminer.com - Outlook.png

Please ensure that you do not change anything in "Currently Defined Triggers" unless intended. Those are your scheduled jobs. Updating them will update the schedule

 

 

 

 

 

 

 

 

 

 

Passing parameters to Rapidminer Webservices

by RMStaff on ‎06-15-2016 06:51 AM - edited on ‎09-21-2016 10:45 AM by Community Manager

 

 

 

Rapidminer provides excellent capabilities to operationalize predictive analytics by simply converting RapidMiner workflows into webservice end points that can return data in various formats like XML, JSON, Odata, HTML and many other. Many a times there is a need to provide inputs to process when calling via webservice, This KB Article describes options and steps needed to provide parameters to web services.

 

The process to create web service from RapidMiner workflows is documented in this KB Article

 

Rapidminer webservice allows you to provide url based inputs that can affect

    • Macros
    • Operator Parameters

parameterbinding.png

This can be configured in the Edit Web service panel as seen above

 

Macro Binding

To map a url parameter to Query Parameter click on "Add Macro Binding"(Marked 1 above) 

In this case the url parameters "custid" is mapped to update the macro "Customerid"

Addtionally if you have already defined Macros in the process context then clicking on the "Copy from process context" will autofill the required parameter binding values. 

 

Operator parameter Binding

You can directly map a url parameter to a parameter for specific operator.  As seen below provide your url parameter name in place or "urlparam"

Provide your operator name in place of "operator_name" and the specific parameter in place of "operator_parameter"

parameterbinding2.png

 

You will also be able to specify if a particular parameter is mandatory or not, by clicking on the checkboxes next to each parameter binding.

 

Once completed hit the "Submit" button to save the configuration

 

An example of the request url in the case where you are mapping a macro and operator param will look like below.

 

http://myservername:port/api/rest/process/serviceid?custid=xxxx&urlparam=yyyyy

 

 

Where are the RapidMiner Server licenses stored

by RMSupport on ‎05-26-2016 06:04 AM - edited on ‎08-09-2016 04:10 PM by RMStaff

RapidMiner Server stores the licenses inside the /standalone/configuration/licenses/rapidminer-server folder in the RapidMiner Server installation directory. Licenses are simply text files which contain the license string.

Note that the naming convention for them needs to be kept, otherwise RapidMiner Server will not recognize the license file.

 

To update the actual license key it is recommended to do this from the RapidMiner Server Interface. Following are the steps for updating License keys

 

 

  1. Login to Rapidminer account settings and get your license keys.
    Spoiler
    Please note that not every user can see the server license key, they are assigned to designated user accounts from your company.

    Here are additonal details on how to get the license key.

    http://docs.rapidminer.com/server/installation/#copy-server-key

  2. Login to RapidMiner Server with an account with admin privilege. The default "admin" userid should have this privileges.
  3. Then in the navigation menu on the left expand the Adminstration section and click on Manage Licenses.
  4. server manage license.pngThen on the next page, click on the "Install Licenses" link on the right side of the page. install license.png
  5. In the popup window then add the license key you copied from step 1 install license popup.png
  6. You Should see the "Valid License" green check mark on the bottom right of the popup window to proceed
  7. Once you see the green check mark, click on "Install License" and you should see a successfull message like belowinstall license complete.png

How can I install RapidMiner Server on a machine without display

by RMSupport on ‎05-26-2016 06:04 AM - edited on ‎07-15-2016 08:44 AM by Moderator

Change default groups for a new user

by RMStaff on ‎07-05-2016 06:16 AM - edited on ‎07-07-2016 06:47 AM by Community Manager

RapidMiner Server provides the ability to manage users using groups and roles make it easier to give permission for a group of users easily. Details of user management can be found here

 

Each user can be part of some default groups. This is helpful to give some minimum set of permissions when a new user is created. This article descirbes steps needed to setup defaut groups that a new user is part of.

 

Login to the Rapidminer server with admin account

Click on the user management link on the left and then on the groups tab.

Click on any of the groups and you will notice a checkbox "New users are assinged to this group automatically"

Check/Uncheck based on your needs.  You will need to go thru each group to set the behaviour. 

assignusertodefaultgroup.png

 

 

 

 

Rapidminer server database FAQ's

by RMStaff ‎06-27-2016 04:58 PM - edited ‎06-27-2016 04:59 PM

As noted in the system requirements page here Rapidminer server requires an operational database for its own purposes.

Rapidminer server supports following database for its operational database

  • MySQL
  • Microsoft SQL Server
  • Oracle
  • PostgreSQL

Do I need to update the database server directly

On a normal usage there should be no need to udpate the Rapidminer server database directly. Infact it is hihgly recommended that one should not interfere by doing any sort of modification directly on the database server.

 

What is the database used for

The operatonal database is used for maintaining several critical information and settings used by Rapidminer server. Some examples of what these settings include are as following

  • Repository items (These are your process, models, data(Examplesets) that are stored under Rapidminer server repository.
  • User and groups information
  • LDAP configuration related settings
  • Rapidminer server Apps configuration
  • Configuration and setting for Rapidminer server process exposed as web services 
  • Scheduling information
  • Connection information to different database and cloud providers
  • Actual data that is stored on Rapidminer server repository using the store operator
  • Logs for various items generated during server lifetime

 

What is the expected size

Most of the items stored by Rapidminer server are very small in nature, however if the users save data using the "store" operator then the size can grow dramatically based on the size of the data that is stored. Please also note that when Rapidminer "stores" data in its repository it also adds more metadata around it, thereby increasing the storage size. 

 

Should I be backing up the database

Yes absolutely. the database contains lots of critical information and can act as a good resource to restore the environment to a previously known stable state. It is highly recommended to take backups regularly and special backups should be planned and taken before upgrades or major changes are planned to the system

 

 

Rapidminer Server Create Web Services from Process Method 2

by RMStaff ‎06-15-2016 05:37 AM - edited ‎06-15-2016 05:52 AM

This article is supplementary to article described here. This KB Article explain another technique that can be used to create a new webservice. The subtle difference with this approach is that the user is able to create a serviceid, instead of the Rapidminer server using the default i.e the process name.

 

Following are the steps needed to create a web service directly from the server interface

        1. Navigate to your server url and login 
        2. After login is successfull, using the menu on the left navigate to the services section.

server browserprocess.png

        1. On the next screen click on the "Create new service" link towards the top right of the screen

createnewservice.png

        1. On the next screen that appears as below, you will be able to provide a service id(Marked 1) and then also aselect the Datasource (Marked 2)

createservicedialog.png

 

      1. Follow rest of the process from steps in this article
      2. Some advanced configurations are covered in this topic here

 

 

 

 

Rapidminer Server Create Web Services from Process

by RMStaff ‎06-15-2016 05:29 AM - edited ‎06-15-2016 05:38 AM


RapidMiner Server provides a powerful capability to expose any workflow you built to be converted into a webservices within a matter of few clicks. 

 

This section describes how to expose a RapidMiner Server process as a web service which can be called from other application environment. RapidMiner web services can be either parameterless or can accept parameters as part of the URL query. This article covers parameterless configuration, a follow on article will cover passing parameters and advanced configuration

 

Prerequisites 

  • You will need RapidMiner Server installed  and configured
  • Studio client connected to a server Repository.
  • The process you will want to be available as a web service should be saved in a server repository folder.
  • Any webservice can return data only from the first "res" (Result) port. So ensure the process is designed so that data you expect from the webservice is delivered to first "res" port

This method does not provide ability to create a unique service id, but creates a service id automatically from the name of the underlying process.

If you need to create a unique service id, please refer to link here.

 

port delivery.png

 

Steps

    1. In your studio client navigate to the process you wish to make available as webservice. 
    2. Right click on the process that you want to expose as web service in your repository panel and click on the "Browse" optionbrowsertoserver.png
    3. This will take you to the server interface for RapidMiner Server. If prompted for username and password provide the appropriate username and password and login. You will be automatically directed to the right page like belowrepobrowser.png
    4. Ensure that the process path (marked 1) above is correct
    5. Click on the "Export as service" (marked 2) above and you should be directed to a screen like below

selectformat.png

    1. Ensure path looks correct in DataSource (Marked 1)
    2. Select the outputformat(Marked 2)
    3. Select the correct MIME Type (Marked 3)
    4. Hit Submit(Marked 4) to save the process . We will cover the other options visible in this panel in a different article
    5. Find the service you created in the next panel by scrolling thru the list of available services
      1. 2016-06-14 21_44_25-Start.pngYou can edit the service by click the edit icon(Marked 1)
      2. You can delete the service by clicking the delete icon(Marked 2)
      3. You can test the service by clicking the test icon (Marked 3)
    6. Click on the test icon and you should see a screen like below

geturl.png

 

  1. You can then test using the “Test” button. (Marked 1)
  2. The link for calling the web service is also available (Marked 2).
  3. The test results should be available in preview section (Marked 3)

 

You can now use the Direct Link(Marked 2) to call a Rapidminer process from other applications

In the next article here we will cover how to pass parameters and some of the advanced parameters

How do I change the Java version RapidMiner Server is using

by RMSupport on ‎05-26-2016 06:03 AM - edited on ‎06-14-2016 03:58 AM by Moderator

Solution:

To manually alter the Java version an already installed RapidMiner Server uses, follow these steps:

On Windows:

  1. Open the bin/standalone.conf.bat file in your RapidMiner Server installation directory.

  2. Replace the location in the following line:

              set "JAVA_HOME=C:\Program Files\Java\JRE8"
            
  3. Restart RapidMiner Server.

On Linux / Mac:

  1. Open the bin/standalone.conf file in your RapidMiner Server installation directory.

  2. Replace the location in the following line:

              JAVA_HOME="/opt/java/jre8"
            
  3. Restart RapidMiner Server.

RapidMiner LDAP Integration

by RMStaff on ‎06-13-2016 01:05 PM

User authentication via LDAP (Lightweight Directory Access Protocol) provides a very flexible way for administrators to configure the set of users who can use RapidMiner Server and also assign the appropriate rights for them. It also provides the users with a convenient way to authenticate themselves by using their corporate username and password

 

Details about setting up LDAP Authentication can be found here

http://docs.rapidminer.com/server/administration/ldap/

 

Additonal FAQ's

 

  1. Is there a way to search on more than one LDAP Server ("ldap.providerUrl")?
    • Yes, space delimited. Something like below  allow you to add more than one LDAP server.

      "ldap://host:port/dc=DomainComponent ldap://host2:port2/dc=DomainComponent"
  2. Is there a way of search within more than one "ou" for the ldap.search.base?
    • Enter blank space as search base and leave out DC-values for the various ldap-server-URIs

 

How do I install Extensions for RapidMiner Server

by RMSupport on ‎05-26-2016 06:04 AM

To install an Extension, follow these steps:

  1. Identify the Extension folder of RapidMiner Server. If you are unsure, log into the Web interface and go to System settings. Locate the property com.rapidanalytics.plugindir. If it is not there, add it and assign an arbitrary folder on the server. Normally this should be the plugins folder inside your RapidMiner Server installation directory.

  2. Obtain the Extension. Extensions can be downloaded from the Marketplace or any other source and have the file extension .jar. Make sure to use the same version as your RapidMiner Studio installation. You can also copy the extensions out of your RapidMiner Studio installation. When installed locally for the current user (which is the default), extensions are located in the folder .RapidMiner/managed of your user's home folder.

  3. Copy the Extension to the specified folder.

  4. Restart RapidMiner Server.

  5. Verify that the Extension was loaded correctly by going to Operators & Extensions in the RapidMiner Server Web interface.

How do I change the HTTP header size for RapidMiner Server

by RMSupport on ‎05-26-2016 06:04 AM

To change the HTTP header size settings, follow these steps:

  1. Edit the file standalone/configuration/standalone.xml in your RapidMiner Server installation directory.

  2. Locate the closing tag of the extensions definition:

              <extensions>
    
    ...
    
    </extensions>
            
  3. After this tag, add the following snippet where value defines the maximum URL length:

              <system-properties>
    
      <property name="org.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE" value="65535"/>
    
    </system-properties>
            
  4. Restart RapidMiner Server.

RapidMiner Server fails to store large data in its repository due to a Transaction rollback. What to do

by RMSupport on ‎05-26-2016 06:04 AM

Problem:

When storing data into the server repository, it is stored into the RM Server database. This happens within a transaction (a block operation so to say) which has a default timeout. If that timeout is exceeded because of the size of the data, the transaction fails and is rolled back with an error.

Solution:

It is generally not advisable to store huge data in the server repository. Instead, the data should be stored directly in a database via a database operator in RapidMiner. If that is not an option, the default timeout of 5 minutes can be increased in the server configuration. To do so, follow these steps:

  1. navigate to your RapidMiner Server installation folder, go into the standalone/configuration subfolder and open the standalone.xml file

  2. Find the following element and increase the value (timeout in seconds):

              <coordinator-environment default-timeout="300"/>
            

How do I configure the leading portion of the URL used for example for exporting services

by RMSupport on ‎05-26-2016 06:04 AM

To gLog into RapidMiner Server with administrator privileges and go to Administration, go to the System Settings. Then add a new setting with the key

      com.rapidanalytics.web.rooturl
    

and as the value use the actual leading portion of the URL that should be used, e.g.

      https://myhostname:8443
    

after a reboot of the server it should generate URLs starting with the specified prefix.

Version:

Only available as of RapidMiner Server 2.0.003 and later!

How do I configure properties of database connections defined in RapidMiner Server

by RMSupport on ‎05-26-2016 06:04 AM

Database connections can be defined in RapidMiner Studio or be defined in RapidMiner Server and used by RapidMiner Studio when it connects to the server.

To define a database connection in RapidMiner Server via the Web interface, go to Administration > Database connection. Then create or edit a database connection and click on Advanced settings.

Please consult the documentation of your JDBC driver and database which properties can be configured and what meaning they have.

How do I use Windows authentication for Microsoft SQL Server

by RMSupport on ‎05-26-2016 06:04 AM

Microsoft SQL Server can use integrated Windows authentication to connect without explicitly specifying a username and password, but rather authenticating via the logged in Windows user. This authentication mechanism can also be configured in RapidMiner Studio, e.g. as a regular JDBC driver property, as is described in these two articles: “How do I configure properties of database connections defined in RapidMiner Server?” , “How do I configure properties of the database connection used by RapidMiner Server?”

If the JTDS driver shipped with RapidMiner Studio and Server for Microsoft SQL Server is used, the respective property name is integratedSecurity . This property must be set to “true”. Setting driver properties is possible via the “Advanced” button in RapidMiner Studio's connection editor dialog or via the “Advanced settings” when editing database connections in RapidMiner Server.

To apply this setting to the database connection used by RapidMiner Server for its internal data, modify the following line in the standalone/configuration/standalone.xml file in the RapidMiner Server installation directory for the RapidAnalyticsDS datasource element:

      <connection-url>jdbc: sqlserver://localhost:1433;databaseName=rms;
    

by appending the following after the url:

      ;integratedSecurity=true
    

In order for this functionality to work properly, a platform dependent native library file needs to be installed. It can be obtained from http://sourceforge.net/projects/jtds/files/jtds/. Download the ZIP file, locate the file x86/SSO/ntlmauth.dll or x64/SSO/ntlmauth.dll, depending on your architecture, and copy it to a directory on the path, i.e. listed in the Windows %PATH% environment variable. A good candidate is also the bin folder of your Java Runtime installation. If you cannot copy it into a directory on the %PATH%, you need to edit the startup files of RapidMiner Server.

You can specify that directory by editing the file bin\standalone.conf.bat. The last line should read

      :JAVA_OPTS_SET
    

Before that line, add a line saying

      set JAVA_OPTS="%JAVA_OPTS% -Djava.library.path=yourPathToNtlmauth.dll"
    

How can I run RapidMiner Server with HTTPSSSL

by RMSupport on ‎05-26-2016 06:04 AM

To enable SSL encrypted connection to RapidMiner Server, follow these steps:

  1. Obtain an SSL certificate from a CA of your choice. Your company may already have one. The certificate must be available as a PKCS12 keystore. (In what format you receive the certificate unfortunately depends on the CA. Consult their documentation on how to convert the certificate to PKCS12.) Note that SSL certificates are issued per domain or host name. Make sure the hostname of the certificate matches the hostname of your RapidMiner Server installation or many browsers will show warnings or even block access entirely.

  2. Import that certificate into your Java keystore. The Java tool to do that is called keytool. It can be executed by calling

              keytool -importkeystore -destkeystore rms.keystore -srckeystore yourkeystore.p12 -srcstoretype PKCS12 -srcalias alias -destalias rms -trustcacerts
            
  3. Copy the generated rms.keystore to the folder /standalone/configuration in your RapidMiner Server installation directory.

  4. Edit the file standalone/configuration/standalone.xml in your RapidMiner Server installation directory. Locate the <connector name="http" ... /> tag. Uncomment the following snippet directly below it and edit the password to match the one of your keystore:

              <!--
    
    <connector name="https" scheme="https" protocol="HTTP/1.1" socket-binding="https" enable-lookups="false" secure="true">
    
        <ssl name="ssl" password="secret" protocol="TLSv1" key-alias="rms" certificate-key-file=" ${jboss.server.config.dir}/rms.keystore" />
    
    </connector>
    
    -->
            

    To uncomment it, remove the

How do I configure properties of the database connection used by RapidMiner Server

by RMSupport on ‎05-26-2016 06:04 AM

Database connection properties are defined by the JDBC driver of your database. The meaning of these properties should be described in the documentation of your database and driver, but you can easily get an overview of them by using RapidMiner Server which shows a list of properties when configuring database connections via the Web interface (Administration > Database connection > Advanced settings). Please consult the documentation of your JDBC driver and database which properties can be configured and what meaning they have.

All of these settings can also be used for configuring the data source that RapidMiner Server uses for its internal database connection.

To apply this setting to the database connection used by RapidMiner Server for its internal data, modify the following line in the standalone/configuration/standalone.xml file in the RapidMiner Server installation directory for the RapidAnalyticsDS datasource element:

      <connection-url>jdbc:.../>
    

the exact modification depends on the database you are using, e.g. for MySQL it would be :

      jdbc:mysql://localhost/rms?property1=value1&amp;property2=value2
    

while for MSSQL it would be:

      jdbc:mysql://localhost:1433;databaseName=rms;property1=value1;property2=value2
    

How do I create a Windows service for RapidMiner Server

by RMSupport on ‎05-26-2016 06:04 AM
  1. Open a Windows command prompt as administrator. To do that, open the Windows start menu, search for “cmd”, right-click it and select Run as administrator. In that command prompt, go to the bin folder in your RapidMiner Server installation folder.

  2. Type

              service.bat install
            

    This should install RapidMiner Server as a Windows service. To uninstall it later, call

              service.bat uninstall
            
  3. Unless you modified the service.bat file, the service was registered with the key RMSSVC. To start it from the command prompt, enter

              net start RMSSVC
            

    Similarly, to stop it, enter

              net stop RMSSVC
            

Alternatively, use the Windows control panel to do that. There you can also monitor the current state and define whether you want to start the service automatically.

Startup log messages are in the file run.log in the same folder.

Which are the most important settings files

by RMSupport on ‎05-26-2016 06:04 AM

The two files containing many server settings are:

  • standalone.xml - contains most settings RapidMiner Server uses like Hostname, Ports, Mail, Database, etc. Googling their names in conjunction with “JBoss 7” should yield helpful results most of the time.
  • standalone.conf / standalone.conf.bat - contains arguments passed to Java when starting RapidMiner Server like Xmx, garbage collection, etc. These are the standard JVM arguments you can pass to Java.

The standalone.xml can be found in the standalone/configuration folder in the RapidMiner Server installation directory. The standalone.conf / standalone.conf.bat (the used one depends on the OS, standalone.conf.bat is used on Windows only) can be found in the bin folder in the RapidMiner Server installation directory.

How I rollback an update of RapidMiner Server when I used the EAR replacement

by RMSupport on ‎05-26-2016 06:04 AM
Updating your RapidMiner Server is very easy using the EAR replacement method that is covered here .  Rolling back the update is done by completing the following steps
  1. Stop your RapidMiner Server instance.
    •  In Windows verify that all services related to RapidMiner have stopped.
  2. Restore your RapidMiner Server Database
    •  If you have never restored a DB a tool like mysql workbench would be very helpful.
  3. Replace your downloaded EAR file with the original
  4. Rename deployment marker to “dodeploy”
    • /RapidMiner/standalone/deployments/rapidminer-server-2.4.0.ear.deployed
      ----> /RapidMiner/standalone/deployments/rapidminer-server-2.4.0.ear.dodeploy
  5. Replace any JAR files for extensions that were upgraded during your update.
  6. Restart server

RapidMiner Server complains that a database connection was closed. How can I re-establish it

by RMSupport on ‎05-26-2016 06:04 AM

Problem:

JBoss pools SQL connections. When connections are closed for various reasons (errors, timeouts, network problems), it does not realize that this has happens and returns closed connections the next time they are required.

Solution:

Force JBoss to check whether the connection is still live before returning them from the pool. If not, it will re-establish the connection. To achieve this, insert the following into the standalone.xml configuration file (found under standalone/configuration):

      <check-valid-connection-sql> sql code</check-valid-connection-sql>
    

after the XML element

      <validate-on-match>true</validate-on-match>
    

For sql code, insert arbitrary (fast) SQL code like

      SELECT 1
    

or (for Microsoft SQL Server)

      SELECT 1 FROM sysobjects
    

Note that this may very slightly influence performance. You may also want to try setting

      <background-validation>false</background-validation>
    

to

      <background-validation>true</background-validation>
    

Where do I find log files in case there is a problem with RapidMiner Server

by RMSupport on ‎05-26-2016 06:04 AM

To find log files for RapidMiner Server, follow these steps:

  1. Go to your RapidMiner Server installation directory and switch to the /standalone/log subfolder.

  2. Open the file for the day you are interested in. The file for the current day is called server.log .

How do I change the ports and bind address used by RapidMiner Server

by RMSupport on ‎05-26-2016 06:04 AM

To change the hostname settings, follow these steps:

  1. Edit the file standalone/configuration/standalone.xml in your RapidMiner Server installation directory.

  2. Locate the tags configuring the interface:

              <interface name="public">
    
      <inet-address value="${jboss.bind.address:127.0.0.1}"/>
    
    </interface>
            

    In this tag, edit the bind address behind the colon according to your needs (can use hostname).

  3. Restart RapidMiner Server.

To change the port settings, follow these steps:

  1. Edit the file standalone/configuration/standalone.xml in your RapidMiner Server installation directory.

  2. Locate the tags configuring the socket bindings:

              <socket-binding name="http" port="8080"/>
    
    <socket-binding name="https" port="8443"/>
            

    In these tags, edit the ports according to your needs.

  3. Restart RapidMiner Server.

Note that on Linux, ports below 1024, i.e. in particular the standard HTTP(S) ports 80 and 443 can be assigned only when running (or at least starting) as root.

As an aside, note that these settings may also affect the hostname you want to use for RapidMiner Server Web services.

How do I update RapidMiner Server using the EAR file

by RMSupport on ‎05-26-2016 06:04 AM
You can update RapidMiner Server using these quick steps
  1. Stop your RapidMiner Server instance.  
    • In Windows verify that all services related to RapidMiner have stopped.
  2. Backup your RapidMiner Server Database
    • If you have never backed up a DB a tool like mysql workbench would be very helpful.
  3. Backup your RapidMiner extension library - to determine the location of your RapidMiner Server extensions directory, from the RapidMiner Server home page open Administration and then System Settings. The value of the com.rapidanalytics.plugindir system setting indicates the location of the directory.
  4. Replace the EAR file with the most recent version available from rapidminer.com
    • /RapidMiner/standalone/deployments/rapidminer-server-2.3.2.ear 
  5. Rename deployment marker to “dodeploy”
    • /RapidMiner/standalone/deployments/rapidminer-server-2.3.2.ear.deployed
      ----> /RapidMiner
      /standalone/deployments/rapidminer-server-2.3.2.ear.dodeploy
  6. If you have extensions running with your RapidMiner Server you want to update them at marketplace.rapidminer.com
  7. Restart your RapidMiner Server instance or instances
  8. Log on as an admin into RapidMiner Server to verify there are no update steps needed to be applied to your database.  
You can find steps for rolling back an update of this style here .

How do I configure outgoing Email in RapidMiner Server

by RMSupport on ‎05-26-2016 06:04 AM

Open the file standalone/configuration/standalone.xml inside your RapidMiner Server installation. Therein, locate the XML element

      <subsystem xmlns="urn:jboss:domain:mail:1.0">
    

and modify the from, name and password fields accordingly. Afterwards, locate the XML element

      <outbound-socket-binding name="mail-smtp">
    

And modify the host and port fields to fit your needs.

Now save the file and restart RapidMiner Server. Log in as administrator and go to System Settings > Email Configuration, enter an email address and click on “Send test email”. If everything is configured correctly, you should receive an email shortly. Otherwise, please consult the log files.

Note: Make sure the “from” field does not contain blanks, otherwise sending emails will not work.

(Expert note: In the “Email Configuration” tab you will see the message “The property com.rapidanalytics.mail.jndi_name is undefined. Assuming JNDI name 'java:/Mail'.The mail session is configured for protocol smtp:.” In case you changed the JNDI name in the above configuration file, it would be possible to configure RapidMiner Server to use that JNDI name via the mentioned property. This may be necessary if RapidMiner Server runs on a JBoss shared with other applications.)

How do I change the maximum amount of memory RapidMiner Server is using

by RMSupport on ‎05-26-2016 06:03 AM

Problem:

The maximum amount of memory RapidMiner Server uses is specified in a settings file and has to be changed by hand.

Solution:

To manually alter the maximum amount of memory an already installed RapidMiner Server uses, follow these steps:

On Windows:

  1. Open the bin/standalone.conf.bat file in your RapidMiner Server installation directory.

  2. Search for the line which contains the following fragment (number might differ) and replace the number with the amount of memory you want the server to use (in megabytes):

              -Xmx1024M
            
  3. Restart RapidMiner Server.

On Linux / Mac:

  1. Open the bin/standalone.conf file in your RapidMiner Server installation directory.

  2. Search for the line which contains the following fragment (number might differ) and replace the number with the amount of memory you want the server to use (in megabytes):

              -Xmx1024m
            
  3. Restart RapidMiner Server.

I have funny characters in my example sets. I suspect an encoding problem.

by RMSupport on ‎05-26-2016 06:03 AM

Problem:

Encoding settings of the database, the settings of a database connection configured in RapidMiner Studio or Server, or the JBoss instance that hosts RapidMiner Server are incorrect. Many file input operators can also specify an encoding.

Solution:

You should use utf8 wherever possible. Database settings can be made per

  • Database : In MySQL, use “ALTER DATABASE xxx DEFAULT CHARACTER SET utf8”

  • Table : Newly created tables will inherit from the default character set and can be otherwise specified in the CREATE statement.

  • RapidMiner Studio/Server JDBC connection : Set the appropriate connection properties (see below for a list). In RapidMiner Studio this is possible via Tools > Manage Database Connections > Advanced. In RapidMiner Server this is possible by going to Administration > Database Connection, editing a connection and going to the Advanced Settings tab. In places where you can only edit the JDBC-URL, parameters need to be appended, see the following article: “How do I configure properties of database connections defined in RapidMiner Server?”

  • JBoss datasource configuration : Same as above, add the parameter to the database URL specified in the standalone.xml file. See other FAQ article about this.

The encodingName you want to use is almost always utf8. What exactly the name of the JDCB property is, depends on the database. Known values are:

  • MySQL: characterEncoding

  • MS SQL Server via JTDS driver: CHARSET

  • Oracle: charset

Processes can configure the encoding via parameters of input operators.

  • Read CSV and similar operators offer parameters to select the encoding of the parsed file.

Pitfall in MySQL: In some tables, Quartz uses three varchar(255) as a key. In utf8, this is 3*3*255 bytes which is above the default maximum key length. (This is compiled into MySQL and cannot be changed.) Therefore, quartz tables must be created in latin1 encoding. Workaround: Set default encoding of database only after quartz tables are installed.

How do I change the HTTP post size for RapidMiner Server

by RMSupport on ‎05-26-2016 06:03 AM

To change the HTTP post size settings, follow these steps:

  1. Edit the file standalone/configuration/standalone.xml in your RapidMiner Server installation directory.

  2. Locate the following tag:

              <connector name="http" ...>
            
  3. Add the following attributes to this tag which define the maximum post sizes in kilobytes:

              max-post-size="204800"
    
    max-save-post-size="409600"
            
  4. Restart RapidMiner Server.

How do I stop RapidMiner Server

by RMSupport on ‎05-26-2016 06:03 AM

To stop RapidMiner Server, follow these steps:

  1. Go to your RapidMiner Server installation directory and switch to the /bin subfolder.

  2. Execute jboss-cli.sh / jboss-cli.bat depending on your OS with the following parameter:

              --connect command=:shutdown
            

How can I connect to a database whose driver is not shipped with RapidMiner Server

by RMSupport on ‎05-26-2016 06:03 AM

Problem:

RapidMiner Server comes with database drivers for MySQL, MSSQL (JTDS) and PostgreSQL which can be used by processes right away - given an installed license which actually allows (open source) database connections. Other databases cannot be accessed by processes without additional steps.

Solution:

To access other databases than the aforementioned ones, first make sure the database you want to use is supported by your license. Afterwards, follow these steps:

  1. Copy the JDBC driver *.jar file for the database into the modules/system/layers/base/com/rapidminer/main folder in your RapidMiner Server installation directory.

  2. Edit the module.xml file in the same directory and add the following element right next to the other elements with the same name (replace the name with the actual filename of the .jar):

              <resource-root path="name.jar" />
            
  3. If the database is not part of the default databases which are available in RapidMiner Studio, some additional steps are necessary:

    a. Open RapidMiner Studio and make sure the database driver for the database in question is setup correctly and can be accessed by RapidMiner Studio.

    b. If RapidMiner Server runs on a different machine / under a different user than the RapidMiner Studio instance you used to perform step a), do the following:

    • Copy the jdbc_properties.xml file from the .RapidMiner folder in the local user home folder to the .RapidMiner folder in the user home folder on the server for the user which will be running the RapidMiner Server instance.
  4. Restart RapidMiner Server.

How do I configure a proxy in RapidMiner Server

by RMSupport on ‎05-26-2016 06:03 AM

Symptom:

RapidMiner Server cannot execute Web mining operators or open files from URLs.

Problem:

In many corporate networks, network access is possible only via a proxy. If that is not configured correctly, RapidMiner Server cannot access the Internet.

Solution:

In RapidMiner Studio, proxy settings can be made via Tools > Preferences > System. Enable proxies for the individual protocols, HTTP, HTTPS, and FTP independently. Ask your network administrator for proxy host, port, and credentials. Note that oftentimes it is not necessary to use a proxy in Intranets. That means that if you to connect RapidMiner Studio to RapidMiner Server you may want to bypass the proxy. In that case, enter the hostname running RapidMiner Server into the field http.nonProxyHosts and https.nonProxyHosts. RapidMiner Studio needs to be restarted for these settings to take effect.

The same settings can be applied for RapidMiner Server, but it may be wise to check the settings in RapidMiner before applying them to the server. Once the correct settings are known, you need to edit the configuration file.

  • On Windows, edit the file bin\standalone.conf.bat. The last line should read

              :JAVA_OPTS_SET
            
  • Before that line, add two lines saying

              set JAVA_OPTS="%JAVA_OPTS% -Dhttp.proxySet=true -Dhttp.proxyHost=host -Dhttp.proxyUsername=user -Dhttp.proxyPassword=password"
    
    set JAVA_OPTS="%JAVA_OPTS% -Dhttps.proxySet=true -Dhttps.proxyHost=host -Dhttps.proxyUsername=user -Dhttps.proxyPassword=password"
            
  • On Linux and Unix, you should edit the file bin/standalone.conf. At the end, add two lines

              JAVA_OPTS="$JAVA_OPTS -Dhttp.proxySet=true -Dhttp.proxyHost=host -Dhttp.proxyUsername=user -Dhttp.proxyPassword=password"
    
    JAVA_OPTS="$JAVA_OPTS -Dhttps.proxySet=true -Dhttps.proxyHost=host -Dhttps.proxyUsername=user -Dhttps.proxyPassword=password"
            

How do I create a Linux service for RapidMiner Server

by RMSupport on ‎05-26-2016 06:03 AM

Linux systems have a special folder, /etc/init.d/ for scripts that are to be executed at system startup. To start RapidMiner Server when the system boots, follow these steps:

  1. Open the attached script in an editor. Modify the variables in the header:

    a. RAPIDMINER-SERVER_USER should be the Linux user that will run the service. The user must already exist. Use the useradd command to create one.

    b. RAPIDMINER-SERVER_HOME should point to your RapidMiner Server installation.

  2. Save that file as /etc/init.d/rapidminerserver and make it executable by calling

              chmod 755 /etc/init.d/rapidminerserver
            
  3. Tell the system to execute that script at boot and shutdown. You can do so by calling

              chkconfig --add rapidminerserver
            

This script works on Ubuntu only .

How do I start RapidMiner Server

by RMSupport on ‎05-26-2016 06:03 AM

To start RapidMiner Server, follow these steps:

  1. Go to your RapidMiner Server installation directory and switch to the /bin subfolder.

  2. Execute standalone.sh / standalone.bat depending on your OS.