Recent Questions - Server Fault |
- How to delete specific files older than 1hour on cronjob?
- Setting up SSL for custom port in nginx - letsencrypt
- Using Podman containers with Ansible
- ASUS router notifying a local device on device connect/disconnect?
- Kubernetes V1.19.13 - kubeapi servers not able connecting to different etcd database
- If you're seeing this Grafana has failed to load its application files
- How to delete specific files?
- After adding a new DNSBL to Sendmail, how can I resubmit an email to see if it will be rejected?
- How can I let apache server work always on my ec2 instance?
- Packets from xfrm interface won't route, but opposite works
- Rebooted Ubuntu server, nginx site no longer accessible from browser
- Any way to join a server to Active Directory Domain by IP address in hostfile and not DNS?
- Tomcat 9 Service on Centos 7 won't start up at system boot
- How can I install the ngx_http_geoip2_module module ? on Centos
- Unable to NAT TFTP traffic because iptables is not forwarding the return connection to the client despite TFTP helper creating an expectation
- Migrating Jenkins jobs from one server to another
- SSH Suddenly returning Invalid format
- Adding Tag (i.e. Source IP) to rsyslog for sending to rsyslog remote server
- Nginx configuration for Deluge
- How to show a 404 instead of a 403 on apache host
- dmidecode weird total/data width
- nginx 405's with try_files for a DELETE request instead of proxying
- Redirect IP to a domain name using htaccess
- "A new version of /boot/grub/menu.lst is available" when upgrading Ubuntu on an AWS server
- Raid 1 can not sync with new Drive . its stopping at 30 %
- Bitnami redmine error SVN
- zimbra Error when installing
- Permanently assigning IP address for an embedded device
- E: Sub-process /usr/bin/dpkg returned an error code (100)
How to delete specific files older than 1hour on cronjob? Posted: 31 Jul 2021 10:24 PM PDT I'm using cronjob for Ubuntu 20.04. I want to auto delete files older than 1hour and only files with filename begins with master-stdout.log* How can I do this? |
Setting up SSL for custom port in nginx - letsencrypt Posted: 31 Jul 2021 10:18 PM PDT I'm trying to enable SSL on a custom port (not 443), running a webpage. From searching around, I couldn't find much info that helped. The server has unchangable ports, external: 26143, Internal: 80. To enter the server (without SSL) you would type example.com:26143, and the system would see this as a connection to port 80. How would I set up a certificate (lets encrypt) to enable SSL on this port? From testing, it seems like whatever I do, it only accesses the server on port 80, even if I set it to 26143 here is the nginx sites-enabled config: Commands I've tried are: Some tweaking back and fourth, most common error I got was this: The 404 is Not from my system, it's from example.com:80, instead of example.com:26143. Also, I do not have access to modifying the DNS records. In my experience, lets encrypt and SSL has been kind of confusing, and together with the rate limits, I'm not able to troubleshoot enough to understand. I know it should be possible, I just don't know how and/or what I'm doing wrong. Any help would be appreciated |
Using Podman containers with Ansible Posted: 31 Jul 2021 08:42 PM PDT I created an ansible role with podman to pull the nginx image and run the container which works but i would like to now copy a custom index html from the host to the container so that it overrides the default index html page do we use volumes if so how do we use it for this scenario in the yml file? Appreciate your help. |
ASUS router notifying a local device on device connect/disconnect? Posted: 31 Jul 2021 07:55 PM PDT I have a Asus RT-AX88U router, which comes with the ability to work with Alexa and IFTTT for things like notification when it detects that a device is connected/disconnected. However, I don't like the idea of sending this kind of information over the internet, and rather prefers to have a local server that processes these triggers and notifies me with other means. Is there a way to hack the router/are there unofficial APIs that I can use to get the same functionality without IFTTT/Alexa? |
Kubernetes V1.19.13 - kubeapi servers not able connecting to different etcd database Posted: 31 Jul 2021 07:51 PM PDT I have upgraded Kubernets cluster ( 3 master, 3 etcd servers database) from Any help to resolve this issue? Is there know issue with this version? API server logs etcd looks healthy |
If you're seeing this Grafana has failed to load its application files Posted: 31 Jul 2021 07:51 PM PDT I want to run grafana behind nginx. I followed this instruction. The only problem I have right now is whenever I try to edit a panel, I will see this error message below. It disappears in a few seconds. The grafana.ini looks like The scrubbed nginx.conf looks like I don't really experience any issue other than the annoying error message every time I want to edit a panel. When I used SSH to bind port 3000 to my computer |
Posted: 31 Jul 2021 07:48 PM PDT I'm running Ubuntu 20.04. I have a directory with million of files named like this How can I delete all of master-stdout.log files? |
After adding a new DNSBL to Sendmail, how can I resubmit an email to see if it will be rejected? Posted: 31 Jul 2021 04:56 PM PDT TL;DRHow can I fool my own sendmail into thinking an email comes from a particular ip address, so that it rejects the message due to a DNSBL match? Details:I run my own mail server, and most spam is blocked by the DNS black lists (DNSBL) that I've added to /etc/mail/sendmail.mc like so: Today some spam came in (passing all tests), and after checking MX Toolbox and DNSBL Information could see that adding one of several DNSBLs would have blocked this particular spam. So, I added another DNSBL, and now I want to test it by resubmitting this email to Sendmail, but therein lies the problem: it won't be coming from the right ip address, and the DNSBL won't see it as bad. Here's the command I normally would have used: Before I try to reinvent a wheel, I thought I'd ask here first. Possible ideas:
Thanks! |
How can I let apache server work always on my ec2 instance? Posted: 31 Jul 2021 04:52 PM PDT I am learning aws's EC2 server. I configured apache and php. I started the apache server with the command Sudo service httpd start But every time I stop my pc, or the next day, when I want to continue the course. I have to start again the apache server. I mean it is not on started status always. Imagine if I have a website running on that instance, it means that users won't be able to go on to my website. Or If want my website to be available every time, I don't have to logout from my aws account. Can you explain me what is the problem. I am using the right now the 12 months free offer on aws. It's an Amazon Linux 2 with a Linux 4.14 version |
Packets from xfrm interface won't route, but opposite works Posted: 31 Jul 2021 07:05 PM PDT I'm working on a site-to-site vpn, where one end us a UDM and the other is Strongswan. The goal is to provide bi-directional routing into a cloud environment. I'm completely baffled why this isn't working. The good news is Strongswan connects and will pass traffic. But I have some routing issues on the Strongswan side. My Strongswan host has two interfaces, eth0 which has the public internet IP on eth0, and an internal ip of 10.132.169.74 on eth1
current situation:
Here's the routing table of the Strongswan host 10.132.169.74: Here's the routing table on the cloud test host (10.132.40.82): On the Strongswan host, I'm executing this: And finally here's my swan config: and my sysctl on the Strongswan host:
Any help is appreciated, thank you! |
Rebooted Ubuntu server, nginx site no longer accessible from browser Posted: 31 Jul 2021 04:03 PM PDT I rebooted my Ubuntu server this morning because I was having what appeared to be a low-memory error (happens occasionally, hasn't been enough of a problem to try and fix it). But now, my site (which was previously working fine) is no longer accessible from the browser. The setup: I'm running a NuxtJS site using pm2 to daemonize it, and nginx as a reverse proxy. I have a post-receive git hook so that I can push to my remote git repo, which then rebuilds the app and restarts the pm2 instance. I can only access my site from inside the server, inside a terminal window. Lynx, wget, and cURL all work, and even follow the 301 redirect to HTTPS. And they're working when I request the domain itself, not just the localhost:3000 that's getting reverse proxied. As in, Here are the things I've tried/looked at:
Thus far, I haven't found any solutions. I'm just baffled, because whatever changed, it changed because of a reboot. Any ideas are much appreciated. EDIT to add some output:
Output of |
Any way to join a server to Active Directory Domain by IP address in hostfile and not DNS? Posted: 31 Jul 2021 08:01 PM PDT To my knowledge their is no way to join a server to AD without the server being able to resolve the AD domain via DNS. Joining requires being able to get multiple records from DNS - including SRV records. So a simple host file entry shouldn't work. With that in mind, my question is am I correct is there no other way to join a server to AD without access to a DNS server that hosts the AD records? The reason I ask is: I have some servers that are in AWS that need to join to an AD domain inside a corporate network. We have VPN tunnel from AWS back to the corporate network. This domain is not advertised on a public DNS server we can reach from AWS. We do have an internal corporate DNS server with the appropriate records. Now with some networking changes on the corporate side we could reach this DNS through our VPN tunnel; however, in AWS we use the AWS DNS service with a delegated zone to resolve server to server communication within AWS and it then reaches out to our corporate public DNS server for anything it can't resolve. We also use the AWS DNS server for health checks on AWS to trigger region failovers. If we were to point our AWS servers to our internal corporate DNS through the VPN tunnel, we would then no longer be able to resolve internally within AWS. I only see a couple of options.
So do you agree option 1 isn't possible and/or do you have any other ideas that I haven't already listed. Thanks in advance |
Tomcat 9 Service on Centos 7 won't start up at system boot Posted: 31 Jul 2021 10:03 PM PDT I'm not very experienced with Linux generally, so please forgive me if this is obvious to you. I have done a large number of searches on various combinations of keywords, but can't find a solution to this problem. I have installed command line only (core) CentOS 7 on a virtual machine. I have installed java and downloaded tomcat 9.0.14 (I know that's not the latest version). I have set up tomcat to run as a service, using systemd, that is, I have created a file:
I had to revise this post about 15 times before the submission form stopped thinking this was spam, so I had to remove a lot of information I originally wanted to include like what's in my service.tomcat file. Sorry. I'd love to include more detail, but the form just won't let me. It is the only instance of Tomcat on the Linux server. It is installed in /opt/tomcat/apache-tomcat-9.0.14, but I have created a symbolic link named "latest" so it can be referenced as /opt/tomcat/latest. Tomcat starts properly when I run the startup script manually, i.e:
When I do so, it properly responds and I can see the landing page using a browser on another computer. I can also start up tomcat as a service - manually starting that service using:
If I do so, then I can see tomcat working and using:
says that it's working. I can also visit the landing page when tomcat is started this way. So it will start as a service, if I manually start the service with the above command. The problem is that when I boot up the machine, tomcat doesn't start. I don't think that I've simply failed to reference the service, rather, I believe it might be failing (but I'm not 100% certain): If I reboot the computer, tomcat doesn't start. If I then go:
I get this: Based on the fact that it says tomcat failed, I don't think that the problem is that I've not told CentOS to start the service. Rather, I think it's trying to start the service, but it's not working. If I then manually do:
I get no text returned, but subsequently if I do this:
it shows tomcat is running. I'd love to include the exact output of the command, but I had to remove that too in my many revisions of this to get the submission form not to think this was spam. I believe I have properly set up the tomcat service to start at system boot time, by doing this:
I tried using journalctl -xe to see if I could learn why the service was failing to start at boot time, but I couldn't find anything in the results of that command that explained why this was occuring. I'm happy to provide the (very long) output from that, if that's helpful. The tomcat.service file contains the following: (I had to remove the contents of this file, even though it was marked as code, because the submission form insisted my post looked like spam. Sigh) I have set the following in my user's home folder, in the .bashrc file:
I wonder if perhaps when the service is starting up at boot time, if it's not running as my user, then perhaps it dosn't have access to this variable somehow ? The actual startup script (referenced in the tomcat.service file is /opt/tomcat/latest/bin/startup.sh . It contains the default contents, I have not modified it in any way. Again, the above script runs and will start tomcat. I can even start tomcat as a service by manually typing sudo systemctl start tomcat. It just won't start at boot time. I have done a sudo yum check-update, followed by sudo yum install update. I did this to update CentOS 7 to the latest version. I did this after I installed tomcat, as part of the troubleshooting process I have been through. This didn't seem to help. I would be most grateful if anyone can suggest a solution, or a troubleshooting step I should try next. For example, I'm not sure how to examine the startup process on a linux box specifically to look for services failing to start up and why. Kind regards, Spencer. |
How can I install the ngx_http_geoip2_module module ? on Centos Posted: 31 Jul 2021 04:08 PM PDT I installed the GeoIP package using yum. I got the geoIP files in the
So how can i install this module? I followed this tutorial: https://github.com/leev/ngx_http_geoip2_module/blob/master/README.md#installing and the url is outdated or invalid, not sure, but i cannot download it . Also I already have nginx being installed. Any suggestions? thnx in advance! |
Posted: 31 Jul 2021 09:04 PM PDT The ProblemI have a TFTP server (Machine 'S') and a TFTP client (Machine 'C') on different subnets. They are connected via a router( Machine 'R'). All 3 machines are Debian 9/Stretch. The router is running iptables and is set to masquerade connections from the client's network to the server's network. I have configured iptables to use the Netfilter TFTP helper for tftp connections going to the TFTP server. The trouble I'm having is that the TFTP helper sets up an expectation for the return tftp connection (as expected) but, despite this, only traffic from port 69 on the TFTP server is getting translated and sent back to the client. So only the regular MASQUERADE connection tracking is being used even though the conntrack table shows the expected return connection. According to RFC1350, the server is supposed to choose a random source port for its communication and direct it to the port that the client used as a source port originally (whew...). The result is the that the router NATs the connection from the client to the server, sets up a translation rule for the return connection and happily waits for a return packet from the server with source port=69 that never arrives. The SetupAddresses are made up for clarity:
Iptables on the router has the following rules. All tables have default ACCEPT policy: Once the TFTP client is trying to connect,
As you can see, the TFTP helper rule is working properly and is triggered once the client attempts its connection. As you can also see, the expectation created in the EXPECT table has source port 0, which I assume means "any port". But, as you'll see, the connection is only routed back to the client if the source port from the server is port 69 (regular old NAT)! Why is this? This is not the correct behaviour as far as I can tell. I won't clutter this post anymore if I can avoid it, but what's shown by I did this same setup on several Debian 8/Jessie setups about a year ago and the TFTP helper worked as expected and I never had any issues. Can anyone hlep me figure out if I'm doing something wrong? Is the issue with the TFTP helper? Why would its behaviour have changed from Debian 8/Jessie? |
Migrating Jenkins jobs from one server to another Posted: 31 Jul 2021 04:08 PM PDT Copied Jenkins "jobs" directory from one A (VB) to server B (AWS). The jobs directory shows up in the server B with all the files in it. But those jobs doesn't populate in Jenkins UI. Please help. Thank you! |
SSH Suddenly returning Invalid format Posted: 31 Jul 2021 05:07 PM PDT So a while ago I set up a server on AWS, and used their generated SSH key. I saved the key to Lastpass, and have successfully retrieved it from there before, and got it working. However, after trying that again today, I can't get it to work.
I've tried
Is there any way to fix this? |
Adding Tag (i.e. Source IP) to rsyslog for sending to rsyslog remote server Posted: 31 Jul 2021 07:01 PM PDT Is there any way to adding a Tag to Logs which sent by rsyslog? I send these logs to another server, and I can detect source IP as destination, but I need to adding tag in source. |
Nginx configuration for Deluge Posted: 31 Jul 2021 08:01 PM PDT I have Nginx running on a CentOS server where i installed Deluge and configured a server block for him. In my browser, mydomain.com redirects to Deluge webUI but www.mydomain.com redirects to a web page of the hoster. In my dns, i have an entry for "www" and "mydomain" to the server ip. Here's the Deluge server block in /etc/nginx/conf.d/vhosts.conf : Have you any idea ? :) |
How to show a 404 instead of a 403 on apache host Posted: 31 Jul 2021 05:09 PM PDT My site was hacked about 2 months ago so I closed the site down but there are over 1,000 spam links out there still directing to the domain. As there are no files on the domain visitors, including Google, receive a 403 error, so assume the page exists. How can I change the 403 to a 404? I have a Further suggestions would be gratefully received. |
dmidecode weird total/data width Posted: 31 Jul 2021 07:01 PM PDT I am getting strange outputs from my workstation, which has ECC RAM. Supposedly, from what I read, the data width should be at 64 bits and the total width at 72. But... data width shows as 64 and total width as 128. Is this a problem with my configuration? For reference, my motherboard is a MSI C236A WORKSTATION. Thanks, Eduardo |
nginx 405's with try_files for a DELETE request instead of proxying Posted: 31 Jul 2021 05:09 PM PDT I have nginx proxying to php-fpm with the following config: ``` Everything is working great until a DELETE request comes in like:
When this happens nginx returns a 405 (method not allowed) and doesn't appear to proxy the request to php-fpm. What's the best way to get DELETE/PUT requests to proxy? Is there way to bypass When hitting this URL, I see nothing in the error.log but access.log shows:
I've confirmed that I'm not hitting the proxy. My assumption is that nginx is blocking DELETE on the first "try" of |
Redirect IP to a domain name using htaccess Posted: 31 Jul 2021 03:03 PM PDT Let's say I have this IP Address I have seen this question Redirect to other domain but keep typed domain. I don't know if it works because I haven't tested it, but I suppose it does. I am using Ubuntu 14.04 with Apache, so is there any wat to achieve this? Here is what I have tried |
"A new version of /boot/grub/menu.lst is available" when upgrading Ubuntu on an AWS server Posted: 31 Jul 2021 04:25 PM PDT I just tried to do a
I certainly haven't modified menu.lst, so I assume the local modifications are Amazon's doing. I'm going to hit the "keep the local version currently installed" option and hope for the best. But why am I getting this message, and is this the correct way to handle it? |
Raid 1 can not sync with new Drive . its stopping at 30 % Posted: 31 Jul 2021 03:03 PM PDT i had trying to add new HDD in place of Falty HDD. but new HDD can not sync with old one .sync process shown up to 30 % after that its stopped . md0 and md1 sync successfully , but md2 can not this is detail is that any solution . i want to backup my data |
Posted: 31 Jul 2021 09:04 PM PDT I'm installing the Bitnami Redmine stack (redmine + subversion). Firstly I install configure and test it locally (Ubuntu 14.04 LTS). And everything is OK. I install Bitnami stack on server (Red Hat 4.4.7-4) and configure SVN. I commit files into SVN and connect project into Redmine with SVN repository, but when I try see it Rredmine displays 404 error. In the Redmine log file I see the following errors: How can I resolve this problem? I googled it, but similar problem fixed should be fixed 3 years ago. I'm installing the latest Bitnami Redmine 2.5.1-1 stack. UPDATE Well, I found next way. If I use the http protocol it works fine, but I should remove access for svn by web. That's why I create virtual host on localhost and get info from svn use 127.0.0.1 IP. And this it work good. |
Posted: 31 Jul 2021 10:03 PM PDT Can you guys help? I have set up an ubuntu server 12.04 for Zimbra, I download zcs 8.0.2 and put it in /opt/zimbra. but when I run install.sh, even though prerequisites ARE Found and I Agree to the License and select packages to intall, the folder is removed and I get the following error: ./install.sh line 339: /opt/zimbra/libexec/zmsetup.pl: No such file or directory And when I go back to looking for that .pl I don't find anything, everyhting's wiped out ! Any thoughts? Thanks |
Permanently assigning IP address for an embedded device Posted: 31 Jul 2021 09:05 PM PDT This is a follow-up to Embedded device configured with bad IP address, can I still connect? We make embedded devices that run Linux. Users can change the networking configuration of the device (static IP, DHCP client and server). Zeroconf was supposed to be the fallback when a user forgets static IP was assigned, but Zeroconf seems spotty in implementation. Connecting a Windows client frequently results in the client getting a link-local address that cannot communicate with the device. There is no hardware reset button, sadly. I know what MAC address each device has, but I don't know how to use that information because the device's networking stack rejects data unless I know its IP address. Would it be bad to statically assign a secondary IP address in the link-local range (169.254.0.0/16) to eth0:0? That way I can write a restore utility that will work when the device is directly connected to a client. (No routers involved, but possibly a switch) What happens if two of our devices are on the same network with the same link-local IP address? They will have different primary IP addresses. Some similar products hard code a private IP (i.e. 192.168.1.2) for this particular situation. |
E: Sub-process /usr/bin/dpkg returned an error code (100) Posted: 31 Jul 2021 05:41 PM PDT I am running on xen, Debian 5.0-i386-default. I haven't touched my vps in 2 months then last night I ran the following command: myserver:/usr/bin# apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done The following packages have been kept back: makepasswd The following packages will be upgraded: libc6 libc6-dev libc6-xen libmysqlclient15off locales mysql-client mysql-client-5.0 mysql- common mysql-server mysql-server-5.0 10 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. Need to get 0B/50.1MB of archives. After this operation, 483kB of additional disk space will be used. Do you want to continue [Y/n]? y Preconfiguring packages ... E: Sub-process /usr/bin/dpkg returned an error code (100) I googled and it seems to be a permission thing for "dpkg". However, I cd into /usr/bin and there's no dpkg binary!!! Please help thanks |
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 |