Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-server
Commits
5da34579
Verified
Commit
5da34579
authored
4 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
rename insecure to --no-tls and add to Makefile
parent
8409cfe0
No related branches found
No related tags found
1 merge request
!11
rename insecure to --no-tls and add to Makefile
Pipeline
#7708
canceled
4 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+5
-3
5 additions, 3 deletions
Makefile
src/main/java/org/caosdb/server/CaosDBServer.java
+9
-10
9 additions, 10 deletions
src/main/java/org/caosdb/server/CaosDBServer.java
with
14 additions
and
13 deletions
Makefile
+
5
−
3
View file @
5da34579
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
CAOSDB_SERVER_VERSION
?=
$(
shell mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate
-Dexpression
=
project.version
-q
-DforceStdout
)
CAOSDB_SERVER_VERSION
?=
$(
shell mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate
-Dexpression
=
project.version
-q
-DforceStdout
)
CAOSDB_COMMAND_LINE_OPTIONS
?=
SHELL
:=
/bin/bash
SHELL
:=
/bin/bash
JPDA_PORT
?=
9000
JPDA_PORT
?=
9000
JMX_PORT
?=
9090
JMX_PORT
?=
9090
...
@@ -41,13 +42,14 @@ run: compile
...
@@ -41,13 +42,14 @@ run: compile
mvn
exec
:java@run
mvn
exec
:java@run
run-debug
:
jar
run-debug
:
jar
java
-Xrunjdwp
:transport
=
dt_socket,address
=
0.0.0.0:
$(
JPDA_PORT
)
,server
=
y,suspend
=
n
-Dcaosdb
.debug
=
true
-jar
target/caosdb-server.jar
java
-Xrunjdwp
:transport
=
dt_socket,address
=
0.0.0.0:
$(
JPDA_PORT
)
,server
=
y,suspend
=
n
-Dcaosdb
.debug
=
true
-jar
target/caosdb-server.jar
$(
CAOSDB_COMMAND_LINE_OPTIONS
)
run-debug-single
:
run-debug-single
:
java
-Dcom
.sun.management.jmxremote
-Dcom
.sun.management.jmxremote.port
=
$(
JMX_PORT
)
-Dcom
.sun.management.jmxremote.ssl
=
false
-Dcom
.sun.management.jmxremote.authenticate
=
false
-Xrunjdwp
:transport
=
dt_socket,address
=
0.0.0.0:
$(
JPDA_PORT
)
,server
=
y,suspend
=
n
-Dcaosdb
.debug
=
true
-jar
target/caosdb-server.jar
java
-Dcom
.sun.management.jmxremote
-Dcom
.sun.management.jmxremote.port
=
$(
JMX_PORT
)
-Dcom
.sun.management.jmxremote.ssl
=
false
-Dcom
.sun.management.jmxremote.authenticate
=
false
-Xrunjdwp
:transport
=
dt_socket,address
=
0.0.0.0:
$(
JPDA_PORT
)
,server
=
y,suspend
=
n
-Dcaosdb
.debug
=
true
-jar
target/caosdb-server.jar
$(
CAOSDB_COMMAND_LINE_OPTIONS
)
run-single
:
run-single
:
java
-jar
target/caosdb-server.jar
java
-jar
target/caosdb-server.jar
$(
CAOSDB_COMMAND_LINE_OPTIONS
)
formatting
:
formatting
:
mvn
fmt
:format
mvn
fmt
:format
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/caosdb/server/CaosDBServer.java
+
9
−
10
View file @
5da34579
...
@@ -117,7 +117,7 @@ public class CaosDBServer extends Application {
...
@@ -117,7 +117,7 @@ public class CaosDBServer extends Application {
private
static
ArrayList
<
Runnable
>
postShutdownHooks
=
new
ArrayList
<
Runnable
>();
private
static
ArrayList
<
Runnable
>
postShutdownHooks
=
new
ArrayList
<
Runnable
>();
private
static
ArrayList
<
Runnable
>
preShutdownHooks
=
new
ArrayList
<
Runnable
>();
private
static
ArrayList
<
Runnable
>
preShutdownHooks
=
new
ArrayList
<
Runnable
>();
private
static
boolean
START_BACKEND
=
true
;
private
static
boolean
START_BACKEND
=
true
;
private
static
boolean
INSECURE
=
false
;
private
static
boolean
NO_TLS
=
false
;
public
static
final
String
REQUEST_TIME_LOGGER
=
"REQUEST_TIME_LOGGER"
;
public
static
final
String
REQUEST_TIME_LOGGER
=
"REQUEST_TIME_LOGGER"
;
public
static
final
String
REQUEST_ERRORS_LOGGER
=
"REQUEST_ERRORS_LOGGER"
;
public
static
final
String
REQUEST_ERRORS_LOGGER
=
"REQUEST_ERRORS_LOGGER"
;
private
static
Scheduler
SCHEDULER
;
private
static
Scheduler
SCHEDULER
;
...
@@ -160,24 +160,23 @@ public class CaosDBServer extends Application {
...
@@ -160,24 +160,23 @@ public class CaosDBServer extends Application {
* Parse the command line arguments.
* Parse the command line arguments.
*
*
* <ul>
* <ul>
* <li>"nobackend": flag to run caosdb without any backend (for testing purposes)
* <li>"
--
no
-
backend": flag to run caosdb without any backend (for testing purposes)
* <li>"
insecure
": flag to start only a http server (no https server)
* <li>"
--no-tls
": flag to start only a http server (no https server)
* </ul>
* </ul>
*
*
* <p>
Both flags are
only available in the debug mode which is controlled by the
`caosdb.debug`
* <p>
The --no-backend flag is
only available in the debug mode which is controlled by the
* JVM Property.
*
`caosdb.debug`
JVM Property.
*
*
* @param args
* @param args
*/
*/
private
static
void
parseArguments
(
final
String
[]
args
)
{
private
static
void
parseArguments
(
final
String
[]
args
)
{
for
(
final
String
s
:
args
)
{
for
(
final
String
s
:
args
)
{
if
(
s
.
equals
(
"nobackend"
))
{
if
(
s
.
equals
(
"
--
no
-
backend"
))
{
START_BACKEND
=
false
;
START_BACKEND
=
false
;
}
else
if
(
s
.
equals
(
"
insecure
"
))
{
}
else
if
(
s
.
equals
(
"
--no-tls
"
))
{
INSECURE
=
true
;
NO_TLS
=
true
;
}
}
}
}
INSECURE
=
INSECURE
&&
isDebugMode
();
// only allow insecure in debug mode
START_BACKEND
=
START_BACKEND
||
!
isDebugMode
();
// always start backend if not in debug mode
START_BACKEND
=
START_BACKEND
||
!
isDebugMode
();
// always start backend if not in debug mode
}
}
...
@@ -347,7 +346,7 @@ public class CaosDBServer extends Application {
...
@@ -347,7 +346,7 @@ public class CaosDBServer extends Application {
final
int
maxTotalConnections
=
final
int
maxTotalConnections
=
Integer
.
parseInt
(
getServerProperty
(
ServerProperties
.
KEY_MAX_CONNECTIONS
));
Integer
.
parseInt
(
getServerProperty
(
ServerProperties
.
KEY_MAX_CONNECTIONS
));
if
(
INSECURE
)
{
if
(
NO_TLS
)
{
runHTTPServer
(
port_http
,
initialConnections
,
maxTotalConnections
);
runHTTPServer
(
port_http
,
initialConnections
,
maxTotalConnections
);
}
else
{
}
else
{
runHTTPSServer
(
runHTTPSServer
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment