log-append not working

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
kanaloso
OpenVpn Newbie
Posts: 1
Joined: Thu Sep 22, 2016 11:39 am

log-append not working

Post by kanaloso » Thu Sep 22, 2016 11:41 am

It appears that "log-append" is not working on my Ubuntu 16.04.01 server. The file is not even being created. Even when I create (touch) it manually, no log is being written there. I've already tried chmod 777 -> no luck

Code: Select all

port 1194
proto tcp-server
mode server
dev tap0
comp-lzo
duplicate-cn

ifconfig 10.0.16.1 255.255.255.0
ifconfig-pool 10.0.16.2 10.0.6.240

tls-server
ca keys/ca.crt
cert keys/server.crt
key keys/server.key
dh keys/dh1024.pem
reneg-sec 604800 # renegotiate session after 7 day (default: 1 h)

verb 3
keepalive 10 120
daemon
log-append /tmp/openvpn.log

push "ping 10"
push "ping-restart 60"
push "ping-timer-rem"
OpenVPN version (from the Ubuntu repos):

Code: Select all

$ openvpn --version
OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Feb  2 2016
library versions: OpenSSL 1.0.2g-fips  1 Mar 2016, LZO 2.08
Originally developed by James Yonan
Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
Compile time defines: enable_crypto=yes enable_crypto_ofb_cfb=yes enable_debug=yes enable_def_auth=yes enable_dependency_tracking=no enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_fast_install=yes enable_fragment=yes enable_http_proxy=yes enable_iproute2=yes enable_libtool_lock=yes enable_lzo=yes enable_lzo_stub=no enable_maintainer_mode=no enable_management=yes enable_multi=yes enable_multihome=yes enable_pam_dlopen=no enable_password_save=yes enable_pedantic=no enable_pf=yes enable_pkcs11=yes enable_plugin_auth_pam=yes enable_plugin_down_root=yes enable_plugins=yes enable_port_share=yes enable_selinux=no enable_server=yes enable_shared=yes enable_shared_with_static_runtimes=no enable_silent_rules=no enable_small=no enable_socks=yes enable_ssl=yes enable_static=yes enable_strict=no enable_strict_options=no enable_systemd=yes enable_win32_dll=yes enable_x509_alt_username=yes with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no with_plugindir='${prefix}/lib/openvpn' with_sysroot=no
Any idea why this isn't working?
It's hard for me to debug OpenVPN problems with no longs :-/

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: log-append not working

Post by TinCanTech » Thu Sep 22, 2016 1:09 pm

For now, the best thing to do is:

Code: Select all

log-append /etc/openvpn/temp/tcp-server.log
I believe the problem is related to --daemon but I am awaiting confirmation.

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: log-append not working

Post by TinCanTech » Thu Sep 22, 2016 2:17 pm

In fact, this is most likely due to using PrivateTmp=True in your openvpn unit file.

Ref: https://sourceforge.net/p/openvpn/mailm ... /35385193/

Post Reply