Recent Questions - Server Fault |
- php-fpm & Apache 2 - analysing PHP Message: logs
- Ubuntu dns cache issues - can't connect to several hosts
- Name resolution between On-premises and GCP environment
- Best way to create yaml files that have a variable number sections based on host
- Postfix emails error, loops back to myself
- How to identify cloud server to remove online document? [closed]
- Cannot clone a bitbucket.org project to Linux Ubuntu via WSL in a Windows10
- Azure Flow Logs not logging all traffic
- mdadm mdadm: cannot open Device or resource busy
- How to reserve a processor in Windows Server for Remote Desktop
- How to issue SSL certificate with Nginx docker container using FreeIPA?
- No User exists for 'query user'
- send email from another server than FROM domain without being marked as spam
- check what processes connecting to external port
- Change default docker registry in Openshift 4.7
- Setup Centos 8 with 2 IP addresses on seperate subnets
- PHP unable to identify sqlsrv_connect() function while trying to connect SQL Server
- Using CodeGear/Embarcardero scktsrvr.exe on Linux
- Installing Oracle Java in Red Hat Enterprise Linux
- Website responds very slow using remote database
- Directory traversal fix for nginx config
- port mapping didn't happen for a container deployed on AWS ECS(uses EC2)
- puppetdb 6.3.3 can't connect to postgresql-11
- Is there any difference between Domain controller and Active directory?
- nginx check if filename with different extension exists
- web server behind NAT cannot be accessed by the same network using NAT router IP or domain
- monit send email does not work
- IIS 7 and ASP.NET State Service Configuration
php-fpm & Apache 2 - analysing PHP Message: logs Posted: 04 Jan 2022 07:51 AM PST One of my servers has recently been switched to using php-fpm. The error logs now log 404's in a new format: I previously used a command-line script (using But, before I jump in and start editing this script I was suspecting there must be a better way to parse these large log files. Any suggestions for a better approach? |
Ubuntu dns cache issues - can't connect to several hosts Posted: 04 Jan 2022 07:41 AM PST |
Name resolution between On-premises and GCP environment Posted: 04 Jan 2022 07:40 AM PST I have an environment similar to the diagram below: https://cloud.google.com/dns/images/hybrid_arch_using_a_single_shared_vpc_network.svg I followed these instructions: https://cloud.google.com/dns/docs/best-practices#hybrid-architecture-using-single-shared-vpc-network Steps:
I have a DNS server configured: test.local
I created the DNS using the command: test.gcp Type A records were created pointing to servers.
Local and GCP are allowed.
Results: Name resolution works only in the GCP environment, locally not responding. Teste em um servidor na GCP: On-premise GCP However, when I try to do name resolution from the local environment to GCP the name is not resolved. My question is if the way it's being done is wrong or if there's still some procedure not listed in the documentation.
|
Best way to create yaml files that have a variable number sections based on host Posted: 04 Jan 2022 07:53 AM PST I am trying to use ansible to deploy configuration files out to hundreds of machines in which different machines will have multiple iterations of specific configuration snippets. Specifically I am using the promtail log parser and different machines will have different log file locations to parse with different labels. Ideally I want to keep the ansible configuration pretty simply so I can just use pull requests to make changes to the various sections. Initially I was going to use group_vars and have each log file location being defined in the group_var. Which works fine as long as I am only building a single log location. Once I need multiple log locations, it breaks as I will only have one value returned from group_vars. To illustrate. I could just possibly look to iterate through each group and then append the the output to the config file but I don't see a way to do that with the template function. Ideally I could just iterate through all of the log file locations but I'm not sure how to do that. Or maybe I could use an external variable file and then use a conditional of some sort to determine which hosts get which configuration? Same data in the group_vars... Here is the jinja template |
Postfix emails error, loops back to myself Posted: 04 Jan 2022 07:44 AM PST I'm struggling with Postfix to send out emails from a form on my website: Google Domain, hosting provided by DigitalOcean with a LAMP droplet; this is my DNS config: Mail function on my .php file wants to send an email from: all goes succesfully except emails are not actually sent.
Here's my I looked every guide available to tweak |
How to identify cloud server to remove online document? [closed] Posted: 04 Jan 2022 07:15 AM PST I'm currently dealing with a copyright issue. Someone is hosting an article that I created at this website: 'https://content.app-sources.com/s/43300185708660311/uploads/Reports_/Short_Communication_-_Poaching_in_the_COVID-19_world-6937706.pdf' . We are trying to identify the source and only managed to figure out it is some kind of cloud hosting service. However, we are unable to identify what cloud service it is. Ideally we also would like to find out the associated account so that we can contact that person. I hope this is the right forum to post these kind of questions. If not, I would appreciate it if you could point me towards the right forum on StackExchange. |
Cannot clone a bitbucket.org project to Linux Ubuntu via WSL in a Windows10 Posted: 04 Jan 2022 07:08 AM PST So I try to clone a project via Visual Studio Code using a Linux Machine connected with WSL in my Windows System. I get the error "fatal: unable to access '.....git/': Failed to connect to bitbucket.org port 443: Connection timed out I can do a ping to bitbucket.org. If I open Visual Studio code using only windows, I can clone the project. What could it be? |
Azure Flow Logs not logging all traffic Posted: 04 Jan 2022 07:11 AM PST I managed to setup NSG Flow Logs in Azure for one of my NSG's using the MS documentation: https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-nsg-flow-logging-overview I can download the JSON files from the storage account and inspect them. I also can use the PowerBI dashboard and view the information generated from the flow logs. I used the modified PowerBI dashboard from Sameeraman: Now I want to modify the PowerBI dashboard in such a way that I can view the amount of bytes sent and received from or to hosts. I am able to do this, however, when setting it up, I noticed that not all traffic seems to be logged. I used 2 methods to generate traffic from my local machine to the azure VM through the internet as test. I copied several large files via RDP and have created a linked server on my local SQL Server instance to the SQL Server instance on the Azure VM and inserted a bunch of data into tables on a test database there. Now, I don't see the traffic in the NSG logs as I would expect. I would expect that there were a lot of entries or at least 1 entry that states a lot of bytes have been transferred, but none of that. I only see a single entry in the NSG log, but without any bytes sent. As an example: "1641291993,x.x.x.x,10.0.2.4,54955,1433,T,I,A,B,,,," The above is flow state 'Begin' and there is no 'C' for 'Continue' or 'E' for 'End' to be found in any log following up this one. So I was thinking that the session might still be open and then it probably would log one entry again with the 'End' flow state, mentioning the amount of bytes sent in total for that session (since the bytes sent are accumalative, refer to docs), when I closed my SQL Server Management Studio for example. This did not seem to work. There were no subsequent log entries from the particular source IP. Nothing at all. So to summarize, i created an NSG Flow Log for a particular NSG that is applied to the subnet of a specific VM. I then generated network traffic by copying large files to the VM and inserted data via SQL Server in a table in a database on that VM from my local workstation. Then I looked at the NSG flow log entries, but found only 1 entry for every action (e.g. the sql inserts), even when i closed my session (e.g. SSMS) to the VM. To be sure, I also created a separate rule in the NSG for in and outbound to allow traffic to and from this Azure VM on that particular port. This way the packets I send from my local machine should be matched to and logged under that rule. So Iam wondering if Iam doing something wrong here or does the logging work different from my expectations? |
mdadm mdadm: cannot open Device or resource busy Posted: 04 Jan 2022 06:42 AM PST i have 2 Drives on my Ubuntu Server: /dev/nvme0n1 /dev/nvme1n1 and i want to create a RAID 0 but when i run this: sudo mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/xda /dev/xdb i get this output: mdadm: super1.x cannot open /dev/nvme0n1: Device or resource busy mdadm: ddf: Cannot use /dev/nvme0n1: Device or resource busy mdadm: Cannot use /dev/nvme0n1: It is busy mdadm: cannot open /dev/nvme0n1: Device or resource busy I think nvme0n1 is the same one where Ubuntu is also installed on and thats why it doesnt work but i dont have that much experience with Linux |
How to reserve a processor in Windows Server for Remote Desktop Posted: 04 Jan 2022 06:29 AM PST Windows Server 2012 R2, every once in a while a runaway process will take up all the CPU and my RDP session will either take forever to start or disconnect after a long wait. Is there a way to reserve a CPU so that I never have an issue Remoting into the server? |
How to issue SSL certificate with Nginx docker container using FreeIPA? Posted: 04 Jan 2022 06:10 AM PST Instead of using a self-signed SSL certificate (untrusted) I want to issue certificate from a trusted source in this case from a FreeIPA instance (I'm new to FreeIPA). How can this be done? Is Kerberos required for this? |
No User exists for 'query user' Posted: 04 Jan 2022 06:03 AM PST I have one weird issue on the virtual machine. When I do 'query user user1' is not showing the active session of the user. It says 'No User exists for user1', though there is active connection. However it works fine for other users. Why is this happening? Please help. Thanks. |
send email from another server than FROM domain without being marked as spam Posted: 04 Jan 2022 07:26 AM PST I want to send a mail from a website. The mail server from this domain is not publicly reachable, so I can't use that to send the mail. The webserver that hosts the website has another email server that I can/have to use. But I want the FROM to be the website domain. How can I set this up without my mails being marked as spam for claiming to be from the website domain when the mail server that sent it is not. Not sure if I am clear. Maybe an example helps: So I want to send a mail via the So far I've read that a SPF record on the DNS is all I need. Is that correct? Is that the best practice? Can some help me with the correct entry? |
check what processes connecting to external port Posted: 04 Jan 2022 05:57 AM PST I am running an email server for a school associaltion and we offer email forwarding service for graduated students, offering them an email alias in our domain name, like johndoe@someschoolgrad.com, and we forward the email to their designated personal address registered with us. We have recently upgraded from a very old email server on which newer TLS ver is no longer supported, and moved to a ubuntu20 postfix + spamassassin + perl spf check config. After setup we found that the IP does have bad reputation for sending spam email. I checked again the postfix main.cf and the postfix should not be working as open relay. the email volume lookup was a bit worrying as some website seems to record my IP sending 1 out of 30 million email in the world on some days https://talosintelligence.com/reputation_center/lookup of course I don't think they have bugged my server to check me so I don't know where their data come from I am thinking of checking if there is any other program which may be sending email on my server I have setup ufw to allow destination port 25 out with loggin I am seeing around 6000 out entries in the past 60 hours in ufw.log by grep "DPT=25 ", which looks reasonable to me given we have members at order of 1000. also checked mail.log, the count of lines of for delivery (250 ok, 550*, 454*) adds to roughly 3000 lines. And also I have seen many times postfix try to delivery some non-delivery notice but the connection is either timeout or rejected. I have since increased min and max backoff time, and decreased queue lifetime to try reduce retry volume of some spam email we receive at the aliases. I also receive bounce from for example gmail and some other smtp server
|
Change default docker registry in Openshift 4.7 Posted: 04 Jan 2022 05:25 AM PST How can I change default docker image registry in Openshift ? I already modified How can I change the default repo? Thank you |
Setup Centos 8 with 2 IP addresses on seperate subnets Posted: 04 Jan 2022 05:02 AM PST Im trying to setup a virtual machine with 2 different ip's example below IP1 : 10.17.252.0 IP2 : 10.16.51.0 Gateways = .254 for both subnets The vm needs to be able to communicate with both subnets throughout the gateways configured. |
PHP unable to identify sqlsrv_connect() function while trying to connect SQL Server Posted: 04 Jan 2022 06:43 AM PST I'm trying to connect to my local MSSQL Server from a simple PHP file using the sqlsrv_connect() function, but every time I'm calling the file in the browser through localhost, it's throwing a 500 (Internal Server Error) saying: "PHP Fatal error: Uncaught Error: Call to undefined function sqlsrv_connect() in C:\inetpub\wwwroot\AJAX_Tutorial\get_db_data.php:4". get_db_data.php is the file from which I'm trying to connect the server. Seems like PHP or the localhost can't identify the sqlsrv_connect() function. But as far I'm concerned, I did all the needful to make sure PHP connects the SQL Server. My environment: Windows 10 Pro, Version 21H2, 64-bit. What I have done:
After the steps above, I ran the actual PHP file trying to connect the SQL Server, but it's throwing an error saying it can't identify the sqlsrv_connect() function. Assuming the php_sqlsrv_80_nts_x64.dll not being loaded while PHP is starting, I ran php --ini in the command prompt. That's when the following messages are being thrown: PHP Warning: PHP Startup: Unable to load dynamic library 'php_wincache.dll' (tried: ext\php_wincache.dll (The specified module could not be found), ext\php_php_wincache.dll.dll (The specified module could not be found)) in Unknown on line 0 Warning: PHP Startup: sqlsrv: Unable to initialize module Module compiled with module API=20200930 PHP compiled with module API=20210902 These options need to match in Unknown on line 0 Configuration File (php.ini) Path: Loaded Configuration File: C:\Program Files\PHP-8.1.1\php.ini Scan for additional .ini files in: (none) Additional .ini files parsed: (none) However, PHP seems to be running fine, because when I used jQuerey AJAX get() and post() method from an HTML file to fetch data from another PHP file, I was successfull in doing so. No exception was thrown then. So what am I missing now that neither php_wincache.dll and sqlsrv seem to load during PHP startup, nor can I connect the SQL Server from the PHP file? As I'm new in jQuery AJAX and PHP, I'm not much aware of the intricacies of them and hence, stuck with the issue for the past four days. I've used every resource in my hand, but nothing is working. Please help. I can't get ahead with my tasks because of this. Thanks and Regards! get_db_data.php code: |
Using CodeGear/Embarcardero scktsrvr.exe on Linux Posted: 04 Jan 2022 05:48 AM PST Happy New Year to y'all! We're trying to adapt (not port) an application that was developped using WinDev so it can be run in Linux, for various reasons. Thanks to Wine, the application installs alright, but we're at a standstill because CodeGear/Embarcadero's scktsrvr.exe won't start. Is there a way to make it work in Linux (Ubuntu or a derivative)? It installs as part of the software package we're hoping to make work on Linux and is used to connect the application to an Advantage Database Server, which installs just fine too. Without this socket or a substitute, we're stuck. Any help would be greatly appreciated. |
Installing Oracle Java in Red Hat Enterprise Linux Posted: 04 Jan 2022 07:22 AM PST I am seeking advice on a solution for updating Oracle Java in a large number of hosts - We have a large number of RHEL hosts, and we would like to use yum update rather than rpm install for upgrading Oracle java, as yum update would install the latest version of the java on those hosts, and we can easily automate the version upgrade through using yum update playbooks. However, my understanding is that yum is a non-standard means of installing Oracle's Java runtimes. Also in order to use yum install, we must have a repository, but Oracle's repository is only available for Oracle Linux rather than RHEL. Is there any solution where we can use yum update in RHEL with Redhat repository which contains the Oracle Java packages? As I am new to this, any advice would be greatly appreciated. |
Website responds very slow using remote database Posted: 04 Jan 2022 07:52 AM PST I want two same websites to share one database. One server is in Asia, hosting a website and the database. Another server is in the US, hosting the same web via remote database. However, the web in the US responds very slow but when moving the database to the local server(US server), the web responds fast. How to speed up the connection between the server in the US and the database in Asia? I am using Centos7+Nginx+MySQL. |
Directory traversal fix for nginx config Posted: 04 Jan 2022 04:44 AM PST I discovered that my website has this issue and I wasn't able to fix this. I tried several things like to checking if parent prefixed locations for Nginx alias directives end with a directory separator , but no luck so far. Merge_slashes on - is the default setting. I've read about AppArmour or SELinux. Is that the way to go? I have Ubuntu 18. In other words, I'm able to download this file http://example.com///etc/passwd and I want to avoid this. Any help is appreciate. Here is my config: |
port mapping didn't happen for a container deployed on AWS ECS(uses EC2) Posted: 04 Jan 2022 04:56 AM PST Context:I am using Circle CI's Debugging
And here are the open ports of the EC2 instance: As you can see, port 3000 is not listed here. Here is the task with port mappings which deployed the container (to AWS ECS) that you see Here is the task running on my EC2 instance with the task-definition shown above and the network mode I am using is 'awsvpc': Here's the "Networking" tab of ENI associated with the task, and also the inbound rule of the security group associated with the EC2 instance that the task is running inside, which accepts requests on port 3000 from all IPs. EDIT 1:After I did inside the EC2 machine(by SSHing from my laptop), I could send API requests and receive proper response to the container to it's public IP, of the cluster of AWS ECS. This means that ports are being mapped only when I run the container manually. I had no problems with ports when I used FARGATE, when I updated the service from Circle CI or even when I manually started tasks. So, how to automatically map ports when a task is run from AWS ECS service dashboard or from Circle CI? If I run docker container manually, I will not be able to get logs automatically from AWS Cloudwatch and will not be able to stop it from AWS ECS dashboard. Another container by AWS that is running in EC2 instance will take care of those things. It will route the logs to Cloudwatch and accepts stop the existing one and start commands to start a new container with new image stored in AWS ECR, without having to SSH everytime I would want to look at logs or start/stop containers. What has gone wrong here, which led to ports not being mapped and How do I fix it and map ports properly, so i will be able to send API requests to my container. |
puppetdb 6.3.3 can't connect to postgresql-11 Posted: 04 Jan 2022 07:07 AM PST semanage confirms my host is running in permissive mode. I can login to postgresql as user puppetdb when I don't use a password like this:
netstat -tlpn |grep postmaster shows The error I see in /var/log/puppetlabs/puppetdb/puppetdb.log by the hundred is: /var/lib/pgsql/11/data/pg_hba.conf contains: postgresql-Fri.log is full of
|
Is there any difference between Domain controller and Active directory? Posted: 04 Jan 2022 05:27 AM PST If I want to define domain controller then i would say DC is where active directory installed or Acitve Directory simply means: Secure centralized authentication and management and domain controller = ADDS + DNS. But I get confused when i read here that
I want to know is it correct or wrong? If wrong then what is the difference? |
nginx check if filename with different extension exists Posted: 04 Jan 2022 07:07 AM PST If a file with ".html" extension doesn't exist I need to know if the same file exists with ".th.html" extension and make a redirect. Right now on 404 I'm doing a rewrite and if $request_filename exists I do the redirect. I'm wondering if there is a better way to do that without rewrite. Maybe something like Thank you. Edit: All requests from browser will come with .html, but in case the file with .html doesn't exist, I have to check if the same file exists with .th.html and do redirect only on this case. Edit2: Let's say someone access
All this time the user must see only Notice that .th.html is handled by another application |
web server behind NAT cannot be accessed by the same network using NAT router IP or domain Posted: 04 Jan 2022 05:07 AM PST I have 1 host server as NAT server, it has public domain name I have another web server behind NAT with IP address
I have some other servers behind NAT with fixed ip address range
the above rules can let my servers behind NAT access internet. (download and ping public ips). My web page can be accessed from the internet by visiting I wonder, why the web server behind the NAT firewall cannot be accessed by its peers by using NAT server domain name or IP? Do I need to add |
monit send email does not work Posted: 04 Jan 2022 04:49 AM PST I am trying to use monit, and set up email server using gmail. The configuration file is like this: And I set an alert to test: But when I use monit validate, the error message I got is this: Anyone has any ideas? Thanks a lot |
IIS 7 and ASP.NET State Service Configuration Posted: 04 Jan 2022 05:07 AM PST We have 2 web servers load balanced and we wanted to get away from sticky sessions for obvious reasons. Our attempted approach is to use the ASP.NET State service on one of the boxes to store the session state for both. I realize that it's best to have a server dedicated to storing sessions but we don't have the resources for that. I've followed these instructions to no avail. The session still isn't being shared between the two servers. I'm not receiving any errors. I have the same machine key for both servers, and I've set the application ID to a unique value that matches between the two servers. Any suggestions on how I can troubleshoot this issue? Update: I turned on the session state service on my local machine and pointed both servers to the ip address on my local machine and it worked as expected. The session was shared between both servers. This leads me to believe that the problem might be that I'm not using a standalone server as my state service. Perhaps the problem is because I am using the ip address 127.0.0.1 on one server and then using a different ip address on the other server. Unfortunately when I try to use the network ip address as opposed to localhost the connection doesn't seem to work from the host server. Any insight on whether my suspicions are correct would be appreciated. |
You are subscribed to email updates from Recent Questions - Server Fault. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment