mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
This commit is contained in:
commit
7426e9908d
|
@ -5,6 +5,9 @@ The ArangoDB server can listen for incoming requests on multiple *endpoints*.
|
|||
The endpoints are normally specified either in ArangoDB's configuration file or on
|
||||
the command-line, using the ["--server.endpoint"](../ConfigureArango/Arangod.md) option.
|
||||
The default endpoint for ArangoDB is *tcp://127.0.0.1:8529* or *tcp://localhost:8529*.
|
||||
ArangoDB can also do a so called *broadcast bind* using *tcp://0.0.0.0:8529*. This way
|
||||
it will be reachable on all interfaces of the host. This may be useful
|
||||
on development systems that frequently change their network setup like laptops.
|
||||
|
||||
The number of endpoints can also be changed at runtime using the API described
|
||||
below. Each endpoint can optionally be restricted to a specific list of databases
|
||||
|
@ -14,6 +17,23 @@ This may be useful in multi-tenant setups.
|
|||
A multi-endpoint setup may also be useful to turn on encrypted communication for
|
||||
just specific databases.
|
||||
|
||||
Endpoints equal TCP ports to be bound. On one specific ethernet interface each port
|
||||
can only be bound **exactly once**. You can look up your available interfaces using
|
||||
the *ifconfig* command on Linux / MacOSX - the Windows equivalent is *ipconfig*
|
||||
([See Wikipedia for more details](http://en.wikipedia.org/wiki/Ifconfig)).
|
||||
The general names of the interfaces differ on OS's and hardwares they run on.
|
||||
However, typically every host has a so called
|
||||
[loopback interface](http://en.wikipedia.org/wiki/Loop_device), which is a
|
||||
virtual interface. By convention it always has the address *127.0.0.1* or *::1* (ipv6),
|
||||
and can only be reached from exactly the very same host.
|
||||
Ethernet interfaces usually have names like *eth0*, *wlan0*, *eth1:17*, *le0* or
|
||||
a plain text name in Windows.
|
||||
|
||||
To find out which services already use ports (so ArangoDB can't bind them anymore),
|
||||
you can use the [netstat command](http://en.wikipedia.org/wiki/Netstat)
|
||||
(it behaves a little different on each platform, run it with *-lnpt* on Linux, *-p tcp*
|
||||
on MacOSX or with *-an* on windows for valuable information).
|
||||
|
||||
The JavaScript interface for endpoints provides operations to add new endpoints at
|
||||
runtime, and optionally restrict them for use with specific databases. The interface
|
||||
also can be used to update existing endpoints or remove them at runtime.
|
||||
|
|
|
@ -12,5 +12,8 @@
|
|||
"top": 35,
|
||||
"bottom": 35
|
||||
}
|
||||
},
|
||||
"styles": {
|
||||
"website": "styles/website.css"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
div.example_show_button {
border: medium solid lightgray;
text-align: center;
position: relative;
top: -10px;
}
.book .book-body .navigation.navigation-next {
right: 10px !important;
}
.book .book-summary ul.summary li.active>a,.book .book-summary ul.summary li a:hover {
color: #000 !important;
background: #80A54D !important;
text-decoration: none;
}
.book .book-body .page-wrapper .page-inner section.normal .deprecated{
background-color: rgba(240,240,0,0.4);
}
.gsib_a {
padding: 0px !important;
}
.gsc-control-cse {
border: 0px !important;
background-color: transparent !important;
}
.gsc-input {
margin: 0px !important;
}
|
|
@ -1993,16 +1993,10 @@ int TRI_StartServer (TRI_server_t* server,
|
|||
if (server->_appPath != nullptr &&
|
||||
strlen(server->_appPath) > 0 &&
|
||||
! TRI_IsDirectory(server->_appPath)) {
|
||||
if (! performUpgrade) {
|
||||
LOG_ERROR("specified --javascript.app-path directory '%s' does not exist. "
|
||||
"Please start again with --upgrade option to create it.",
|
||||
server->_appPath);
|
||||
return TRI_ERROR_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
long systemError;
|
||||
std::string errorMessage;
|
||||
res = TRI_CreateDirectory(server->_appPath, systemError, errorMessage);
|
||||
int res = TRI_CreateRecursiveDirectory(server->_appPath, systemError, errorMessage);
|
||||
|
||||
if (res != TRI_ERROR_NO_ERROR) {
|
||||
LOG_ERROR("unable to create --javascript.app-path directory '%s': %s",
|
||||
|
@ -2010,6 +2004,10 @@ int TRI_StartServer (TRI_server_t* server,
|
|||
errorMessage.c_str());
|
||||
return res;
|
||||
}
|
||||
else {
|
||||
LOG_INFO("created --javascript.app-path directory '%s'.",
|
||||
server->_appPath);
|
||||
}
|
||||
}
|
||||
|
||||
// create subdirectories if not yet present
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "LogfileManager.h"
|
||||
#include "Basics/files.h"
|
||||
#include "Basics/hashes.h"
|
||||
#include "Basics/json.h"
|
||||
#include "Basics/logging.h"
|
||||
|
@ -266,7 +267,18 @@ bool LogfileManager::prepare () {
|
|||
_directory = (*_databasePath);
|
||||
|
||||
if (! basics::FileUtils::isDirectory(_directory)) {
|
||||
LOG_FATAL_AND_EXIT("database directory '%s' does not exist.", _directory.c_str());
|
||||
std::string systemErrorStr;
|
||||
long errorNo;
|
||||
|
||||
int res = TRI_CreateRecursiveDirectory(_directory.c_str(), errorNo, systemErrorStr);
|
||||
if (res != TRI_ERROR_NO_ERROR) {
|
||||
LOG_FATAL_AND_EXIT("unable to create database directory: %s",
|
||||
systemErrorStr.c_str());
|
||||
}
|
||||
else {
|
||||
LOG_INFO("created database directory '%s'.",
|
||||
_directory.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
// append "/journals"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/*jshint unused: false */
|
||||
'use strict';
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief ArangoDB Application Launcher
|
||||
|
@ -29,8 +30,6 @@
|
|||
/// @author Copyright 2013, triAGENS GmbH, Cologne, Germany
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- imports
|
||||
|
@ -746,7 +745,6 @@
|
|||
exports.update = store.update;
|
||||
exports.info = store.info;
|
||||
|
||||
}());
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*jslint continue:true */
|
||||
'use strict';
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Foxx application store
|
||||
|
@ -27,9 +27,6 @@
|
|||
/// @author Copyright 2015, triAGENS GmbH, Cologne, Germany
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- global variables
|
||||
|
@ -553,8 +550,6 @@ var infoJson = function (name) {
|
|||
// Temporary export to avoid breaking the client
|
||||
exports.compareVersions = compareVersions;
|
||||
|
||||
}());
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*jshint strict: false */
|
||||
'use strict';
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Graph Data for Example
|
||||
|
@ -26,7 +26,6 @@
|
|||
/// @author Michael Hackstein
|
||||
/// @author Copyright 2011-2014, triAGENS GmbH, Cologne, Germany
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
(function() {
|
||||
|
||||
var Graph = require("org/arangodb/general-graph");
|
||||
|
||||
|
@ -114,4 +113,3 @@
|
|||
|
||||
exports.loadGraph = loadGraph;
|
||||
exports.dropGraph = dropGraph;
|
||||
}());
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*jshint strict: false */
|
||||
'use strict';
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Foxx application module
|
||||
|
@ -28,9 +28,6 @@
|
|||
/// @author Copyright 2013, triAGENS GmbH, Cologne, Germany
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- imports
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -435,7 +432,6 @@ function computeRootAppPath(mount, isValidation) {
|
|||
};
|
||||
|
||||
exports.ArangoApp = ArangoApp;
|
||||
}());
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*jshint strict: false */
|
||||
'use strict';
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Foxx routing
|
||||
|
@ -27,8 +27,6 @@
|
|||
/// @author Copyright 2013, triAGENS GmbH, Cologne, Germany
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- Imports
|
||||
|
@ -694,7 +692,6 @@ function escapeHTML (string) {
|
|||
exports.routeApp = routeApp;
|
||||
exports.invalidateExportCache = invalidateExportCache;
|
||||
exports.__test_transformControllerToRoute = transformControllerToRoute;
|
||||
}());
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
|
|
|
@ -174,9 +174,6 @@ function Sessions(opts) {
|
|||
if (opts.cookie.secret && typeof opts.cookie.secret !== 'string') {
|
||||
throw new Error('Cookie secret must be a string or empty.');
|
||||
}
|
||||
if (!opts.cookie.name) {
|
||||
opts.cookie.name = 'sid';
|
||||
}
|
||||
} else if (opts.type === 'header') {
|
||||
if (opts.header && typeof opts.header !== 'string') {
|
||||
throw new Error('Header name must be a string or empty.');
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Foxx Swagger documentation
|
||||
|
@ -26,9 +27,6 @@
|
|||
/// @author Copyright 2015, ArangoDB GmbH, Cologne, Germany
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
var foxxInternal = require("org/arangodb/foxx/internals");
|
||||
var _ = require("underscore");
|
||||
var internal = require("internal");
|
||||
|
@ -89,4 +87,3 @@
|
|||
};
|
||||
|
||||
exports.Docs = SwaggerDocs;
|
||||
}());
|
||||
|
|
Loading…
Reference in New Issue