Apache Archiva upload artifact is not working for file size more than 50MB - jquery-file-upload

Tried to upload war file which size is about 150MB manually using "upload Artifact" menu in Apache Archiva, it always fail with no error message shown.
While debugging, it shows the following error.
Uncaught TypeError: file.error.replace is not a function
at eval (eval at b (tmpl.min.js?_archivaVersion=2.2.5:1:74), <anonymous>:3:555)
at tmpl.min.js?_archivaVersion=2.2.5:1:253
at tmpl.min.js?_archivaVersion=2.2.5:1:253
at $.<computed>.<computed>._renderTemplate (jquery.fileupload-ui-6.6.3.js?_archivaVersion=2.2.5:358:26)
at $.<computed>.<computed>._renderTemplate (jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:90:26)
at $.<computed>.<computed>._renderDownload (jquery.fileupload-ui-6.6.3.js?_archivaVersion=2.2.5:420:25)
at $.<computed>.<computed>._renderDownload (jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:90:26)
at S.fn.init.<anonymous> (jquery.fileupload-ui-6.6.3.js?_archivaVersion=2.2.5:186:53)
at c (jquery-1.11.1.min.js?_archivaVersion=2.2.5:2:28327)
at Object.add [as done] (jquery-1.11.1.min.js?_archivaVersion=2.2.5:2:28605)
eval # VM83:3
(anonymous) # tmpl.min.js?_archivaVersion=2.2.5:1
(anonymous) # tmpl.min.js?_archivaVersion=2.2.5:1
_renderTemplate # jquery.fileupload-ui-6.6.3.js?_archivaVersion=2.2.5:358
(anonymous) # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:90
_renderDownload # jquery.fileupload-ui-6.6.3.js?_archivaVersion=2.2.5:420
(anonymous) # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:90
(anonymous) # jquery.fileupload-ui-6.6.3.js?_archivaVersion=2.2.5:186
c # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
add # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
(anonymous) # jquery.fileupload-ui-6.6.3.js?_archivaVersion=2.2.5:183
each # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
each # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
fail # jquery.fileupload-ui-6.6.3.js?_archivaVersion=2.2.5:178
_trigger # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:480
_onFail # jquery.fileupload-5.10.0.js?_archivaVersion=2.2.5:559
(anonymous) # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:90
(anonymous) # jquery.fileupload-5.10.0.js?_archivaVersion=2.2.5:604
c # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
fireWith # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
l # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
(anonymous) # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
error (async)
send # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
ajax # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
send # jquery.fileupload-5.10.0.js?_archivaVersion=2.2.5:599
_onSend # jquery.fileupload-5.10.0.js?_archivaVersion=2.2.5:655
(anonymous) # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:90
send # jquery.fileupload-5.10.0.js?_archivaVersion=2.2.5:897
(anonymous) # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:90
(anonymous) # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:185
each # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
each # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
$.fn.<computed> # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:175
submit # artifacts-management.js?_archivaVersion=2.2.5:109
_trigger # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:480
newData.submit # jquery.fileupload-5.10.0.js?_archivaVersion=2.2.5:693
_startHandler # jquery.fileupload-ui-6.6.3.js?_archivaVersion=2.2.5:431
(anonymous) # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:90
dispatch # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
v.handle # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
jquery-1.11.1.min.js?_archivaVersion=2.2.5:2 POST http://1-a-ab3devapp3:9096/restServices/archivaUiServices/fileUploadService net::ERR_CONNECTION_RESET
send # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
ajax # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
send # jquery.fileupload-5.10.0.js?_archivaVersion=2.2.5:599
_onSend # jquery.fileupload-5.10.0.js?_archivaVersion=2.2.5:655
(anonymous) # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:90
send # jquery.fileupload-5.10.0.js?_archivaVersion=2.2.5:897
(anonymous) # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:90
(anonymous) # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:185
each # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
each # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
$.fn.<computed> # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:175
submit # artifacts-management.js?_archivaVersion=2.2.5:109
_trigger # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:480
newData.submit # jquery.fileupload-5.10.0.js?_archivaVersion=2.2.5:693
_startHandler # jquery.fileupload-ui-6.6.3.js?_archivaVersion=2.2.5:431
(anonymous) # jquery.ui.widget-1.9.2.js?_archivaVersion=2.2.5:90
dispatch # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
v.handle # jquery-1.11.1.min.js?_archivaVersion=2.2.5:2
If try to upload files less than 50 MB, it is possible to upload into repository.
Same issue when tried using Maven Deploy(small files upload OK but big files end up with error)
Any help on this.

Related

Perl Script Not Liking Date Extension

why do I receive the error complaining about the parenthesis ?
sh: syntax error at line 1 : `)' unexpected
when adding this date extension to the new file -- mv abc abc$(date +%Y%m%d%H%M%S)
for it seems that it doesn't like that last parenthesis
#!/usr/bin/perl
# =========================================== #
# Script to watch POEDIACK file size
#
# - Comments -
#
# script will check the file size of the POEDIACK file in
# $LAWDIR/$PLINE/edi/in.
# If it's > 1 gig, it will send notification via email
#
#
# =========================================== #
use strict;
use POSIX qw(strftime);
# get env vars from system
my $LAWDIR = #ENV{'LAWDIR'};
my $PLINE = #ENV{'PLINE'};
#my $email_file = "/lsf10/monitors/poediack.email";
my $curr_date = strftime('%m%d%Y', localtime);
my $ack_file = "$LAWDIR" . "/$PLINE" . "/edi/in/POEDIACK";
my $ack_location = "$LAWDIR" . "/$PLINE" . "/edi/in/";
my $mv_location = "$LAWDIR" . "/$PLINE" . "/edi/in/Z_files";
my $ack_file_limit = 10;
#my $ack_file_limit = 1000000000;
my $ack_file_size;
if( -e $ack_file)
{
$ack_file_size = -s $ack_file;
if ( $ack_file_size > $ack_file_limit )
{
`compress -vf $ack_file`;
`mv $mv_location\$ack_file.Z $mv_location\$ack_file.Z.$(date +%Y%m%d%H%M%S)`;
}
}
else
{
print "POEDIACK File not found: $ack_file\n";
}
### end perl script ###
$( is being interpreted as a variable. It is the group ID of the process. You need to escape it.
And you probably shouldn't escape $ack_file.
`mv $mv_location$ack_file.Z $mv_location$ack_file.Z.\$(date +%Y%m%d%H%M%S)`;
It's safer and faster to avoid complicated shell commands and use rename instead.
use autodie;
my $timestamp = strftime('%Y%m%d%H%M%S', localtime);
rename "$mv_location$ack_file.Z", "$mv_location$ack_file.Z.$timestamp";
Or use an existing log rotator.

Flutter Web How to publish and host a site to other than a root folder

Currently i was testing flutter web with default app template
i created a new project and build web target with
`flutter build web`
put all the files in subdirectory of local server, thus i can access them from
say http://127.0.0.1:43110/1ETE7PzFgfVdJ9YBhoG2uq1g5jwZ6N9Dou/
but i was not able to load the flutter app correctly.
i was getting the below errors
Access to XMLHttpRequest at 'http://127.0.0.1:43110/assets/FontManifest.json' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Uncaught Failed to load asset at "assets/FontManifest.json" (0)
at Object.a (http://127.0.0.1:43110/1ETE7PzFgfVdJ9YBhoG2uq1g5jwZ6N9Dou/main.dart.js:3657:3)
at http://127.0.0.1:43110/1ETE7PzFgfVdJ9YBhoG2uq1g5jwZ6N9Dou/main.dart.js:15533:9
at WK.a (http://127.0.0.1:43110/1ETE7PzFgfVdJ9YBhoG2uq1g5jwZ6N9Dou/main.dart.js:5208:72)
at WK.$2 (http://127.0.0.1:43110/1ETE7PzFgfVdJ9YBhoG2uq1g5jwZ6N9Dou/main.dart.js:26450:23)
at VZ.$2 (http://127.0.0.1:43110/1ETE7PzFgfVdJ9YBhoG2uq1g5jwZ6N9Dou/main.dart.js:26445:25)
at UN.Sx (http://127.0.0.1:43110/1ETE7PzFgfVdJ9YBhoG2uq1g5jwZ6N9Dou/main.dart.js:27054:42)
at UN.Sw (http://127.0.0.1:43110/1ETE7PzFgfVdJ9YBhoG2uq1g5jwZ6N9Dou/main.dart.js:27056:32)
at fm.Qv (http://127.0.0.1:43110/1ETE7PzFgfVdJ9YBhoG2uq1g5jwZ6N9Dou/main.dart.js:26578:23)
at Tl.$0 (http://127.0.0.1:43110/1ETE7PzFgfVdJ9YBhoG2uq1g5jwZ6N9Dou/main.dart.js:26725:36)
at Object.n9 (http://127.0.0.1:43110/1ETE7PzFgfVdJ9YBhoG2uq1g5jwZ6N9Dou/main.dart.js:5324:76)
a # main.dart.js:3657
$0 # main.dart.js:27022
aec # main.dart.js:5356
aen # main.dart.js:5358
$1 # main.dart.js:26383
af9 # main.dart.js:3738
(anonymous) # main.dart.js:3746
childList (async)
$1 # main.dart.js:26390
a42 # main.dart.js:5363
nB # main.dart.js:5420
lW # main.dart.js:26656
d1 # main.dart.js:26573
nb # main.dart.js:26566
iB # main.dart.js:26567
(anonymous) # main.dart.js:3781
$1 # main.dart.js:29789
af9 # main.dart.js:3738
(anonymous) # main.dart.js:3746
error (async)
Ii # main.dart.js:29019
it # main.dart.js:29015
uz # main.dart.js:4897
yO # main.dart.js:29783
b3 # main.dart.js:7256
aae # main.dart.js:7243
(anonymous) # main.dart.js:15510
(anonymous) # main.dart.js:5208
$2 # main.dart.js:26450
a8 # main.dart.js:5194
Rn # main.dart.js:15542
ca # main.dart.js:15504
(anonymous) # main.dart.js:22768
(anonymous) # main.dart.js:5208
$2 # main.dart.js:26450
a8 # main.dart.js:5194
S9 # main.dart.js:22802
fe # main.dart.js:22762
(anonymous) # main.dart.js:6968
(anonymous) # main.dart.js:5208
$2 # main.dart.js:26450
a8 # main.dart.js:5194
Gl # main.dart.js:6970
(anonymous) # main.dart.js:6931
(anonymous) # main.dart.js:5208
$2 # main.dart.js:26450
a8 # main.dart.js:5194
nz # main.dart.js:6942
afD # main.dart.js:6919
(anonymous) # main.dart.js:13935
(anonymous) # main.dart.js:5208
$2 # main.dart.js:26450
a8 # main.dart.js:5194
Xj # main.dart.js:13946
(anonymous) # main.dart.js:50140
(anonymous) # main.dart.js:50134
dartProgram # main.dart.js:50137
(anonymous) # main.dart.js:50140
Show 26 more frames
main.dart.js:7244
GET http://127.0.0.1:43110/assets/FontManifest.json net::ERR_FAILED
Update the <base href="/"> tag in web/index.html
In your case: <base href="/1ETE7PzFgfVdJ9YBhoG2uq1g5jwZ6N9Dou/">
you should comment this line <base href="/"> on yourProjectDirectory/web/index.html
. after that run flutter build web in terminal and then copy folder yourProjectDirectory/build/web on your any directory that you want on server. it will work at the your address in browser.

How to enable auditing in postgres?

In SQL SERVER 2008/12, we can create audit log under Security Tab using audit specification as
How can we have this in postgres 9.3 ? Or how can we track and view logs in postgres 9.3?
I want to track all the statement/scripts that runs in server via our application or via editor. If possible i want to track old and new value in case of update.
UPDATE I changed my postgresql.conf as below
BUT I am unable to see logs in pg_log folder.
ALSO I tried to create extension CREATE EXTENSION pg_stat_statements;
and tried
SELECT * FROM pg_stat_statements;
and it says
pg_stat_statements must be loaded via shared_preload_libraries
#------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------
# - Where to Log -
log_destination = 'stderr' # Valid values are combinations of
# stderr, csvlog, syslog, and eventlog,
# depending on platform. csvlog
# requires logging_collector to be on.
# This is used when logging to stderr:
logging_collector = on # Enable capturing of stderr and csvlog
# into log files. Required to be on for
# csvlogs.
# (change requires restart)
# These are only used if logging_collector is on:
log_directory = 'pg_log' # directory where log files are written,
# can be absolute or relative to PGDATA
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,
# can include strftime() escapes
log_file_mode = 0600 # creation mode for log files,
# begin with 0 to use octal notation
#log_truncate_on_rotation = off # If on, an existing log file with the
# same name as the new log file will be
# truncated rather than appended to.
# But such truncation only occurs on
# time-driven rotation, not on restarts
# or size-driven rotation. Default is
# off, meaning append to existing files
# in all cases.
#log_rotation_age = 1d # Automatic rotation of logfiles will
# happen after that time. 0 disables.
#log_rotation_size = 10MB # Automatic rotation of logfiles will
# happen after that much log output.
# 0 disables.
# These are relevant when logging to syslog:
#syslog_facility = 'LOCAL0'
#syslog_ident = 'postgres'
# This is only relevant when logging to eventlog (win32):
#event_source = 'PostgreSQL'
# - When to Log -
#client_min_messages = notice # values in order of decreasing detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# log
# notice
# warning
# error
#log_min_messages = warning # values in order of decreasing detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# info
# notice
# warning
# error
# log
# fatal
# panic
#log_min_error_statement = error # values in order of decreasing detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# info
# notice
# warning
# error
# log
# fatal
# panic (effectively off)
#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
# and their durations, > 0 logs only
# statements running at least this number
# of milliseconds
# - What to Log -
#debug_print_parse = off
#debug_print_rewritten = off
#debug_print_plan = off
#debug_pretty_print = on
#log_checkpoints = off
#log_connections = off
#log_disconnections = off
#log_duration = off
#log_error_verbosity = default # terse, default, or verbose messages
#log_hostname = off
log_line_prefix = '%t ' # special values:
# %a = application name
# %u = user name
# %d = database name
# %r = remote host and port
# %h = remote host
# %p = process ID
# %t = timestamp without milliseconds
# %m = timestamp with milliseconds
# %i = command tag
# %e = SQL state
# %c = session ID
# %l = session line number
# %s = session start timestamp
# %v = virtual transaction ID
# %x = transaction ID (0 if none)
# %q = stop here in non-session
# processes
# %% = '%'
# e.g. '<%u%%%d> '
#log_lock_waits = off # log lock waits >= deadlock_timeout
log_statement = 'all' # none, ddl, mod, all
#log_temp_files = -1 # log temporary files equal or larger
# than the specified size in kilobytes;
# -1 disables, 0 logs all temp files
UPDATE
# - What to Log -
#debug_print_parse = off
#debug_print_rewritten = off
#debug_print_plan = off
#debug_pretty_print = on
#log_checkpoints = off
#log_connections = off
#log_disconnections = off
#log_duration = off
#log_error_verbosity = default # terse, default, or verbose messages
#log_hostname = off
log_line_prefix = '%t ' # special values:
# %a = application name
# %u = user name
# %d = database name
# %r = remote host and port
# %h = remote host
# %p = process ID
# %t = timestamp without milliseconds
# %m = timestamp with milliseconds
# %i = command tag
# %e = SQL state
# %c = session ID
# %l = session line number
# %s = session start timestamp
# %v = virtual transaction ID
# %x = transaction ID (0 if none)
# %q = stop here in non-session
# processes
# %% = '%'
# e.g. '<%u%%%d> '
#log_lock_waits = off # log lock waits >= deadlock_timeout
#log_statement = 'none' # none, ddl, mod, all
#log_temp_files = -1 # log temporary files equal or larger
# than the specified size in kilobytes;
# -1 disables, 0 logs all temp files
log_timezone = 'Asia/Katmandu'
#------------------------------------------------------------------------------
# RUNTIME STATISTICS
#------------------------------------------------------------------------------
# - Query/Index Statistics Collector -
#track_activities = on
#track_counts = on
#track_io_timing = off
#track_functions = none # none, pl, all
#track_activity_query_size = 1024 # (change requires restart)
#update_process_title = on
#stats_temp_directory = 'pg_stat_tmp'
# - Statistics Monitoring -
#log_parser_stats = off
#log_planner_stats = off
#log_executor_stats = off
#log_statement_stats = off
#------------------------------------------------------------------------------
# WRITE AHEAD LOG
#------------------------------------------------------------------------------
# - Settings -
#wal_level = minimal # minimal, archive, or hot_standby
# (change requires restart)
#fsync = on # turns forced synchronization on or off
#synchronous_commit = on # synchronization level;
# off, local, remote_write, or on
#wal_sync_method = fsync # the default is the first option
# supported by the operating system:
# open_datasync
# fdatasync (default on Linux)
# fsync
# fsync_writethrough
# open_sync
#full_page_writes = on # recover from partial page writes
#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers
# (change requires restart)
#wal_writer_delay = 200ms # 1-10000 milliseconds
#commit_delay = 0 # range 0-100000, in microseconds
#commit_siblings = 5 # range 1-1000
# - Checkpoints -
#checkpoint_segments = 3 # in logfile segments, min 1, 16MB each
#checkpoint_timeout = 5min # range 30s-1h
#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
#checkpoint_warning = 30s # 0 disables
# - Archiving -
#archive_mode = off # allows archiving to be done
# (change requires restart)
#archive_command = '' # command to use to archive a logfile segment
# placeholders: %p = path of file to archive
# %f = file name only
# e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'
#archive_timeout = 0 # force a logfile segment switch after this
# number of seconds; 0 disables

'run' phase is ready to proceed to the 'extract' phase

I am trying to run a couple of test cases using script.But I am getting an error message after running the first test case.This stops the simulation.I am attaching the LOG with this mail.I don't understand why this is happening.
I checked previous posts and added +UVM_OBJECTION_TRACE in the vsim command.But I am not able to find out the cause of the error.Can anybody help me??
# UVM_INFO # 0: run [OBJTN_TRC] Object uvm_test_top raised 1 objection(s): count=1 total=1
# UVM_INFO # 0: run [OBJTN_TRC] Object uvm_top added 1 objection(s) to its total (raised from source object uvm_test_top): count=0 total=1
# AT TIME=0,APB MASTER IN RESET MODE
# AT TIME=1200000,APB MASTER IN ACTIVE MODE
# AT TIME=45400000,*************************** EXPECTED_DATA=1792474624,RECEIVED DATA=1792474624
# AT TIME=186600000,*************************** EXPECTED_DATA=222,RECEIVED DATA=222
# AT TIME=231800000,*************************** EXPECTED_DATA=1504340502,RECEIVED DATA=1504340502
# AT TIME=349000000,*************************** EXPECTED_DATA=2367782205,RECEIVED DATA=2367782205
# UVM_INFO Test_Cases/my_test.sv(40) # 349000000: uvm_test_top [root objections]
# The total objection count is 1
# ---------------------------------------------------------
# Source Total
# Count Count Object
# ---------------------------------------------------------
# 0 1 uvm_top
# 1 1 uvm_test_top
# ---------------------------------------------------------
#
# UVM_INFO Test_Cases/my_test.sv(43) # 349000000: uvm_test_top [my_component objections]
# The total objection count is 1
# ---------------------------------------------------------
# Source Total
# Count Count Object
# ---------------------------------------------------------
# 1 1 uvm_test_top
# ---------------------------------------------------------
#
# UVM_INFO # 349000000: run [OBJTN_TRC] Object uvm_test_top dropped 1 objection(s): count=0 total=0
# UVM_INFO # 349000000: run [OBJTN_TRC] Object uvm_test_top all_dropped 1 objection(s): count=0 total=0
# UVM_INFO # 349000000: run [OBJTN_TRC] Object uvm_top subtracted 1 objection(s) from its total (dropped from source object uvm_test_top): count=0 total=0
# UVM_INFO # 349000000: run [OBJTN_TRC] Object uvm_top subtracted 1 objection(s) from its total (all_dropped from source object uvm_test_top): count=0 total=0
# UVM_INFO verilog_src/uvm-1.1d/src/base/uvm_objection.svh(1268) # 349000000: reporter [TEST_DONE] 'run' phase is ready to proceed to the 'extract' phase
#
# --- UVM Report Summary ---
#
# ** Report counts by severity
# UVM_INFO : 12
# UVM_WARNING : 0
# UVM_ERROR : 0
# UVM_FATAL : 0
# ** Report counts by id
# [OBJTN_TRC] 6
# [Questa UVM] 2
# [RNTST] 1
# [TEST_DONE] 1
# [my_component objections] 1
# [root objections] 1
# ** Note: $finish : C:/questasim_10.2c/win32/../verilog_src/uvm-1.1d/src/base/uvm_root.svh(430)
# Time: 349 us Iteration: 68 Instance: /my_top
# 1
# Break in Task uvm_pkg/uvm_root::run_test at C:/questasim_10.2c/win32/../verilog_src/uvm-1.1d/src/base/uvm_root.svh line 430
# Simulation Breakpoint: 1
# Break in Task uvm_pkg/uvm_root::run_test at C:/questasim_10.2c/win32/../verilog_src/uvm-1.1d/src/base/uvm_root.svh line 430
# MACRO ./run_do PAUSED at line 18
Comment on this question
I am not sure about what script your are talking about. But it looks like you do not quit vsim. Try quit in your do file.

how to authenticate OTRS users via ldap (Active Directory Windows Server 2003)

I have just finish installation of OTRS-3.2.10-02.noarch.rpm and now I am trying to connect it to Windows Server 2003 SP2 based Active Directory (LDAP). Here is the contents of my configuration (from /opt/otrs/Kernel/Config.pm):
# --
# Kernel/Config.pm - Config file for OTRS kernel
# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
# Note:
#
# -->> Most OTRS configuration should be done via the OTRS web interface
# and the SysConfig. Only for some configuration, such as database
# credentials and customer data source changes, you should edit this
# file. For changes do customer data sources you can copy the definitions
# from Kernel/Config/Defaults.pm and paste them in this file.
# Config.pm will not be overwritten when updating OTRS.
# --
package Kernel::Config;
use strict;
use warnings;
use utf8;
sub Load {
my $Self = shift;
# ---------------------------------------------------- #
# database settings #
# ---------------------------------------------------- #
# The database host
$Self->{'DatabaseHost'} = 'localhost';
# The database name
$Self->{'Database'} = 'otrs';
# The database user
$Self->{'DatabaseUser'} = 'otrsadmin';
# The password of database user. You also can use bin/otrs.CryptPassword.pl
# for crypted passwords
$Self->{'DatabasePw'} = '76ynhi0r';
# The database DSN for MySQL ==> more: "perldoc DBD::mysql"
$Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";
# The database DSN for PostgreSQL ==> more: "perldoc DBD::Pg"
# if you want to use a local socket connection
# $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";
# if you want to use a TCP/IP connection
# $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";
# if you have PostgresSQL 8.1 or earlier, activate the legacy driver with this line:
# $Self->{DatabasePostgresqlBefore82} = 1;
# The database DSN for Microsoft SQL Server - only supported if OTRS is
# installed on Windows as well
# $Self->{DatabaseDSN} = "DBI:ODBC:driver={SQL Server};Database=$Self->{Database};Server=$Self->{DatabaseHost},1433";
# The database DSN for Oracle ==> more: "perldoc DBD::oracle"
# $ENV{ORACLE_HOME} = '/u01/app/oracle/product/10.2.0/client_1';
# $ENV{NLS_DATE_FORMAT} = 'YYYY-MM-DD HH24:MI:SS';
# $ENV{NLS_LANG} = "american_america.utf8";
# $Self->{DatabaseDSN} = "DBI:Oracle:sid=OTRS;host=$Self->{DatabaseHost};port=1522;";
# ---------------------------------------------------- #
# fs root directory
# ---------------------------------------------------- #
$Self->{Home} = '/opt/otrs';
# ---------------------------------------------------- #
# insert your own config settings "here" #
# config settings taken from Kernel/Config/Defaults.pm #
# ---------------------------------------------------- #
# $Self->{SessionUseCookie} = 0;
# $Self->{CheckMXRecord} = 0;
# ---------------------------------------------------- #
# ---------------------------------------------------- #
# data inserted by installer #
# ---------------------------------------------------- #
$DIBI$
# This is an example configuration for an LDAP auth. backend.
# (take care that Net::LDAP is installed!)
$Self->{AuthModule1} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host1'} = '192.168.10.10';
$Self->{'AuthModule::LDAP::BaseDN1'} = 'dc=mydomain,dc=com, dc=pk';
$Self->{'AuthModule::LDAP::UID1'} = 'sAMAccountName';
# The following is valid but would only be necessary if the
# anonymous user do NOT have permission to read from the LDAP tree
$Self->{'AuthModule::LDAP::SearchUserDN1'} = 'CN=otrs search,OU=Users,OU=MACPAK,DC=mydomain,DC=com,DC=pk';
$Self->{'AuthModule::LDAP::SearchUserPw1'} = '76Ynhi0r';
# In case you need to use OTRS in iso-charset, you can define this
# by using this option (converts utf-8 data from LDAP to iso).
# $Self->{'AuthModule::LDAP::Charset'} = 'iso-8859-1';
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
$Self->{'AuthModule::LDAP::Params'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
};
# --------------------------------------------------- #
# authentication sync settings #
# (enable agent data sync. after succsessful #
# authentication) #
# --------------------------------------------------- #
# This is an example configuration for an LDAP auth sync. backend.
# (take care that Net::LDAP is installed!)
$Self->{AuthSyncModule1} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host1'} = '192.168.10.10';
$Self->{'AuthSyncModule::LDAP::BaseDN1'} = 'dc=mydomain,dc=com,dc=pk';
$Self->{'AuthSyncModule::LDAP::UID1'} = 'sAMAccountName';
# The following is valid but would only be necessary if the
# anonymous user do NOT have permission to read from the LDAP tree
$Self->{'AuthSyncModule::LDAP::SearchUserDN1'} = 'CN=otrs search,OU=Users,OU=MACPAK,DC=mydomain,DC=com,DC=pk';
$Self->{'AuthSyncModule::LDAP::SearchUserPw1'} = '76Ynhi0r';
# AuthSyncModule::LDAP::UserSyncMap
# (map if agent should create/synced from LDAP to DB after successful login)
$Self->{'AuthSyncModule::LDAP::UserSyncMap1'} = {
# DB -> LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
};
# In case you need to use OTRS in iso-charset, you can define this
# by using this option (converts utf-8 data from LDAP to iso).
# $Self->{'AuthSyncModule::LDAP::Charset'} = 'iso-8859-1';
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
# $Self->{'AuthSyncModule::LDAP::Params'} = {
# port => 389,
# timeout => 120,
# async => 0,
# version => 3,
# };
#Enable LDAP authentication for Customers / Users
$Self->{'Customer::AuthModule2'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host2'} = '192.168.10.10';
$Self->{'Customer::AuthModule::LDAP::BaseDN2'} = 'dc=mydomain,dc=com,dc=pk';
$Self->{'Customer::AuthModule::LDAP::UID2'} = 'sAMAccountName';
#The following is valid but would only be necessary if the
#anonymous user do NOT have permission to read from the LDAP tree
$Self->{'Customer::AuthModule::LDAP::SearchUserDN2'} = 'CN=otrs search,OU=Users,OU=MACPAK,DC=mydomain,DC=com,DC=pk';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw2'} = '76Ynhi0r';
#CustomerUser
#(customer user database backend and settings)
$Self->{CustomerUser} = {
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => '192.168.10.10',
BaseDN => 'dc=mydomain,dc=com,dc=pk,
SSCOPE => 'sub',
UserDN =>'CN=otrs search,OU=Users,OU=MACPAK,DC=mydomain,DC=com,DC=pk',
UserPw => '76Ynhi0r',
},
# customer unique id
CustomerKey => 'sAMAccountName',
# customer #
CustomerID => 'mail',
CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown, required, storage-type
#[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
[ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
#[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
#[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
],
};
#Add the following lines when only users are allowed to login if they reside in the spicified security group
#Remove these lines if you want to provide login to all users specified in the User Base DN
#example: $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'ou=BaseOU, dc=example, dc=com';
$Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'CN=otrs search,OU=Users,OU=MACPAK,DC=mydomain,DC=com,DC=pk';
$Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'memberUid';
$Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'UID'
# Die if backend can't work, e. g. can't connect to server.
# $Self->{'AuthSyncModule::LDAP::Die'} = 1;
# Die if backend can't work, e. g. can't connect to server.
# $Self->{'AuthModule::LDAP::Die'} = 1;
# ---------------------------------------------------- #
# ---------------------------------------------------- #
# #
# end of your own config options!!! #
# #
# ---------------------------------------------------- #
# ---------------------------------------------------- #
}
# ---------------------------------------------------- #
# needed system stuff (don't edit this) #
# ---------------------------------------------------- #
use strict;
use warnings;
use vars qw(#ISA);
use Kernel::Config::Defaults;
push (#ISA, 'Kernel::Config::Defaults');
# -----------------------------------------------------#;
1;
After this, I am no more able to connect my orts with http://192.168.10.15/otrs/index.pl and when use
cat /var/log/httpd/error_log | tail
its output is ;
[root#macpk-manage ~]# cat /var/log/httpd/error_log | tail
[Fri Aug 30 21:55:36 2013] Config.pm: (Missing operator before $;?)
[Fri Aug 30 21:55:36 2013] Config.pm: Scalar found where operator expected at /opt/otrs//Kernel/Config.pm line 89, near "$;
[Fri Aug 30 21:55:36 2013] Config.pm:
[Fri Aug 30 21:55:36 2013] Config.pm: # This is an example configuration for an LDAP auth. backend.
[Fri Aug 30 21:55:36 2013] Config.pm: # (take care that Net::LDAP is installed!)
[Fri Aug 30 21:55:36 2013] Config.pm:
[Fri Aug 30 21:55:36 2013] Config.pm: $Self"
[Fri Aug 30 21:55:36 2013] Config.pm: (Missing operator before $Self?)
[Fri Aug 30 21:55:36 2013] [error] Illegal declaration of subroutine Kernel::Config:: at /opt/otrs//Kernel/Config.pm line 176.\nCompilation failed in require at /opt/otrs/scripts/apache2-perl-startup.pl line 68.\nBEGIN failed--compilation aborted at /opt/otrs/scripts/apache2-perl-startup.pl line 68.\nCompilation failed in require at (eval 2) line 1.\n
[Fri Aug 30 21:55:36 2013] [error] Can't load Perl file: /opt/otrs/scripts/apache2-perl-startup.pl for server macpk-manage.macrosoftinc.com.pk:80, exiting...
I also tried to restart httpd service but it fails and when even I restart CentOS 6.4, it shows httpd Failed to run, Aanyhelp will be highly appreciated and thanks in advance;
There's a missing quote after BaseDN, see this:
- BaseDN => 'dc=mydomain,dc=com,dc=pk,
+ BaseDN => 'dc=mydomain,dc=com,dc=pk',
https://gist.github.com/mbeijen/72a15954b601eaaae797/revisions
If you want to make sure you balanced your quotes and such correctly, you can type on the command line perl -cw Kernel/Config.pm
You need to comment out the following line:
$DIBI$
and also add this:
$Self->{'DefaultCharset'} = 'utf-8';
I think you need to check this two line with your domin.local
UserDN =>'CN=otrs search,OU=Users,OU=MACPAK,DC=mydomain,DC=com,DC=pk',
UserPw => '76Ynhi0r',