Sunday, March 27, 2022

Recent Questions - Server Fault

Recent Questions - Server Fault


pictures don't show up on my website

Posted: 27 Mar 2022 02:50 AM PDT

I uploaded the pictures on filezilla and doubled checked if they were there and I even cleared the cache, restarted the apache2 server but the pictures won't show up on my site. I'm using alibaba cloud if it matters and I'll post a link to my website if necessary. Please help.

Cannot redirect Yubikey into VMWare Horizon VDI with Ubuntu OS

Posted: 27 Mar 2022 02:25 AM PDT

I am not able to redirect to Yubikey into the VMWare Horizon VDI. the guest OS is Ubuntu 20.04 I have install the vmware client & the required driver with the following command:

sudo ./install_viewagent.sh -m yes -U yes -A yes  sudo apt install yubico-piv-tool yubikey-manager yubikey-personalization-gui libpam-yubico libpam-u2f  

I am able to show the Yubikey is inserted with command, but the Yubikey manager cannot detect the device with the GUI. pls find the enclosed screenshot

enter image description here

sudo pcsc_scan  

Note: I can redirect the Yubikey to VMWare Player with Ubuntu 20.04 OS with the setting modified in vmx file:

usb.ccid.disable = "TRUE"  usb.generic.allowCCID = "TRUE"  usb.generic.allowHID = "TRUE"  usb.generic.allowLastHID = "TRUE"  

How is itpossible to set up - to redirect(?) only mysql to different ip

Posted: 27 Mar 2022 01:25 AM PDT

This case happend at internal network, i am just curious how is it possible to set up so -

when i try to connect with mysql (client or custom app) it redirects me to some non-related IP, though ping and telnet connects fine without any redirect:

user@machine:~/$ telnet 10.42.35.90 3306  Trying 10.42.35.90...  Connected to 10.42.35.90.  Escape character is '^]'.  J  5.6.36�~.sx"=NN�E%&0^iv4?}zkmysql_native_password^CConnection closed by foreign host.    user@machine:~/$ ping 10.42.35.90  PING 10.42.35.90 (10.42.35.90) 56(84) bytes of data.  64 bytes from 10.42.35.90: icmp_seq=1 ttl=128 time=61.7 ms  64 bytes from 10.42.35.90: icmp_seq=2 ttl=128 time=40.2 ms  ^C  --- 10.42.35.90 ping statistics ---  2 packets transmitted, 2 received, 0% packet loss, time 1001ms  rtt min/avg/max/mdev = 40.172/50.956/61.741/10.784 ms    user@machine:~/$ mysql -uusername -h10.42.35.90  ERROR 1045 (28000): Access denied for user 'username'@'10.52.17.0' (using password: NO)  

You can see, when i use mysql some new ip adress appears.

AWS: Restrict external access to Database but allow ECS task to access

Posted: 27 Mar 2022 01:23 AM PDT

I'm not great at network administration so I need some help to do something really basic on AWS. Basically, I have a RDS database on a vpc, let's call it VPC1. The database is also associated with VPC security group "Default: sg1"

I have a API server that needs to access the Database running as a docker image (service) using ECS. This API server is associated with a load balancer on the same VPC ID VPC1. The task has external IP XXX.XXX.XXX.XXX and internal IP YYY.YYY.YYY.YYY

All I want to do is allow the ECS service to access the database, but disable all other external access.

I've tried the following:

  • add the private IP to the inbound SG rule
  • add the public IP to the inbound SG rule
  • Add the security group of the network the task is part of to the SG rule The protocol, for testing, is set to "all"

None of these seem to work. What am I missing here?

Can't see a device listed when creating a vmware datastore

Posted: 27 Mar 2022 12:13 AM PDT

So I am new to vmware and used vmware workstation to install ESXI 7 on my windows 10 pc. I am trying to create a test enviornment where I can have two vm's connect to the internet from my pc.

I did not use an external HD or CD/DVD when installing vmware.. is this why I am not seeing any device listed for my vmware devices.

How do I add a device to then create a datastore?

error The Process class relies on proc_open, which is not available on your PHP installation

Posted: 27 Mar 2022 12:39 AM PDT

after change server and setup centos with cpanel lumen cron job not worked and every minutes add this error to lumen log:

The Process class relies on proc_open, which is not available on your PHP installation. in /home/username/public_html/api/vendor/symfony/process/Process.php:143

i see active php version ini and remove proc_open from disabled function and restart litespeed but not fix this problem i change lumen config but not fix . if you now how can i solve this problem pls help me .

The access to shared directory using DFS is very slow

Posted: 27 Mar 2022 02:14 AM PDT

I have an Active Directory with 1 DC and 1 DFS deployed on hyper-v VM on a certain machine X. The DFS consists of several shared folders from machine X and folders from machine Z. When I try to access the DFS using network drive all works fine for machine Z folders. But I have some problems with folders from machine X. The access to machine X folders is very slow. Sometimes it takes several minutes to open even small file. When I try to upload files to machine X folders all works fine but the download speed is very small. The upload speed is about tens of Mb/s but download speed ~ 100 kb.

Any help is appreciated.

RTNETLINK answers: Invalid argument when adding route

Posted: 27 Mar 2022 12:07 AM PDT

I wish to add static route for my interface eth1. But Whenever I use route command , I get this annoying error RTNETLINK answers: Invalid argument.

Current routing configuration

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface    10.73.55.172    0.0.0.0         255.255.255.252 U     0      0        0 eth2  10.64.23.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0  169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0  169.254.0.0     0.0.0.0         255.255.0.0     U     1004   0        0 eth2  169.254.0.0     0.0.0.0         255.255.0.0     U     1005   0        0 eth3  0.0.0.0         10.73.55.173    0.0.0.0         UG    0      0        0 eth2  

For eth0 , I want to have default gateway 10.64.23.1 and for eth2 , I want to have gateway as 10.73.55.173. By configuration is as follows:

ifconfig eth0    eth0      Link encap:Ethernet  HWaddr 28:80:23:AF:E0:4C            inet addr:10.64.23.36  Bcast:10.64.23.255  Mask:255.255.255.0            inet6 addr: fe80::2a80:23ff:feaf:e04c/64 Scope:Link    ifconfig eth2  eth2      Link encap:Ethernet  HWaddr 28:80:23:AF:E0:4E            inet addr:10.73.55.174  Bcast:10.73.55.175  Mask:255.255.255.252            inet6 addr: fe80::2a80:23ff:feaf:e04e/64 Scope:Link  

I am using CentOS release 6.4

cat /etc/sysconfig/network-scripts/ifcfg-eth0  DEVICE=eth0  BOOTPROTO=static  #HWADDR="28:80:23:AF:E0:4C" IPADDR=10.64.23.36  #IPV6INIT="yes" NETMASK=255.255.255.0  #NM_CONTROLLED="no" ONBOOT=yes GATEWAY=10.64.23.1 TYPE="Ethernet" UUID="bdb726be-c3ce-404d-ba56-7a46906745af"    MAL_SIG_1_8_1:/home/mclaw# cat /etc/sysconfig/network-scripts/ifcfg-eth2  DEVICE="eth2"  BOOTPROTO="static" IPADDR=10.73.55.174  #DHCP_HOSTNAME="mc-inst"  #HWADDR="28:80:23:AF:E0:4E"  #NM_CONTROLLED="yes" NETMASK=255.255.255.252 GATEWAY=10.73.55.173 ONBOOT="yes"  #DEFROUTE=no TYPE="Ethernet" UUID="5be9a274-6146-4ad0-9135-7fcc612ec2b7"    MAL_SIG_1_8_1:/home/mclaw# cat /etc/sysconfig/network  NETWORKING=yes  HOSTNAME=MAL_SIG_1_8_1  #GATEWAY=10.64.23.1  

Whatever ip route command , I give it gives me following error.

ip route add 10.73.55.174/30 via 10.73.55.173 dev eth2  

RTNETLINK answers: Invalid argument

Elastic Beanstalk Health Degraded

Posted: 26 Mar 2022 11:01 PM PDT

I am trying to to deploy an Node.js Docker image to Elastic Beanstalk using Travis CI. The tests and builds in Travis keep passing and successfully deploying however, I keep getting the following warn and error on my Elastic Beanstalk console

WARN: Environment health has transitioned from Info to Degraded. Incorrect application version found on all instances. Expected version "Sample Application" (deployment 1). Application update failed 31 seconds ago and took 15 minutes.

ERROR: During an aborted deployment, some instances may have deployed the new application version. To ensure all instances are running the same version, re-deploy the appropriate application version.

I am using the free tier so I am not sure if that's the issue or what exactly I am doing wrong. Below is what my .travis.yml file looks like:

  sudo: required  services:  - docker  before_install:  - docker build -t poolafrica/pool_auth -f Dockerfile.dev .  script:  - docker run poolafrica/pool_auth npm run test -- --coverage    deploy:    provider: elasticbeanstalk    edge: true    access_key_id: $AWS_ACCESS_ID    secret_access_key:      secure: $AWS_SECRET_KEY    region: eu-west-2    app: pool_auth    env: PoolAuth-env    bucket_name: elasticbeanstalk-eu-west-2-747115545713    on:      branch: master      skip_cleanup: true  

msmtp and OVH mail

Posted: 27 Mar 2022 02:53 AM PDT

I'd like to send a mail when a user authenticates on a Debian 9 server. I use OVH mail server. I've set up msmtp like so :

account myaccount  tls_starttls off  logfile ~/.msmtp.log    host ssl0.ovh.net  port 465  from user@mydomain.com  auth on  user user@mydomain.com  password XXXXXXXXXXXXXXXX    account default : myaccount  

I tried to send a mail with :

echo "Hello this is sending email using msmtp" | msmtp otheruser@mydomain.com  

But didn't work, nothing happens. Same for the command :

msmtp --serverinfo --tls --tls-certcheck=off --host ssl0.ovh.net --port 465  

EDIT 1

I tried the command proposed by @Anfi in the comments and I get :

-bash: subject:: command not found  ignoring system configuration file /etc/msmtprc: No such file or directory  loaded user configuration file /home/myuser/.msmtprc  falling back to default account  using account default from /home/myuser/.msmtprc  host = ssl0.ovh.net  port = 465  proxy host = (not set)  proxy port = 0  timeout = off  protocol = smtp  domain = localhost  auth = choose  user = user@mydomain.com  password = *  passwordeval = (not set)  ntlmdomain = (not set)  tls = off  tls_starttls = off  tls_trust_file = (not set)  tls_crl_file = (not set)  tls_fingerprint = (not set)  tls_key_file = (not set)  tls_cert_file = (not set)  tls_certcheck = on  tls_min_dh_prime_bits = (not set)  tls_priorities = (not set)  auto_from = off  maildomain = (not set)  from = user@mydomain.com  add_missing_from_header = on  add_missing_date_header = on  remove_bcc_headers = on  dsn_notify = (not set)  dsn_return = (not set)  logfile = /home/myuser/.msmtp.log  syslog = (not set)  aliases = (not set)  reading recipients from the command line  msmtp: the server sent an empty reply   msmtp: could not send mail (account default from /home/myuser/.msmtprc)  

AWS "No credentials specified" even when EC2 IAM policy applied

Posted: 27 Mar 2022 12:07 AM PDT

This is an odd issue which we can't find a solution for.

On AWS, we are running Microsoft Remote Desktop Services on Windows Server 2019. All servers are joined to an AWS AD Directory Services domain.

The RDC Host Servers have an IAM policy that allows all actions to S3.

We have two users in the domain, both assigned to the same group - the default group "Domain Users".

When we log in to a Session Host with one user, we have no problem calling "Get-S3Object". But when we log in with the second user and call "Get-S3Object", we get "No credentials specified or obtained from persisted/shell defaults" - permissions should be given by the IAM policy attached to the EC2 which works for the first user.

To fix the problem, we have found that if we delete the second users' Windows profile, then the next time the second user logs in, they are given a TEMP profile and they are able to call "Get-S3Object", so clearly there is a problem with the user profile.

The Windows Servers are practically a vanilla instance and it's strange that deleting the User's profile fixes the issue...

We have also created a new domain user which had the same problem on one Session Host but not on another. It's a very random issue.

Has anyone else come across this problem? What can be causing this to happen?

HAProxy agent-check over http

Posted: 27 Mar 2022 02:05 AM PDT

I have to setup haproxy with agent-check, the backend servers reporting themselves their weight ("28%" for example) over http. Seems like haproxy can't speak http with it's agents, which seems weird. Is there no way to do it ?

I've tried this :

   server X X:80 agent-check agent-port 80 agent-send "GET /some/url HTTP/1.0\r\n" check observe layer7  

Which may or may not work, I actually have no idea. Is there any way to tell if the agent-check are succeeding or not ? The statistics page doesn't seem to change whether the url is valid or not. I'm guessing it's not working, because haproxy must be expecting just the value, not any of the http around it.

Connect MongoDB Compas to GCP Ubuntu VM

Posted: 26 Mar 2022 11:01 PM PDT

I am a little lost on how should I host MongoDB on Ubuntu VM. I barely worked with Ubuntu before so I struggle to understand a lot of aspects.

I followed guide: https://docs.mongodb.com/tutorials/install-mongodb-on-ubuntu/

And everything seemed to work in GCP VM SSH console. I was able to login to DB with admin login and password. But I don't understand why I cannot connect to it from external resources and how to debug the issue.

I am trying to access DB with VM external IP, provided by GCP compute engine, I used existing authentication information but it doesn't work, all I get is this error after around a minute of waiting:

Could not connect to MongoDB on the provided host and port

Is there any guide or advice to help me understand what exactly is wrong? I am lost and don't know what to check to even find the issue.

Create screen session in background only if it doesn't already exist

Posted: 27 Mar 2022 03:00 AM PDT

How can i create a screen in detached mode only if it doesn't exist?

This creates a screen named name in detached mode but will create duplicates

screen -dmS name command  

This creates a screen only if it doesn't exist but not detached

screen -dRms name command  

How do i combine both? I need to create multiple screens in a batch file so reattaching is not convenient. I want to use the batch file to "restart" screens that have died for various reasons but leave the already running ones intact.

Mount VHD as ReadOnly

Posted: 27 Mar 2022 03:03 AM PDT

So I have the following scenario - two servers, one is Web server, another is a Backup server. Both running Windows Server 2012 R2

I have a mapped drive on Web referencing Backup I have a VHD I created on the Map drive, physically located on Backup that is being used by Web in order for Windows Server Backup to do nightly images to this VHD. The idea is to have the images physically stored on the Backup server, but performed from the Web server.

I have this VHD showing as a real drive in My PC on Web.

I'd like to mount this VHD as Read Only on the Backup server so I can take a peak every now and then to make sure the backups are showing up / access if necessary.

The problem is when I try to mount the VHD on the Backup as Read Only I receive "The process cannot access the file because it is being used by another process"

I'm suspecting they are saying this because its mounted on Web.

I'm wondering if there is any way I can accomplish what i'm hoping to accomplish or if its not possible.

FYI - HyperV/VM backups aren't a possibility in this scenario.

Squid Proxy: 400 Bad Request when "%25" (Percent Sign) in URL

Posted: 27 Mar 2022 02:05 AM PDT

I have a squid proxy that works well except for this issue:

If a URL has a %25 inside of it (the percent sign), we get a 400 Bad Request and Bad Request is displayed to the web browser.

Example URL: http://www.amazon.com/25%25-Percent-Off-Stickers-Adhesive/dp/B00J0IBJ0S/

Log:

12/Jan/2016:18:40:28 -0600 429 MY.IP.IS.HERE TCP_MISS/400 310 GET http://www.amazon.com/25%25-Percent-Off-Stickers-Adhesive/dp/B00J0IBJ0S/ - ROUNDROBIN_PARENT/three text/html

I'm not sure if this is a bug or a configuration error. I have a round robin setup as shown above. Here is the output of squid3 -v:

Squid Cache: Version 3.1.19 configure options: '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=${prefix}/lib/squid3' '--srcdir=.' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' '--datadir=/usr/share/squid3' '--sysconfdir=/etc/squid3' '--mandir=/usr/share/man' '--with-cppunit-basedir=/usr' '--enable-inline' '--enable-async-io=8' '--enable-storeio=ufs,aufs,diskd' '--enable-removal-policies=lru,heap' '--enable-delay-pools' '--enable-cache-digests' '--enable-underscores' '--enable-icap-client' '--enable-follow-x-forwarded-for' '--enable-auth=basic,digest,ntlm,negotiate' '--enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SASL,SMB,YP,DB,POP3,getpwnam,squid_radius_auth,multi-domain-NTLM' '--enable-ntlm-auth-helpers=smb_lm,' '--enable-digest-auth-helpers=ldap,password' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-external-acl-helpers=ip_user,ldap_group,session,unix_group,wbinfo_group' '--enable-arp-acl' '--enable-esi' '--enable-zph-qos' '--enable-wccpv2' '--disable-translation' '--with-logdir=/var/log/squid3' '--with-pidfile=/var/run/squid3.pid' '--with-filedescriptors=65536' '--with-large-files' '--with-default-user=proxy' '--enable-linux-netfilter' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security' 'LDFLAGS=-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security' --with-squid=/build/squid3-FzlLQ3/squid3-3.1.19

uname -a:

Linux MyHostName 3.13.0-44-generic #73~precise1-Ubuntu SMP Wed Dec 17 00:39:15 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

(It's an Ubuntu 12.04.5 LTS server)

The hack with this URL would simply be to have something strip out the %25 but that wouldn't work on all destination websites.

The URL works fine when not going through the proxy.

Thanks for any ideas, I'm willing to provide more config info.

Limit monthly traffic per interface

Posted: 27 Mar 2022 03:03 AM PDT

I'm trying to deploy an application for a limited monthly traffic. Please can you tell me how can I do this ? I need to limit traffic on an interface under linux.

No comments:

Post a Comment