Friday, July 1, 2022

Recent Questions - Server Fault

Recent Questions - Server Fault


Rebuild installed nginx (openresty) with extra module

Posted: 01 Jul 2022 06:15 PM PDT

I have an Openresty installation with the following configure settings:

$ openresty -V 2>&1

nginx version: openresty/1.17.8.1  built by gcc 9.3.0 (Ubuntu 9.3.0-10ubuntu2)   built with OpenSSL 1.1.1f  31 Mar 2020  TLS SNI support enabled  

Wrapped argument list for better readability:

configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt=-O2 --add-module=../ngx_devel_kit-0.3.1 --add-module=../echo-nginx-module-0.62 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.32 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.08 --add-module=../srcache-nginx-module-0.32 --add-module=../ngx_lua-0.10.17 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.15 --add-module=../rds-csv-nginx-module-0.09 --add-module=../ngx_stream_lua-0.0.8 --with-ld-opt=-Wl,-rpath,/usr/local/openresty/luajit/lib --with-http_ssl_module --with-pcre-jit --with-ipv6 --with-http_v2_module --add-module=/home/ubuntu/incubator-pagespeed-ngx-1.13.35.2-stable --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module

I tried to simply copy all arguments and add --with-http_stub_status_module at the end (the extra module I want to add), and got the following error:

 + ngx_stream_lua_module was configured  adding module in /home/ubuntu/openresty-1.17.8.1/../ngx_devel_kit-0.3.1  ./configure: error: no /home/ubuntu/openresty-1.17.8.1/../ngx_devel_kit-0.3.1/config was found  ERROR: failed to run command: sh ./configure --prefix=/usr/local/openresty/nginx/nginx \...  ubuntu@ip-172-31-43-162:~/openresty-1.17.8.1$ openresty -V 2>&1  

The bottomline is: I need to install --with-http_stub_status_module and I want to do it the safest way without breaking anything.

Thanks!

Cloud DNS setup correctly, but when trying to login to wp-admin, it will route to ip address

Posted: 01 Jul 2022 04:46 PM PDT

Cloud DNS setup correctly, dig +trace swisstar.com.tw received 60 bytes in 50 ms, but when trying to login to wp-admin, it will route to ip address.

Any suggestion where I should look into?

Thanks

Dynamic NVM node path for service unit file

Posted: 01 Jul 2022 04:42 PM PDT

I recently migrated from using node installed on my Ubuntu server to using NVM to manage my node, but the issue is the application I use on this server uses a .service file that executes with the path of the locally installed node, usr/bin/node. I have fixed this configuration by using the NVM path, but the issue with this is that the server node version can change (e.g. when updating my application with a newer node version). Because of this is there a good way to either symlink or insert some dynamic insertion as a part of the path?

Line:

ExecStart=/home/ghost-mgr/.nvm/versions/node/v14.17.0/bin/node /usr/bin/ghost r$  

Full File:

[Service]  Type=simple  WorkingDirectory=/var/www/ghost  User=999  Environment="NODE_ENV=production"  ExecStart=/home/ghost-mgr/.nvm/versions/node/v14.17.0/bin/node /usr/bin/ghost r$  Restart=always    [Install]  WantedBy=multi-user.target  

VirtualGL desktop on headless Ubuntu

Posted: 01 Jul 2022 04:12 PM PDT

I'm trying to get an Ubuntu VM to have a persistent desktop with GPU enabled. The remote access to it would be something like Chrome Remote Desktop, but I don't actually care about trying to improve that experience. What I need is the VM to have a desktop and capture it through OBS. It seems like xpra and virtualgl will do what I want, but I'm having trouble putting them together in a useful way. If I try to use virtualgl to run startx or startplasma-x11, it doesn't seem to help the session and OBS framerate is still terrible. If I attach it to the same display number that CRD uses when it connects, the CRD session just comes up black. I've been able to use virtualgl to launch OBS in the session, but that doesn't seem to help as the desktop environment is still being rendered without GPU so the framerate is terrible.

Here are some options I've added to my xorg.conf, I'm not really sure what else to configure.

Section "Device"      nvidia-xconfig -a --allow-empty-initial-configuration --busid PCI:0:4:0 --no-connected-monitor      Identifier     "Device0"      Driver         "nvidia"      VendorName     "NVIDIA Corporation"      BoardName      "Tesla T4"      Option         "UseEDID" "false"  EndSection    Section "Screen"      Identifier     "Screen0"      Device         "Device0"      Monitor        "Monitor0"      DefaultDepth    24      Option         "AllowEmptyInitialConfiguration" "True"      Option         "HardDPMS" "false"      SubSection     "Display"          Virtual     1920 1080          Depth       24      EndSubSection  EndSection  

iostat 100%util when not reading/writing much

Posted: 01 Jul 2022 03:44 PM PDT

I have a standalone server that recently started to produce strange data in the iostat command output. I likes to go up to 100% util while the r/s,w/s,rMB/s,wMB/s are relatively low. During that periods my system becomes less responsive (it is running a HTTP server and time to serve the requests goes from milliseconds to 10s of seconds).

I am confused with the information that I receive and I am stuck in my investigation. Is there any way to see what is going on?

My system is built of two disks in RAID 1 array.

Thank you for any input. Best regards, Maciej

Unable to Downgrade OpenSSL from openssl-1.0.2k to openssl-1.0.1e-58 due to openssl-libs-1:1.0.2k-25.el6 dependencies

Posted: 01 Jul 2022 02:42 PM PDT

Due to issues with old CentOS6 machines and the Let's Encrypt root certificate that recently expired I found a solution online which involves installing a Patched version of openssl-1.0.2k from CentOS7. This is something I've done before and it always worked perfectly, however, in one specific server, as soon as I installed this version of OpenSSL, for some reason sshd threw a segmentation fault and now it doesn't start throwing this error:

key_curve_nid_to_name: unsupported EC curve nid -1  /etc/init.d/sshd: line 128: 29710 Segmentation fault      $SSHD $OPTIONS  

So I just tried Downgrading OpenSSL to the previous version, but since openssl1.0.2k now uses a seperate package (openssl-libs), when I try to downgrade I just get this error

[root@ ~]# yum downgrade openssl  Loaded plugins: fastestmirror  Setting up Downgrade Process  Loading mirror speeds from cached hostfile   * epel: d2lzkl7pfhq30w.cloudfront.net  Resolving Dependencies  --> Running transaction check  ---> Package openssl.x86_64 0:1.0.1e-58.el6_10 will be a downgrade  ---> Package openssl.x86_64 1:1.0.2k-21.el6 will be erased  --> Finished Dependency Resolution    Dependencies Resolved    ========================================================================================================================================================================================================   Package                                       Arch                                         Version                                                 Repository                                     Size  ========================================================================================================================================================================================================  Downgrading:   openssl                                       x86_64                                       1.0.1e-58.el6_10                                        updates                                       1.5 M    Transaction Summary  ========================================================================================================================================================================================================  Downgrade     1 Package(s)    Total download size: 1.5 M  Is this ok [y/N]: y  Downloading Packages:  openssl-1.0.1e-58.el6_10.x86_64.rpm                                                                                                                                              | 1.5 MB     00:00  Running rpm_check_debug  Running Transaction Test      Transaction Check Error:    file /etc/pki/tls/openssl.cnf from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/.libcrypto.so.10.hmac from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/.libssl.so.10.hmac from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/libcrypto.so.10 from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/libssl.so.10 from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/openssl/engines/lib4758cca.so from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/openssl/engines/libaep.so from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/openssl/engines/libatalla.so from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/openssl/engines/libcapi.so from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/openssl/engines/libchil.so from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/openssl/engines/libcswift.so from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/openssl/engines/libgmp.so from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/openssl/engines/libnuron.so from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/openssl/engines/libpadlock.so from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/openssl/engines/libsureware.so from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64    file /usr/lib64/openssl/engines/libubsec.so from install of openssl-1.0.1e-58.el6_10.x86_64 conflicts with file from package openssl-libs-1:1.0.2k-21.el6.x86_64  

Manually removing openssl-libs doesn't work either cause pretty much everything depends on it, including yum.

Does anyone know how I can ignore this dependency while downgrading? Or perhaps install the old version while ignoring if a newer version is installed?

What could be the reason for about 10x memory usage after upgrade from Apache 2.2 to 2.4?

Posted: 01 Jul 2022 01:00 PM PDT

I have used Apache 2.2 with PHP 7.1 on Linux for years and have recently upgraded to Apache 2.4 with PHP 8.1

After the upgrade, the processes spawned by Apache have gone from about 200MB to 2GB in RAM usage.

I use these modules:

apachectl -M  AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using zimmerpool.seuhs.com. Set the 'ServerName' directive globally to suppress this message  Loaded Modules:   core_module (static)   so_module (static)   http_module (static)   mpm_event_module (static)   authn_file_module (shared)   authn_core_module (shared)   authz_host_module (shared)   authz_groupfile_module (shared)   authz_user_module (shared)   authz_core_module (shared)   access_compat_module (shared)   auth_basic_module (shared)   reqtimeout_module (shared)   filter_module (shared)   mime_module (shared)   log_config_module (shared)   env_module (shared)   headers_module (shared)   setenvif_module (shared)   version_module (shared)   unixd_module (shared)   status_module (shared)   autoindex_module (shared)   dir_module (shared)   alias_module (shared)   php_module (shared)  

Is there anything obvious or commonly seen that could be the reason for this massive increase in RAM usage?

GoDaddy/DNS Configurations for AWS CloudFront

Posted: 01 Jul 2022 12:10 PM PDT

I have a domain called, say, example.com. I have an S3-backed CloudFront distribution with a domain name of, say, 12345.cloudfront.net. I am using GoDaddy as my registrar, not Route53.

What specific DNS configurations (A record, CNAME, etc.) do I need to make to my domain in GoDaddy, and what specific CloudFront configurations do I need to make, so that going to http://example.com redirects users to my CloudFront distribution at 12345.cloudfront.net?

My understanding is that you can't use CNAMEs with domain names (only subdomains) and that A records require specific IP addresses. However the IP address of a CloudFront distribution will constantly change.

OpenVPN - How to suppress WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this

Posted: 01 Jul 2022 11:47 AM PDT

In OpenVPN GUI, I am getting the red message

WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this.

I do not want to always re-type my password again and again. Is there a way to suppress the warning without using the auth-nocache option?

I do not want to get myself used to habitually ignoring a red warning in the log dialog. This bad habit might prevent me from noticing an actual issue in the future. We have @SuppressWarning in Java for exactly the same reason.

I want to emphasize that I am not choosing between security and convenience, but I am asking for higher security! Multiple internet sources I found on this warning (e.g. here, here or here) tell that the risk is minimal. However the risk that I become used to ignore warnings seems much higher to me.

DNS Server - how to differentiate clients?

Posted: 01 Jul 2022 05:48 PM PDT

I am running my own DNS server on a remote machine using Bind9. This server is currently only used by machines that are connected to the same router. The problem that I am having is that as the DNS server is used on a single network, all of the client machines that connect to it have the same external IP. So, when I am going through the logs, I can't differentiate which client machine each query or issue came from. I cannot move the DNS server locally so it is on the same network as the machines. Is there anyway around this?

What's it called? Feature in remote desktop software? Client is told to put a code in a website which starts a remote desktop session?

Posted: 01 Jul 2022 04:42 PM PDT

I saw it once while I was fixing this one guys computer. We went to a website and put some numbers in a box. These numbers then prompted an executable which we downloaded and ran, which then started a single-use remote desktop session. I also see scammers using this method all the time. Is this possible on Teamviewer? What is this feature called, and does it even have a name?

I know I could just send then a Teamviewer link and have them text a picture of a link, but having a one step process is like really nice.

Azure new Virtual Machine Windows Server 2022 can't make IIS work for a simple website

Posted: 01 Jul 2022 06:52 PM PDT

I got a new Azure Virtual machine server 2022 datacenter edition, they don't have the option "endpoints" where you configure the port 80 for http, I tried option "networking" 'add Inbound port rule' nada, the issue is: I can't see the website from outside.

then I went to 'connection troubleshoot' the result is 'network connectivity allowed' but the website still not working, I checked the IIS setup all seems fine.

seems like I'm missing something but I can't find it.

is there any step that I need to follow to allow IIS to work?

I went to azure support they want to charge me $XX.

I have a classic Azure virtual machine windows server 2012 that I run a very html simple website, I remembered to used the option "endpoints" where you configure the port 80 for http.

I will need to make a .Net core web API application to work, since the .Net API application doesn't work on Windows server 2012 r2.

Any help please will be appreciated!!

Nginx reverse proxy through wireguard tunnel

Posted: 01 Jul 2022 06:29 PM PDT

I set up a wireguard tunnel between an AWS instance (acting as server) and a personal computer acting as client. Wireguard is installed on both in a docker container (using linuxserver image). On the local computer I have a website that I would like to access from the server using a proxy with Nginx. Basically I want to connect to the ip of the AWS instance and be redirected through the Wireguard tunnel to the website on my local machine. I can curl my website from the docker container of Nginx on the AWS instance but the proxy doesn't work. How can I solve this problem?

AWS instance (Wireguard server and Nginx proxy)

version: "3"  services:    reverseproxy:      container_name: reverseproxy      build: .      restart: unless-stopped      network_mode: service:wireguard      wireguard:      image: lscr.io/linuxserver/wireguard:latest      container_name: wireguard      cap_add:        - NET_ADMIN        - SYS_MODULE      environment:        - PUID=1000        - PGID=1000        - TZ=Europe/Rome        - SERVERURL=107.22.140.0 #optional        - SERVERPORT=51820 #optional        - PEERS=1 #optional        - PEERDNS=auto #optional        - INTERNAL_SUBNET=10.0.0.0 #optional        - ALLOWEDIPS=0.0.0.0/0 #optional        - LOG_CONFS=true #optional      volumes:        - /home/ubuntu/wireguard/config:/config        - /lib/modules:/lib/modules      ports:        - 51820:51820/udp        - 80:80      sysctls:        - net.ipv4.conf.all.src_valid_mark=1      restart: unless-stopped  

Nginx configuration of the proxy:

worker_processes 1;    events { worker_connections 1024; }    http {        sendfile on;        upstream docker-proxy {          server 10.0.1.2:80;      }        proxy_set_header   Host $host;      proxy_set_header   X-Real-IP $remote_addr;      proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;      proxy_set_header   X-Forwarded-Host $server_name;        server {          listen 80;          resolver 127.0.0.11 ipv6=off;          location / {              proxy_pass         http://docker-proxy/;              proxy_redirect     off;          }      }  }  

Local machine with Wireguard and local website:

version: '3'    services:      nginx:          container_name: nginx          #depends_on:              #- reverseproxy          image: nginx:alpine          restart: unless-stopped          ports:              - 80:80          networks:              vpn:                  ipv4_address: 10.0.1.2      wireguard:          image: lscr.io/linuxserver/wireguard:latest          container_name: wireguard          cap_add:              - NET_ADMIN              - SYS_MODULE          environment:              - PUID=1000              - PGID=1000              - TZ=Europe/Rome              - SERVERURL=wireguard.domain.com #optional              - SERVERPORT=51820 #optional              - PEERS= #optional              - PEERDNS=auto #optional              - INTERNAL_SUBNET=10.0.0.0 #optional              - ALLOWEDIPS=0.0.0.0/0 #optional              - LOG_CONFS=true #optional          volumes:              - /home/user/dev/nginx-proxy/config:/config              - /lib/modules:/lib/modules          ports:              - 51820:51820/udp          sysctls:              - net.ipv4.conf.all.src_valid_mark=1          restart: unless-stopped          networks:              vpn:                  ipv4_address: 10.0.1.5        networks:      vpn:          ipam:              config:                  - subnet: 10.0.1.0/8   

Windows Server 2012 R2 - Adding Cipher

Posted: 01 Jul 2022 05:04 PM PDT

this might be a complete newbee question. I have an 2012 R2 Server on which an application should call a partner who only offers the following ciphers: (0xc02f) TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 ECDH secp256r1 (eq. 3072 bits RSA) FS 128 (0xc030) TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ECDH secp256r1 (eq. 3072 bits RSA) FS

If i check schnannel reg key my system offers: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P384 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P256 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P256 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P384 TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 TLS_DHE_RSA_WITH_AES_256_CBC_SHA TLS_DHE_RSA_WITH_AES_128_CBC_SHA TLS_RSA_WITH_AES_256_GCM_SHA384 TLS_RSA_WITH_AES_128_GCM_SHA256 TLS_RSA_WITH_AES_256_CBC_SHA256 TLS_RSA_WITH_AES_128_CBC_SHA256 TLS_RSA_WITH_AES_256_CBC_SHA TLS_RSA_WITH_AES_128_CBC_SHA TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384_P384 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256_P256 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256_P384 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384_P384 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256_P256 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256_P384 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA_P256 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA_P384 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA_P256 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA_P384 TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 TLS_DHE_DSS_WITH_AES_256_CBC_SHA TLS_DHE_DSS_WITH_AES_128_CBC_SHA TLS_RSA_WITH_3DES_EDE_CBC_SHA TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA TLS_RSA_WITH_RC4_128_SHA TLS_RSA_WITH_RC4_128_MD5 TLS_RSA_WITH_NULL_SHA256 TLS_RSA_WITH_NULL_SHA SSL_CK_RC4_128_WITH_MD5 SSL_CK_DES_192_EDE3_CBC_WITH_MD5

Can i just add the cipher in the regkey and restart or do i have to make an update of some kind?

Best Regards Moritz

Tomcat servlet will not complete websocket connection

Posted: 01 Jul 2022 03:06 PM PDT

I am moving a set working servlets from one server to another

Old server, Centos6, Apache 2.2, Tomcat 9  New Server, Centos7, Apache 2.4, Tomcat 9  

I have about 5 servlets running from the old server all are OK, except the one servlet that has 3 websocket connections. Everything else runs in the servlet but the websockets.

Tomcat is reverse proxied behind apache.

My configuration for one of the reverse proxies

# websocket proxy  <Location "/admin/AdminConsole">   ProxyPass  wss://localhost:8080/admin/AdminConsole   ProxyPassReverse wss://localhost:8080/admin/AdminConsole   Require all granted  </Location>  

Output from apache error_log LogLevel debug proxy:trace5

[Wed Jul 01 23:10:45.963246 2020] [proxy:trace2] [pid 25640] proxy_util.c(1985): [client 174.30.215.226:46978] http: found worker http://localhost:8080/admin/AdminConsole for http://localhost:8080/admin/AdminConsole?userName=derricks&source=web  [Wed Jul 01 23:10:45.963335 2020] [proxy:debug] [pid 25640] mod_proxy.c(1123): [client 174.30.215.226:46978] AH01143: Running scheme http handler (attempt 0)  [Wed Jul 01 23:10:45.963372 2020] [proxy:debug] [pid 25640] proxy_util.c(2203): AH00942: HTTP: has acquired connection for (localhost)  [Wed Jul 01 23:10:45.963388 2020] [proxy:debug] [pid 25640] proxy_util.c(2256): [client 174.30.215.226:46978] AH00944: connecting http://localhost:8080/admin/AdminConsole?userName=derricks&source=web to localhost:8080  [Wed Jul 01 23:10:45.966024 2020] [proxy:debug] [pid 25640] proxy_util.c(2426): [client 174.30.215.226:46978] AH00947: connected /admin/AdminConsole?userName=derricks&source=web to localhost:8080  [Wed Jul 01 23:10:45.966077 2020] [proxy:trace2] [pid 25640] proxy_util.c(2768): HTTP: fam 10 socket created to connect to localhost  [Wed Jul 01 23:10:45.966734 2020] [proxy:debug] [pid 25640] proxy_util.c(2802): AH02824: HTTP: connection established with [::1]:8080 (localhost)  [Wed Jul 01 23:10:45.966781 2020] [proxy:debug] [pid 25640] proxy_util.c(2942): AH00962: HTTP: connection complete to [::1]:8080 (localhost)  [Wed Jul 01 23:10:45.972425 2020] [proxy:debug] [pid 25640] proxy_util.c(2218): AH00943: http: has released connection for (localhost)  

The last line says 'http' released connection? is that apache?

[Wed Jul 01 23:10:45.972425 2020] [proxy:debug] [pid 25640] proxy_util.c(2218): AH00943: http: has released connection for (localhost)  

Output from apache access_log a 404

174.30.215.226 - - [01/Jul/2020:23:10:45 -0400] "GET /admin/AdminConsole?userName=derricks&source=web HTTP/1.1" 404 473 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0" 1611 1025  

It appears that maybe apache is dropping the connection? But why?

I removed the reverse proxy connecting to tomcat directly at URL:8080 and the websockets were fine.

It appears Apache reverse-proxy from 2.2 to 2.4 is screwing the pooch.

Edit # 1

Here are the logs (LogLevel debug)of a working 2.2 server and my new 2.4 server during revers proxy

This is the new server  [Thu Jul 02 13:39:27.812027 2020] [proxy_fcgi:debug] [pid 53009] mod_proxy_fcgi.c(972): [client 174.30.215.226:38854] AH01076: url: http://localhost:8080/admin/AdminConsole?userName=derricks&source=web proxyname: (null) proxyport: 0  [Thu Jul 02 13:39:27.812040 2020] [proxy_fcgi:debug] [pid 53009] mod_proxy_fcgi.c(975): [client 174.30.215.226:38854] AH01077: declining URL http://localhost:8080/admin/AdminConsole?userName=derricks&source=web  [Thu Jul 02 13:39:27.812062 2020] [proxy:debug] [pid 53009] proxy_util.c(2203): AH00942: HTTP: has acquired connection for (localhost)  [Thu Jul 02 13:39:27.812078 2020] [proxy:debug] [pid 53009] proxy_util.c(2256): [client 174.30.215.226:38854] AH00944: connecting http://localhost:8080/admin/AdminConsole?userName=derricks&source=web to localhost:8080  [Thu Jul 02 13:39:27.813819 2020] [proxy:debug] [pid 53009] proxy_util.c(2426): [client 174.30.215.226:38854] AH00947: connected /admin/AdminConsole?userName=derricks&source=web to localhost:8080  [Thu Jul 02 13:39:27.814389 2020] [proxy:debug] [pid 53009] proxy_util.c(2802): AH02824: HTTP: connection established with [::1]:8080 (localhost)  [Thu Jul 02 13:39:27.814476 2020] [proxy:debug] [pid 53009] proxy_util.c(2942): AH00962: HTTP: connection complete to [::1]:8080 (localhost)  [Thu Jul 02 13:39:27.818830 2020] [proxy:debug] [pid 53009] proxy_util.c(2218): AH00943: http: has released connection for (localhost)  [Thu Jul 02 13:39:27.819281 2020] [deflate:debug] [pid 53009] mod_deflate.c(849): [client 174.30.215.226:38854] AH01384: Zlib: Compressed 1096 to 457 : URL /admin/AdminConsole    This is the old working server  [Thu Jul 02 13:33:11 2020] [debug] mod_proxy_wstunnel.c(91): [client 174.30.215.226] canonicalising URL //localhost:8080/admin/AdminConsole  [Thu Jul 02 13:33:11 2020] [debug] proxy_util.c(1508): [client 174.30.215.226] proxy: wss: found worker wss://localhost:8080/admin/AdminConsole for wss://localhost:8080/admin/AdminConsole?userName=derricks&source=web  [Thu Jul 02 13:33:11 2020] [debug] mod_proxy.c(1028): Running scheme wss handler (attempt 0)  [Thu Jul 02 13:33:11 2020] [debug] mod_proxy_http.c(1963): proxy: HTTP: declining URL wss://localhost:8080/admin/AdminConsole?userName=derricks&source=web  [Thu Jul 02 13:33:11 2020] [debug] mod_proxy_wstunnel.c(388): [client 174.30.215.226] AH02451: serving URL wss://localhost:8080/admin/AdminConsole?userName=derricks&source=web  [Thu Jul 02 13:33:11 2020] [debug] proxy_util.c(2013): proxy: WSS: has acquired connection for (localhost)  [Thu Jul 02 13:33:11 2020] [debug] proxy_util.c(2069): proxy: connecting wss://localhost:8080/admin/AdminConsole?userName=derricks&source=web to localhost:8080  [Thu Jul 02 13:33:11 2020] [debug] proxy_util.c(2195): proxy: connected /admin/AdminConsole?userName=derricks&source=web to localhost:8080  [Thu Jul 02 13:33:11 2020] [debug] proxy_util.c(2446): proxy: WSS: fam 2 socket created to connect to localhost  [Thu Jul 02 13:33:11 2020] [debug] proxy_util.c(2578): proxy: WSS: connection complete to 127.0.0.1:8080 (localhost)  [Thu Jul 02 13:33:11 2020] [debug] mod_proxy_wstunnel.c(236): [client 174.30.215.226] sending request  [Thu Jul 02 13:33:11 2020] [debug] mod_proxy_wstunnel.c(254): [client 174.30.215.226] setting up poll()  [Thu Jul 02 13:33:11 2020] [debug] mod_proxy_wstunnel.c(299): [client 174.30.215.226] AH02445: woke from poll(), i=1  [Thu Jul 02 13:33:11 2020] [debug] mod_proxy_wstunnel.c(308): [client 174.30.215.226] AH02446: sock was readable  [Thu Jul 02 13:33:11 2020] [debug] mod_proxy_wstunnel.c(175): [client 174.30.215.226] wstunnel_transfer complete  

The most obvious difference is the 2.2 working server is proxying to a wss: address while the 2.4 broken server is proxying to a http: address. I don't know if that is a logging bug or an error on the proxy service. I don't see wstunnel being used at all in the broken server?

Edit #2

Finally a brake through of sorts.

I noticed that the proxy_fcgi was being called on the web-socket address and failing, so I removed it's LoadModule and now proxy_wstunnel was called though it failed with a [Hint: SSLProxyEngine]

So I enabled SSProxyEngine at the top of the reverseProxy.conf

SSLProxyEngine on

It now gets even farther, actually connecting the websocket but it fails in the SSL module:

Here is the log

[Thu Jul 02 17:55:49.180768 2020] [proxy:debug] [pid 61402] mod_proxy.c(1123): [client 174.30.215.226:42470] AH01143: Running scheme wss handler (attempt 0)  [Thu Jul 02 17:55:49.180823 2020] [proxy_http:debug] [pid 61402] mod_proxy_http.c(1930): [client 174.30.215.226:42470] AH01113: HTTP: declining URL wss://localhost:8080/AdminConsole?userName=derricks&source=web  [Thu Jul 02 17:55:49.180842 2020] [proxy_scgi:debug] [pid 61402] mod_proxy_scgi.c(517): [client 174.30.215.226:42470] AH00865: declining URL wss://localhost:8080/AdminConsole?userName=derricks&source=web  [Thu Jul 02 17:55:49.180857 2020] [proxy_wstunnel:debug] [pid 61402] mod_proxy_wstunnel.c(336): [client 174.30.215.226:42470] AH02451: serving URL wss://localhost:8080/AdminConsole?userName=derricks&source=web  [Thu Jul 02 17:55:49.180874 2020] [proxy:debug] [pid 61402] proxy_util.c(2203): AH00942: WSS: has acquired connection for (localhost)  [Thu Jul 02 17:55:49.180889 2020] [proxy:debug] [pid 61402] proxy_util.c(2256): [client 174.30.215.226:42470] AH00944: connecting wss://localhost:8080/AdminConsole?userName=derricks&source=web to localhost:8080  [Thu Jul 02 17:55:49.182986 2020] [proxy:debug] [pid 61402] proxy_util.c(2426): [client 174.30.215.226:42470] AH00947: connected /AdminConsole?userName=derricks&source=web to localhost:8080  [Thu Jul 02 17:55:49.183216 2020] [proxy:debug] [pid 61402] proxy_util.c(2802): AH02824: WSS: connection established with [::1]:8080 (localhost)  [Thu Jul 02 17:55:49.183269 2020] [proxy:debug] [pid 61402] proxy_util.c(2942): AH00962: WSS: connection complete to [::1]:8080 (localhost)  [Thu Jul 02 17:55:49.183293 2020] [ssl:info] [pid 61402] [remote ::1:8080] AH01964: Connection to child 0 established (server mbepapers.org:443)  [Thu Jul 02 17:55:49.188928 2020] [ssl:info] [pid 61402] [remote ::1:8080] AH02003: SSL Proxy connect failed  [Thu Jul 02 17:55:49.189045 2020] [ssl:info] [pid 61402] SSL Library Error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol  [Thu Jul 02 17:55:49.189063 2020] [ssl:info] [pid 61402] [remote ::1:8080] AH01998: Connection closed to child 0 with abortive shutdown (server mbepapers.org:443)  [Thu Jul 02 17:55:49.189113 2020] [ssl:info] [pid 61402] [remote ::1:8080] AH01997: SSL handshake failed: sending 502  [Thu Jul 02 17:55:49.189154 2020] [proxy_wstunnel:debug] [pid 61402] mod_proxy_wstunnel.c(257): [client 174.30.215.226:42470] AH02445: woke from poll(), i=1  [Thu Jul 02 17:55:49.189167 2020] [proxy_wstunnel:debug] [pid 61402] mod_proxy_wstunnel.c(266): [client 174.30.215.226:42470] AH02446: sock was readable  [Thu Jul 02 17:55:49.189180 2020] [proxy_wstunnel:debug] [pid 61402] mod_proxy_wstunnel.c(131): (103)Software caused connection abort: [client 174.30.215.226:42470] AH02442: error on sock - ap_get_brigade  [Thu Jul 02 17:55:49.189234 2020] [proxy:debug] [pid 61402] proxy_util.c(2218): AH00943: WSS: has released connection for (localhost)  

Almost there!!!! now proxy.c is Running the wss sceme and the address of the URL is

wss://localhost:8080/AdminConsole?userName=derricks&source=web

Which is the URL my client has always sent!

The error is in the SSL module

[Thu Jul 02 23:53:57.947613 2020] [ssl:info] [pid 7910] [remote ::1:8080] AH02003: SSL Proxy connect failed  [Thu Jul 02 23:53:57.947758 2020] [ssl:info] [pid 7910] SSL Library Error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol  [Thu Jul 02 23:53:57.947778 2020] [ssl:info] [pid 7910] [remote ::1:8080] AH01998: Connection closed to child 0 with abortive shutdown (server mbepapers.org:443)  [Thu Jul 02 23:53:57.948036 2020] [ssl:info] [pid 7910] [remote ::1:8080] AH01997: SSL handshake failed: sending 502  

SSL Library Error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

Looking for a solution???

edit 3

I can connect to this server using https:/IP because the old server that this is replacing is using the correct DNS IP<-> domain name. I installed the certificates form that server becasue I will be swapping IP's soon. I wonder if that is the reason for the error?

edit 4

Still looking for a solution to this. When I try to proxy the websocket I get this error in the httpd error_log with loglevel debug

[Sat Jul 11 14:27:23.978213 2020] [proxy:debug] [pid 9147] mod_proxy.c(1123): [client 174.30.215.226:54434] AH01143: Running scheme wss handler (attempt 0)  [Sat Jul 11 14:27:23.978266 2020] [proxy_wstunnel:debug] [pid 9147] mod_proxy_wstunnel.c(336): [client 174.30.215.226:54434] AH02451: serving URL wss://localhost:8080/admin/AdminConsole?userName=derricks&source=app  [Sat Jul 11 14:27:23.978302 2020] [proxy:debug] [pid 9147] proxy_util.c(2203): AH00942: WSS: has acquired connection for (localhost)  [Sat Jul 11 14:27:23.978323 2020] [proxy:debug] [pid 9147] proxy_util.c(2256): [client 174.30.215.226:54434] AH00944: connecting wss://localhost:8080/admin/AdminConsole?userName=derricks&source=app to localhost:8080  [Sat Jul 11 14:27:23.980603 2020] [proxy:debug] [pid 9147] proxy_util.c(2426): [client 174.30.215.226:54434] AH00947: connected /admin/AdminConsole?userName=derricks&source=app to localhost:8080  [Sat Jul 11 14:27:23.981093 2020] [proxy:debug] [pid 9147] proxy_util.c(2802): AH02824: WSS: connection established with [::1]:8080 (localhost)  [Sat Jul 11 14:27:23.981205 2020] [proxy:debug] [pid 9147] proxy_util.c(2942): AH00962: WSS: connection complete to [::1]:8080 (localhost)  [Sat Jul 11 14:27:23.981355 2020] [ssl:info] [pid 9147] [remote ::1:8080] AH01964: Connection to child 0 established (server www.mbepapers.org:443)  [Sat Jul 11 14:27:23.983594 2020] [ssl:info] [pid 9147] [remote ::1:8080] AH02003: SSL Proxy connect failed  [Sat Jul 11 14:27:23.983814 2020] [ssl:info] [pid 9147] SSL Library Error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol  [Sat Jul 11 14:27:23.983871 2020] [ssl:info] [pid 9147] [remote ::1:8080] AH01998: Connection closed to child 0 with abortive shutdown (server www.mbepapers.org:443)  [Sat Jul 11 14:27:23.983907 2020] [ssl:info] [pid 9147] [remote ::1:8080] AH01997: SSL handshake failed: sending 502  [Sat Jul 11 14:27:23.983969 2020] [proxy_wstunnel:debug] [pid 9147] mod_proxy_wstunnel.c(257): [client 174.30.215.226:54434] AH02445: woke from poll(), i=1  [Sat Jul 11 14:27:23.984005 2020] [proxy_wstunnel:debug] [pid 9147] mod_proxy_wstunnel.c(266): [client 174.30.215.226:54434] AH02446: sock was readable  [Sat Jul 11 14:27:23.984019 2020] [proxy_wstunnel:debug] [pid 9147] mod_proxy_wstunnel.c(131): (103)Software caused connection abort: [client 174.30.215.226:54434] AH02442: error on sock - ap_get_brigade  [Sat Jul 11 14:27:23.984092 2020] [proxy:debug] [pid 9147] proxy_util.c(2218): AH00943: WSS: has released connection for (localhost)  

the pertinent lines

[Sat Jul 11 14:27:23.983594 2020] [ssl:info] [pid 9147] [remote ::1:8080] AH02003: SSL Proxy connect failed  [Sat Jul 11 14:27:23.983814 2020] [ssl:info] [pid 9147] SSL Library Error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol  [Sat Jul 11 14:27:23.983871 2020] [ssl:info] [pid 9147] [remote ::1:8080] AH01998: Connection closed to child 0 with abortive shutdown (server www.mbepapers.org:443)  [Sat Jul 11 14:27:23.983907 2020] [ssl:info] [pid 9147] [remote ::1:8080] AH01997: SSL handshake failed: sending 502  

It was suggested I move the reverse proxy inside the vhost section so here that is

<VirtualHost xx.xx.xx.xx:443>   RewriteEngine on   ServerName www.mbepapers.org   ServerAlias www.mbepapers.org   SSLEngine on   SSLProxyEngine on   SSLCertificateFile /var/www/httpd-cert/mbepapers.org.crt   SSLCertificateKeyFile /var/www/httpd-cert/mbepapers.org.key   SSLCertificateChainFile /var/www/httpd-cert/intermediate.crt   SSLCaCertificateFile /var/www/httpd-cert/intermediate.crt     ProxyRequests off     <Location "/admin/AdminConsole">     ProxyPass  wss://localhost:8080/admin/AdminConsole     ProxyPassReverse  wss://localhost:8080/admin/AdminConsole     Require all granted   </Location>  

Nginx: CSS and JS files inside my wordpress blog directory are served wrong

Posted: 01 Jul 2022 02:03 PM PDT

I set up an Amazon ec2 LEMP server for my photography website, which previously was on apache, which I'm a lot more familiar with.

I have everything running generally ok, except for in the blog directory. The CSS and JS files seem to be served by PHP and have content type text/html, for example here are the response headers for my theme's stylesheet (/blog/wp-content/themes/twentyseventeen/style.css?ver=4.9.8):

content-type: text/html  date: Fri, 26 Oct 2018 02:33:26 GMT  server: nginx/1.12.2  status: 200  x-powered-by: PHP/5.4.16  

vs the headers for my own stylesheet (/include/css/style.css):

accept-ranges: bytes  cache-control: max-age=315360000  content-length: 34199  content-type: text/css  date: Fri, 26 Oct 2018 02:48:04 GMT  etag: "5b7f653b-8597"  expires: Thu, 31 Dec 2037 23:55:55 GMT  last-modified: Fri, 24 Aug 2018 01:54:03 GMT  server: nginx/1.12.2  status: 200  

I've read lots of threads that deal with very similar problems. However, I'm confused because my problem is confined to the /blog/ directory.

A few of the other questions/answers I read mentioned security.limit_extensions and indeed mine (/etc/php-fpm.d/www.conf) was set up like so:

security.limit_extensions =  ;security.limit_extensions = .php .php3 .php4 .php5 .ttf  

I changed it:

;security.limit_extensions =  security.limit_extensions = .php .php3 .php4 .php5 .ttf  

and restarted nginx via service nginx restart - but the problem still persists..

Can't imagine what I'm missing.. Ready to throw in the towel and switch back to apache.. :(

Anyone see what I missed?

UPDATE: Config files

/etc/nginx/nginx.conf:

# For more information on configuration, see:  #   * Official English Documentation: http://nginx.org/en/docs/  #   * Official Russian Documentation: http://nginx.org/ru/docs/  #user ec2-user;    user nginx;  worker_processes auto;  error_log /var/log/nginx/error.log;  pid /run/nginx.pid;    # Load dynamic modules. See /usr/share/nginx/README.dynamic.  include /usr/share/nginx/modules/*.conf;    events {      worker_connections 1024;  }    http {      log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '      '$status $body_bytes_sent "$http_referer" '      '"$http_user_agent" "$http_x_forwarded_for"';        access_log  /var/log/nginx/access.log  main;        sendfile            on;      tcp_nopush          on;      tcp_nodelay         on;      keepalive_timeout   65;      types_hash_max_size 2048;        server_names_hash_bucket_size 64;          client_max_body_size 2M;        include             mime.types;      default_type        application/octet-stream;        # Load modular configuration files from the /etc/nginx/conf.d directory.      # See http://nginx.org/en/docs/ngx_core_module.html#include      # for more information.      include /etc/nginx/conf.d/*.conf;        include /etc/nginx/sites-enabled/*;  }  

/etc/nginx/sites-available/mikewillisphotography.com.conf

server {      listen 80 default_server;      server_name www.mikewillisphotography.com mikewillisphotography.com;      return 301 https://www.mikewillisphotography.com$request_uri;  }    server {      listen 443 ssl http2;      server_name mikewillisphotography.com;      return 301 https://www.mikewillisphotography.com$request_uri;  }    server {      listen       443 ssl default_server;      server_name  www.mikewillisphotography.com;      #server_name localhost;        include /etc/nginx/sites-available/includes/restrictions.conf;      include /etc/nginx/sites-available/includes/wordpress.conf;      #       include /etc/nginx/sites-available/includes/php.conf;        ssl_certificate /etc/letsencrypt/live/mikewillisphotography.com/fullchain.pem;      ssl_certificate_key /etc/letsencrypt/live/mikewillisphotography.com/privkey.pem;        location /.well-known/acme-challenge {          #root /var/www/html/letsencrypt/wordpress/;          root /usr/share/nginx/sites/mikewillisphotography.com/htdocs/letsencrypt/wordpress/;      }        client_max_body_size 2M;        # note that these lines are originally from the "location /" block      root   /usr/share/nginx/sites/mikewillisphotography.com/htdocs;      index index.php index.html index.htm;        error_page 404 /404.html;      error_page 500 502 503 504 /50x.html;        location = /50x.html {          root /usr/share/nginx/sites/mikewillisphotography.com/htdocs;      }        location ~ \.php$ {          include /etc/nginx/sites-available/includes/php.conf;      }  }  

/etc/nginx/sites-available/includes/php.conf

fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;  fastcgi_index index.php;  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;  include fastcgi_params;    #wordpress stuff  #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini  include fastcgi.conf;  fastcgi_intercept_errors on;  fastcgi_buffers 16 16k;  fastcgi_buffer_size 32k;  

/etc/nginx/sites-available/includes/wordpress.conf

location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {      expires max;      log_not_found off;  }    location ^~ /blog {      root /usr/share/nginx/sites/mikewillisphotography.com/htdocs;      index index.php index.html index.htm;      include /etc/nginx/sites-available/includes/php.conf;      rewrite /wp-admin$ $scheme://$host$uri/index.php?q=$1 permanent;      try_files $uri $uri/ @blog;  }    location @blog {      rewrite ^/blog(.*) /blog/index.php?q=$1;  }  

Change External NIC to Public on Windows Server 2016

Posted: 01 Jul 2022 03:06 PM PDT

I've got a cloud network: 192.168.100.0/24 with:

  • Pfsense GW (IPSec site-to-site)
    • NIC1 = WAN-IP1 (fully blocked except IPSec)
    • NIC2 = 192.168.100.1
  • DC (WinServer2016)
    • NIC1 = WAN-IP2 (external)
    • NIC2 = 192.168.100.2 with Pfsense as GW (internal)

In Windows Network Sharing Center I've disabled the External NIC for obvious security reasons.

However I would like to make my NIC1 'public' instead of 'Domain Network'. This way I can use Windows Firewall to block all traffic on the Public profile except Updates and other important traffic. Why not over the Pfsense? Due to bandwith limitations of my provider and VPS's.

How can I change my external NIC (NIC1 on WinServer2016) to Public?

Logon options greyed out for AD FS Service

Posted: 01 Jul 2022 05:01 PM PDT

I am trying to change the service account for AD FS service. I go to services.msc and pull up the settings for Active Directory Federation Services. In the Logon tab, the options to change the service account are greyed out.

Is there anything I can do to enable this option to make the change?

Office 2013 Slow to Open/Save with Folder Redirection

Posted: 01 Jul 2022 12:05 PM PDT

We recently deployed folder redirection for a few individuals in the office. We are using a DFS Namespace share on a Server 2012r2 VM. We are redirecting Desktop and My Documents only. Clients are running 8.1 and 7.

When using Word/Excel 2013, there is a popup that says "trying to connect to: \\DFSNAME\userfolder" and its stays there for 1-5 minutes before the browse window opens. This also occurs when trying to attach a file to an email in outlook. There are no delays if the file is double clicked on their desktop.

We've tried the following solutions (whcih seemed to describe our problem perfectly aside from the version):

The only thing that is different about this deployment of Folder Redirection is permissions. Instead of following the standard checkbox of exclusive access we used this ancient guide from microsoft - http://support.microsoft.com/kb/288991/. Could our permissions be causing these weird issues?

pgpool2 parallel mode: Non-superusers must provide a password in the connection string

Posted: 01 Jul 2022 01:01 PM PDT

I have two AWS RDS postgres nodes backing a parallel mode pgpool setup on EC2. After using pgbench to populate test tables, I get odd behavior from test queries. Any query that uses a function produces the error mentioned in the subject line, while other queries work as expected. Three examples showing success, expected failure, and unexpected failure:

Success -- Yields the expected record set:

psql -c "SELECT aid FROM pgbench_accounts" "host=localhost port=9999 user=pgpool password=pass dbname=bench_parallel"  # Giant record set is returned here.  

Since the backing nodes are on RDS, md5 authentication is required. Authentication appears to be working fine in the case of non-function queries, as can be seen by replacing the correct password above with an incorrect one.

Expected authentication failure:

psql -c "SELECT aid FROM pgbench_accounts" "host=localhost port=9999 user=pgpool password=notmypass dbname=bench_parallel"  psql: FATAL:  password authentication failed for user "pgpool"  

Here's the part that has me baffled -- If I put a function like min() or count() into the query, I get authentication problems:

psql -c "SELECT count(aid) FROM pgbench_accounts" "host=localhost port=9999 user=pgpool password=pass dbname=bench_parallel"  ERROR:  password is required  DETAIL:  Non-superusers must provide a password in the connection string.  

As can be seen from this last query, the password is supplied in the connection string (to the fronted, anyway) and it is the correct password as shown in the first query.

Why would my first query work fine with no auth problems, but the third one fail? Have I overlooked a setting somewhere?

Edit 2014-10-23: Adding more information.

I added superuser privileges to user pgpool on the (frontend) system database and no longer get Non-superusers must provide a password in the connection string as the error. Now I get:

ERROR:  could not establish connection  DETAIL:  fe_sendauth: no password supplied  

Turning on debugging for pgpool and looking in the log, I see the query being rewritten as the following, which, in the call to dblink, does not contain the password specified in the original connection string:

2014-10-23 19:59:10 DEBUG: pid 1643: OneNode_do_command: Query:  SELECT       sum(pool_g$0) AS count FROM       dblink('host=ip-10-1-2-17 dbname=bench_parallel port=9999 user=pgpool',      'SELECT pool_parallel("SELECT count(aid) FROM pgbench_accounts")',false)       AS pool_t$0g (pool_g$0 bigint )  

Intermittent communication issues with Office 365 (Exchange Online)

Posted: 01 Jul 2022 01:01 PM PDT

Four or five users (out of 30-35 users) at one of our office locations are having odd issues with Outlook 2010 and 2013 losing the connection to Office 365: Occasionally, when sending an email, the progress bar goes almost all the way to completed but then stays there.
If I open "Connection Status," the connections are all established but the Req/Fail counter doesn't increase. But if I open the connection monitor on my firewall, I can see TCP traffic to the Microsoft server slowly trickle across.
Cancelling the server request immediately fixes the issue (as will restarting Outlook) but only for that Send/Receive.
I'm using Cisco switches with a SonicWall TZ205 firewall. I was hoping the issue was caused by our firewall killing inactive RPC tunnels, but upping the TCP timeout to two hours has had no effect.
Microsoft hasn't been any help and they've stopped returning our phone calls.
If it is a local network issue, what would I even look for?

Setting variable depending on NAS-IP-Address in Freeradius

Posted: 01 Jul 2022 04:01 PM PDT

The setup

We currently have a Freeradius server used to authenticate our Wifi users against our Active Directory server. The link between Freeradius and the Active Directory is done by Winbind.

In order for the user to be able to obtain authorization, it needs to be belong to a group in the Activer Directory. This is done by adding an argument to the ntlm_auth command.

What we are trying to achieve

We are now adding 802.1X to our cabled networks and would like to re-use the existing Radius server to authenticate against the same Active Directory.

Everything will be the same except the authorization will need to be based on whether the user belongs to a different one than that of the Wifi networks.

What we have already tried

I have read many things on freeradius in the documentation and have seen that it is possible to use conditionnals and variables. My plan therefore was to put a variable in the ntlm_auth command that would contain the group SID (as suggested on Freeradius mailing-lists). The group SID would be dependent on the IP of the network device which should be contained in "NAS-IP-Address".

This should just be a case of writing a simple conditionnal statement and setting a variable. Nonetheless, I have not been able to do this as Freeradius will not start everytime I try to add a conditionnal to the configuration files.

So my questions are :

  • How do I set a variable in function of the NAS-IP-Address ?

  • In which files can such syntax be used ?

How to restore Ubuntu server on a VMWare image after disk failure?

Posted: 01 Jul 2022 12:05 PM PDT

After a disk failure on a VMWare GSX I was able to start the raid with one disk and copy the VMWare image to my ESXi server. After repairing the image with

vmkfstools -x repair /vmfs/volumes/source/vmname/vmname.vmdk  

and converting it to ESXi with

vmkfstools -i /vmfs/volumes/source/vmname/vmname.vmdk /vmfs/volumes/dest/vmname/vmname.vmdk -d thin  

I am not able to boot the image an just get

GRUB Loading stage1.5.    GRUB loading, please wait...  _  

and the cursor does not even blink.

What are my options now? Is it possible to recover somehow with a rescue CD? What are the steps?

UPDATE:

I followed the advice to create a new Ubuntu server and add the VMWare image as new disk. However I get the following.

mount: wrong fs type, bad option, bad superblock on /dev/sdb,   missing codepage or helper program, or other error   In some cases useful info is found in syslog - try   dmesg | tail or so  

I was trying to restore the superblock but had no luck with the following commands.

sudo mke2fs -n /dev/sdb  

The above printed several numbers (as described in http://linuxexpresso.wordpress.com/2010/03/31/repair-a-broken-ext4-superblock-in-ubuntu/).

e2fsck -b 20480000 /dev/sdb  

I just keep getting "The superblock could not be read...". Do I have any chance to get the data on this ext3 file system back?

Mapping UID and GID of local user to the mounted NFS share

Posted: 01 Jul 2022 04:41 PM PDT

I have a server with NFSv4. I am mounting contents of the home folder of remote user to local host. Able to read and write contents, but when I am checking ownership of files at the mounted volume from the local host, they all belongs to corresponding remote user and group (512). Is there any way to make it look like they belong to the local user and group (1000) on the local host?

/etc/exports on remote host (IP is 192.168.1.110)

/home/user512 192.168.1.142(rw,sync,all_squash,anonuid=512,anongid=512)  

/etc/fstab on local host (IP is 192.168.1.142)

192.168.1.110:/home/user512    /home/localuser/projects/project512   nfs    rw,hard,intr,rsize=32768,wsize=32768    0       0  

MS SQL 2008 - Can I use Windows Authentication to connect from a Mac

Posted: 01 Jul 2022 06:06 PM PDT

I have been using Navicat SQL on Mac (Snow Leopard) to connect to MS 2005 via "Basic Auth" and all is good. However the DB is now being migrated to MS 2008 and try as I might I cant get on via Windows Auth. I get the message...

[FreeTDS][SQL Server]Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. [FreeTDS][SQL Server]Unable to connect to data source

Any Ideas would be v greatfuly accepted. Many Thanks.

How do I configure MailScanner to use a remote clamd?

Posted: 01 Jul 2022 05:04 PM PDT

I decided to decrease the workload on my mail gateway by moving anti-virus processing to a separate server. I created the server, installed clamav-daemon on it, and tested it by running clamdscan from the mail gateway.

Satisfied, I then changed MailScanner as following:

Virus Scanners = clamd  Clamd Port = 3310  Clamd Socket = clamd server's IP address  

I restarted mailscanner, and got the following result:

MailScanner[45946]: Clamd::ERROR:: UNKNOWN CLAMD RETURN ./lstat() failed: No such file or directory. ERROR :: /var/spool/MailScanner/incoming/45946  

Obviously, MailScanner is not sending the file to be scanned. Instead, it is just telling it to scan a file which, obviously, does not exist on clamd's server.

I find it difficult to believe using clamd in this manner with mailscanner is not possible at all. Rather, I suspect I'm missing something. So... is it possible? If so, what configuration am I missing?

Apache RewriteRule Proxy has bad headers

Posted: 01 Jul 2022 02:03 PM PDT

Im trying to create a proxy from a location on our site to a thrird party's site. Eg

http://www.mysite.com/cat -> proxys to http://www.cat.com

This is the line from my config:

 RewriteRule ^cat/?$ http://cat.com:80 [P]  

The proxy essentially works, but the problem is that it returns an error 400 Bad Request. Looking at the Apache access log of the site im proxying to, the incoming request is:

[18/Oct/2011:13:04:46 +0100] "GET  HTTP/1.1" 400 334 "-" "-"  

There is no referrer, host, anything. The server returns to the browser:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head>  <title>400 Bad Request</title>  </head><body>  <h1>Bad Request</h1>  <p>Your browser sent a request that this server could not understand.<br />  </p>  <hr>  <address>Apache/2.2.12 (Ubuntu) Server at {cut} Port 80</address>  </body></html>  

Any ideas- any help would be great!

Thanks

best way of testing HD throughput for random reads on linux

Posted: 01 Jul 2022 02:57 PM PDT

Is there a benchmark program I can use to measure random read speeds of a vps without interference from the kernel cache? Also looking for something where you can change the read sizes say 4k-64k.

Exporting logon/logoff events from Windows event log

Posted: 01 Jul 2022 04:38 PM PDT

Environment: Windows Server 2008 R2 with Samba 3.5 domain & OpenLDAP backend.

Background: on our previous Terminal Server (Windows Server 2003) we used logon/logoff scripts to log user logins and logouts respectively to plain text files on a network drive. Unfortunately we couldn't capture the remote IP address, only the workstation name.

Now that we're moving to Server 2008, we've discovered that the Event Log captures a huge amount of data - including the remote IP - but there doesn't seem to be an easy way to get the data that we want in the format that we want.

There are several resources that might be a step in the right direction:

My question is: do I try and get some sort of real-time export of events in human readable form (and how), or do I perform periodic parsing via a scheduled task (and how)?

problems connecting through vncviewer

Posted: 01 Jul 2022 06:06 PM PDT

I am currently connecting ok, but all that displays is a black screen in windows vncviewer. I looked at the log and this is what I got. Can someone help explain?

Sun Oct 31 16:20:01 2010   vncext:      VNC extension running!   vncext:      Listening for VNC connections on port 5901   vncext:      Listening for HTTP connections on port 5801   vncext:      created VNC server for screen 0  error opening security policy file /usr/lib64/xserver/SecurityPolicy  sh: /home/andrew/.vnc/xstartup: Permission denied  Could not init font path element unix/:7100, removing from list!  AUDIT: Sun Oct 31 16:20:06 2010: 28746 Xvnc: client 1 rejected from local host    Auth name: MIT-MAGIC-COOKIE-1 ID: -1  

No comments:

Post a Comment