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

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.

Related

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

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.

can't find the error in my postgresql.conf

im using pgfouine 1.2 for postgres 9.6 on windows 7 i keep getting this error when trying to analyse my log file and generate report ,
“pgfouine did not find any valid postgresql log line in your log file “
Here is my postgresql.conf file :
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The "=" is optional.) Whitespace may be used. Comments are introduced with
# "#" anywhere on a line. The complete list of parameter names and allowed
# values can be found in the PostgreSQL documentation.
#
# The commented-out settings shown in this file represent the default values.
# Re-commenting a setting is NOT sufficient to revert it to the default value;
# you need to reload the server.
#
# This file is read on server startup and when the server receives a SIGHUP
# signal. If you edit the file on a running system, you have to SIGHUP the
# server for the changes to take effect, or use "pg_ctl reload". Some
# parameters, which are marked below, require a server shutdown and restart to
# take effect.
#
# Any parameter can also be given as a command-line option to the server, e.g.,
# "postgres -c log_connections=on". Some parameters can be changed at run time
# with the "SET" SQL command.
#
# Memory units: kB = kilobytes Time units: ms = milliseconds
# MB = megabytes s = seconds
# GB = gigabytes min = minutes
# TB = terabytes h = hours
# d = days
#------------------------------------------------------------------------------
# FILE LOCATIONS
#------------------------------------------------------------------------------
# The default values of these variables are driven from the -D command-line
# option or PGDATA environment variable, represented here as ConfigDir.
#data_directory = 'ConfigDir' # use data in another directory
# (change requires restart)
#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file
# (change requires restart)
#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
#external_pid_file = '' # write an extra PID file
# (change requires restart)
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
# - Connection Settings -
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)
#superuser_reserved_connections = 3 # (change requires restart)
#unix_socket_directories = '' # comma-separated list of directories
# (change requires restart)
#unix_socket_group = '' # (change requires restart)
#unix_socket_permissions = 0777 # begin with 0 to use octal notation
# (change requires restart)
#bonjour = off # advertise server via Bonjour
# (change requires restart)
#bonjour_name = '' # defaults to the computer name
# (change requires restart)
# - Security and Authentication -
#authentication_timeout = 1min # 1s-600s
#ssl = off # (change requires restart)
#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers
# (change requires restart)
#ssl_prefer_server_ciphers = on # (change requires restart)
#ssl_ecdh_curve = 'prime256v1' # (change requires restart)
#ssl_cert_file = 'server.crt' # (change requires restart)
#ssl_key_file = 'server.key' # (change requires restart)
#ssl_ca_file = '' # (change requires restart)
#ssl_crl_file = '' # (change requires restart)
#password_encryption = on
#db_user_namespace = off
#row_security = on
# GSSAPI using Kerberos
#krb_server_keyfile = ''
#krb_caseins_users = off
# - TCP Keepalives -
# see "man 7 tcp" for details
#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
# 0 selects the system default
#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
# 0 selects the system default
#tcp_keepalives_count = 0 # TCP_KEEPCNT;
# 0 selects the system default
#------------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#------------------------------------------------------------------------------
# - Memory -
shared_buffers = 128MB # min 128kB
# (change requires restart)
#huge_pages = try # on, off, or try
# (change requires restart)
#temp_buffers = 8MB # min 800kB
#max_prepared_transactions = 0 # zero disables the feature
# (change requires restart)
# Caution: it is not advisable to set max_prepared_transactions nonzero unless
# you actively intend to use prepared transactions.
#work_mem = 4MB # min 64kB
#maintenance_work_mem = 64MB # min 1MB
#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem
#max_stack_depth = 2MB # min 100kB
dynamic_shared_memory_type = windows # the default is the first option
# supported by the operating system:
# posix
# sysv
# windows
# mmap
# use none to disable dynamic shared memory
# - Disk -
#temp_file_limit = -1 # limits per-session temp file space
# in kB, or -1 for no limit
# - Kernel Resource Usage -
#max_files_per_process = 1000 # min 25
# (change requires restart)
#shared_preload_libraries = '' # (change requires restart)
# - Cost-Based Vacuum Delay -
#vacuum_cost_delay = 0 # 0-100 milliseconds
#vacuum_cost_page_hit = 1 # 0-10000 credits
#vacuum_cost_page_miss = 10 # 0-10000 credits
#vacuum_cost_page_dirty = 20 # 0-10000 credits
#vacuum_cost_limit = 200 # 1-10000 credits
# - Background Writer -
#bgwriter_delay = 200ms # 10-10000ms between rounds
#bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round
#bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round
# - Asynchronous Behavior -
#effective_io_concurrency = 0 # 1-1000; 0 disables prefetching
#max_worker_processes = 8
#------------------------------------------------------------------------------
# WRITE AHEAD LOG
#------------------------------------------------------------------------------
# - Settings -
#wal_level = minimal # minimal, archive, hot_standby, or logical
# (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_compression = off # enable compression of full-page writes
#wal_log_hints = off # also do full page writes of non-critical updates
# (change requires restart)
#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_timeout = 5min # range 30s-1h
#max_wal_size = 1GB
#min_wal_size = 80MB
#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
#checkpoint_warning = 30s # 0 disables
# - Archiving -
#archive_mode = off # enables archiving; off, on, or always
# (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
#------------------------------------------------------------------------------
# REPLICATION
#------------------------------------------------------------------------------
# - Sending Server(s) -
# Set these on the master and on any standby that will send replication data.
#max_wal_senders = 0 # max number of walsender processes
# (change requires restart)
#wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables
#wal_sender_timeout = 60s # in milliseconds; 0 disables
#max_replication_slots = 0 # max number of replication slots
# (change requires restart)
#track_commit_timestamp = off # collect timestamp of transaction commit
# (change requires restart)
# - Master Server -
# These settings are ignored on a standby server.
#synchronous_standby_names = '' # standby servers that provide sync rep
# comma-separated list of application_name
# from standby(s); '*' = all
#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed
# - Standby Servers -
# These settings are ignored on a master server.
#hot_standby = off # "on" allows queries during recovery
# (change requires restart)
#max_standby_archive_delay = 30s # max delay before canceling queries
# when reading WAL from archive;
# -1 allows indefinite delay
#max_standby_streaming_delay = 30s # max delay before canceling queries
# when reading streaming WAL;
# -1 allows indefinite delay
#wal_receiver_status_interval = 10s # send replies at least this often
# 0 disables
#hot_standby_feedback = off # send info from standby to prevent
# query conflicts
#wal_receiver_timeout = 60s # time that receiver waits for
# communication from master
# in milliseconds; 0 disables
#wal_retrieve_retry_interval = 5s # time to wait before retrying to
# retrieve WAL after a failed attempt
#------------------------------------------------------------------------------
# QUERY TUNING
#------------------------------------------------------------------------------
# - Planner Method Configuration -
#enable_bitmapscan = on
#enable_hashagg = on
#enable_hashjoin = on
#enable_indexscan = on
#enable_indexonlyscan = on
#enable_material = on
#enable_mergejoin = on
#enable_nestloop = on
#enable_seqscan = on
#enable_sort = on
#enable_tidscan = on
# - Planner Cost Constants -
#seq_page_cost = 1.0 # measured on an arbitrary scale
#random_page_cost = 4.0 # same scale as above
#cpu_tuple_cost = 0.01 # same scale as above
#cpu_index_tuple_cost = 0.005 # same scale as above
#cpu_operator_cost = 0.0025 # same scale as above
#effective_cache_size = 4GB
# - Genetic Query Optimizer -
#geqo = on
#geqo_threshold = 12
#geqo_effort = 5 # range 1-10
#geqo_pool_size = 0 # selects default based on effort
#geqo_generations = 0 # selects default based on effort
#geqo_selection_bias = 2.0 # range 1.5-2.0
#geqo_seed = 0.0 # range 0.0-1.0
# - Other Planner Options -
#default_statistics_target = 100 # range 1-10000
#constraint_exclusion = partition # on, off, or partition
#cursor_tuple_fraction = 0.1 # range 0.0-1.0
#from_collapse_limit = 8
#join_collapse_limit = 8 # 1 disables collapsing of explicit
# JOIN clauses
#------------------------------------------------------------------------------
# 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 = 0 # -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 = on
log_disconnections = off
log_duration = on
log_error_verbosity = default # terse, default, or verbose messages
log_hostname = off
log_line_prefix = '%t [%p]: [%l-1] ' # 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_replication_commands = off
log_temp_files = 0 # log temporary files equal or larger
# than the specified size in kilobytes;
# -1 disables, 0 logs all temp files
log_timezone = 'Europe/Brussels'
# - Process Title -
#cluster_name = '' # added to process titles if nonempty
# (change requires restart)
#update_process_title = on
#------------------------------------------------------------------------------
# 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)
#stats_temp_directory = 'pg_stat_tmp'
# - Statistics Monitoring -
#log_parser_stats = off
#log_planner_stats = off
#log_executor_stats = off
#log_statement_stats = off
#------------------------------------------------------------------------------
# AUTOVACUUM PARAMETERS
#------------------------------------------------------------------------------
#autovacuum = on # Enable autovacuum subprocess? 'on'
# requires track_counts to also be on.
#log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and
# their durations, > 0 logs only
# actions running at least this number
# of milliseconds.
#autovacuum_max_workers = 3 # max number of autovacuum subprocesses
# (change requires restart)
#autovacuum_naptime = 1min # time between autovacuum runs
#autovacuum_vacuum_threshold = 50 # min number of row updates before
# vacuum
#autovacuum_analyze_threshold = 50 # min number of row updates before
# analyze
#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum
#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
# (change requires restart)
#autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age
# before forced vacuum
# (change requires restart)
#autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for
# autovacuum, in milliseconds;
# -1 means use vacuum_cost_delay
#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
# autovacuum, -1 means use
# vacuum_cost_limit
#------------------------------------------------------------------------------
# CLIENT CONNECTION DEFAULTS
#------------------------------------------------------------------------------
# - Statement Behavior -
#search_path = '"$user", public' # schema names
#default_tablespace = '' # a tablespace name, '' uses the default
#temp_tablespaces = '' # a list of tablespace names, '' uses
# only default tablespace
#check_function_bodies = on
#default_transaction_isolation = 'read committed'
#default_transaction_read_only = off
#default_transaction_deferrable = off
#session_replication_role = 'origin'
#statement_timeout = 0 # in milliseconds, 0 is disabled
#lock_timeout = 0 # in milliseconds, 0 is disabled
#vacuum_freeze_min_age = 50000000
#vacuum_freeze_table_age = 150000000
#vacuum_multixact_freeze_min_age = 5000000
#vacuum_multixact_freeze_table_age = 150000000
#bytea_output = 'hex' # hex, escape
#xmlbinary = 'base64'
#xmloption = 'content'
#gin_fuzzy_search_limit = 0
#gin_pending_list_limit = 4MB
# - Locale and Formatting -
datestyle = 'iso, dmy'
#intervalstyle = 'postgres'
timezone = 'Europe/Brussels'
#timezone_abbreviations = 'Default' # Select the set of available time zone
# abbreviations. Currently, there are
# Default
# Australia (historical usage)
# India
# You can create your own file in
# share/timezonesets/.
#extra_float_digits = 0 # min -15, max 3
#client_encoding = sql_ascii # actually, defaults to database
# encoding
# These settings are initialized by initdb, but they can be changed.
lc_messages = 'French_France.1252' # locale for system error message
# strings
lc_monetary = 'C' # locale for monetary formatting
lc_numeric = 'C' # locale for number formatting
lc_time = 'C' # locale for time formatting
# default configuration for text search
default_text_search_config = 'pg_catalog.french'
# - Other Defaults -
#dynamic_library_path = '$libdir'
#local_preload_libraries = ''
#session_preload_libraries = ''
#------------------------------------------------------------------------------
# LOCK MANAGEMENT
#------------------------------------------------------------------------------
#deadlock_timeout = 1s
#max_locks_per_transaction = 64 # min 10
# (change requires restart)
#max_pred_locks_per_transaction = 64 # min 10
# (change requires restart)
#------------------------------------------------------------------------------
# VERSION/PLATFORM COMPATIBILITY
#------------------------------------------------------------------------------
# - Previous PostgreSQL Versions -
#array_nulls = on
#backslash_quote = safe_encoding # on, off, or safe_encoding
#default_with_oids = off
#escape_string_warning = on
#lo_compat_privileges = off
#operator_precedence_warning = off
#quote_all_identifiers = off
#sql_inheritance = on
#standard_conforming_strings = on
#synchronize_seqscans = on
# - Other Platforms and Clients -
#transform_null_equals = off
#------------------------------------------------------------------------------
# ERROR HANDLING
#------------------------------------------------------------------------------
#exit_on_error = off # terminate session on any error?
#restart_after_crash = on # reinitialize after backend crash?
#------------------------------------------------------------------------------
# CONFIG FILE INCLUDES
#------------------------------------------------------------------------------
# These options allow settings to be loaded from files other than the
# default postgresql.conf.
#include_dir = 'conf.d' # include files ending in '.conf' from
# directory 'conf.d'
#include_if_exists = 'exists.conf' # include file only if it exists
#include = 'special.conf' # include file
#------------------------------------------------------------------------------
# CUSTOMIZED OPTIONS
#------------------------------------------------------------------------------
# Add settings for extensions here
Im using stderr as a destination , can”t find the error please help .
Thanks

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',