question_id
int64
1
1.16M
title
stringlengths
10
191
question_body
stringlengths
6
2k
answer_body
stringlengths
0
2.5k
tags
stringclasses
73 values
question_score
int64
-15
1.65k
answer_score
int64
0
2.91k
view_count
int64
4
1.24M
creation_date
stringdate
2008-08-01 18:45:00
2025-06-19 04:44:02
category
stringclasses
12 values
source_site
stringclasses
8 values
223,950
Assign a student to a Classroom based on course and scheduled hour
Each year we have to manual assign students to classes that were not included in original assignment either they are new or the class was cancelled etc, we are talking 100s of students where we have the course and the hour but not the classroom they should be in the database has [CODE] I managed to get all the students...
Since the output is still not clear. I have decided to show my output and ask about mismatch output.Output is not 100% correct. [CODE] Why the output of following is so ? [CODE] what is the criteria of assigning class ?List all factors.
3
0
396
2018-12-02T21:47:46.343
warehouse_errors
dba.stackexchange.com
821,981
Jenkins cannot read Github password since upgrading to Git client plugin 2.1.0
I'm currently using Jenkins 1.650 on Windows 2012 and I've upgraded a test instance of Jenkins (cloned from my production server) to 2.25. As part of this the Git Client plugin was upgraded from 1.19.6 to 2.1.0 and now it cannot authenticate. I have jobs which run perfectly if I downgrade this plugin again, but when ru...
The answer to this is summarised here: How do I change Jenkins Git plugin from using GIT_ASKPASS to .gitcredentials However in short there are known bugs with Jenkins 2+ in a Windows environment with reading passwords which contains a character which requires Windows escaping in the command prompt. I changed the passwo...
3
1
2,484
2016-12-21T09:00:18.630
pipeline_ops
serverfault.com
263,731
Domain models with properties not always set
I don't know if to have domain models with properties that not always are set, it's a some kind of code smell or design error. I put an example: I have an app that lets read internet magazines using Rss. For domain models, I use cases of use. Briefly I have: There is a magazines library. You can consult the profile of ...
I don't believe that your design is an issue but the implementation can give you some problems. Use the Null Object Pattern to fill in the fields that otherwise would be missing. In your case, a "missing" [CODE] would be marked by a singleton that returned an empty [CODE] , [CODE] , etc.
1
2
53
2014-11-25T10:48:11.043
api_errors
softwareengineering.stackexchange.com
354,280
Eliminate areas of binary space and increment through result efficiently
The goal is to take a binary space, say 64 bits, and make certain parts of it "valid" and certain parts "invalid", then increment, starting at 0, through that space, avoiding the invalid areas. Space is made "invalid" by applying an arbitrary number of arbitrary rules. For instance "if bits 2 and 49 are set, that numbe...
You're looking for an automated way to transform a set of arbitrary validation rules into a set of arbitrary incrementing rules that only produce valid numbers. If such a thing existed we'd have no trouble predicting prime numbers. Since we do, it doesn't. This doesn't mean that valid incrementing rules don't exist for...
1
2
49
2017-07-22T17:46:30.517
api_errors
softwareengineering.stackexchange.com
190,120
Should I use Dependency Injection or static factories?
When designing a system I am often faced with the problem of having a bunch of modules (logging, database acces, etc) being used by the other modules. The question is, how do I go about providing these components to other components. Two answers seem possible dependency injection or using the factory pattern. However b...
Use dependency injection, but whenever your constructor argument lists become too big, refactor it using a Facade Service . The idea is to group some of the constructor arguments together, introducing a new abstraction. For example, you could introduce a new type [CODE] encapsulating a [CODE] , the [CODE] and the loade...
99
81
34,128
2013-03-11T12:36:07.757
api_errors
softwareengineering.stackexchange.com
919,768
Cannot add a self signed certificate in Firefox
I need to set up an IIS webserver that will be accessed by a small, finite number of users. I was considering using a self-signed certificate only, and manually installing it on the user's systems. So I generated the certificate with IIS tools, installed it on the webserver, and exported it in a .cer file. Adding it th...
In order to be added to the certificate authority list in Firefox a certificate must have X509v3 extension [CODE] , e.g. [CODE] This would be the case if you had your own private CA certificate used for signing your server certificates: you could import it and use it for signing all your private server certificates, ma...
4
7
9,545
2018-07-06T12:48:05.683
infrastructure
serverfault.com
197,807
FK to table with non-unique values via a on commit refreshing materialized view?
I would like to create a FK to a table without unique values. So I cannot create a simple FK. [to clarify, the parent table has duplicates - dont ask why, not in my control ] I tried creating a materialized view: [CODE] .. and then creating a FK to UniqueView. This works however, I cannot use ON COMMIT refresh because ...
You can still use [CODE] . [CODE]
0
3
152
2018-02-13T16:46:47.150
warehouse_errors
dba.stackexchange.com
872,776
autossh works as expected by systemd setup for boot fails
So I setup my ssh variables to do a reverse tunnel in ~/.ssh/config and called the host tunnel_reverse. I tested the following command to create a persisting tunnel with autossh and it worked just as expected: [CODE] I was able to connect to the remote computer from a laptop after the remote host reverse tunnel was cre...
It looks like the ssh session started by systemd is looking for a password. I am assuming that when you are running autossh manually it uses public key authentication, and that the public key is stored in the home directory of the user who's executing this (your reference to ~/.ssh does not say which user's home direct...
5
3
3,676
2017-09-09T01:22:26.177
infrastructure
serverfault.com
192,246
AWS sent me abuse report - apparently one of my servers was hacked - whats next?
I got an abuse report from AWS with the following information: * Log Extract: Log taken at 2010.Oct.17 11:47:04 PM PDT tomcat!~bacchus@204.236.250.XXX (Tampa) [note- the address above is indeed of my server] How can I detect what took over my server?
If your machine has been compromised and you didn't plan for that scenario then there's effectively nothing you can do. Reflect, repent, reboot, reformat, reinstall and restore your data only. Then apply all the vendor patches to bring your system up to current spec and harden your systems. Then learn how to use a host...
1
5
1,493
2010-10-18T20:02:45.443
infrastructure
serverfault.com
25,163
How did you learn about security in your web development?
I've been developing intranet web sites and public web sites with no big issues concerning security. There were nothing to steal and nothing to gain. Nothing to attract people to try to reach the website behind the scene. I don't talk about login & password but more about the security against user attacks. So, what's t...
If you're doing web development with Java, consider reading up on the Spring Security framework ( here is a good tutorial ). It's based on Acegi Security which was absorbed into the Spring Framework. You'll quickly learn about the key principles of securing a web application: Never trust the client (validate everything...
3
4
384
2010-12-10T12:19:07.460
api_errors
softwareengineering.stackexchange.com
693,769
How to fix the Logjam vulnerability in OpenVPN server config?
As of this writing (Day-2), there are quite few accurate guidelines as to how to mitigate Logjam for Apache and other web servers, such as this page: https://weakdh.org/sysadmin.html What are the similar instructions for OpenVPN servers? Is OpenVPN affected at all? (I guess yes since it is a TLS protocol issue).
The attacks only affect OpenVPN in very limited ways, because: OpenVPN encourages users to generate their own DH-group using 'openssl dhparam', instead of using common groups. The man page / examples used to provide 1024 bits DH keys (updated to 2048 recently), and although 1024 bits dh params can be broken, that is st...
6
8
1,305
2015-05-22T07:34:42.097
infrastructure
serverfault.com
121,557
postgres window functions: using CASE to partition by age group
I am using postgres window functions to get a list of users taking part in a competition and their corresponding ranks based on a number of columns, all good so far....now I need to get rank based on 'age group' which are a number of pre-defined categories (eg. 0-15 years, 15+ years etc...), where age is calculated bas...
You could use a [CODE] join for this. And no need for joining the [CODE] table twice: [CODE] and then the [CODE] would be left (almost) unchanged: [CODE] Alternatively, a simple CTE or derived table with a normal [CODE] could be used, without the need for the (9.3+ available only) [CODE] . With the following you'll onl...
0
4
4,163
2015-11-19T11:04:37.747
warehouse_errors
dba.stackexchange.com
874,428
What client IP addresses does server see when HTTPS passes through proxy?
Let's assume that an HTTP server (which hosts the endpoint for some REST API, say) is configured to allow connections only from a single client (let's call it 1st client), i.e. from a single client IP address. If that client would run an HTTP proxy such as [CODE] and if another client (let's call it 2nd client) would c...
I believe that depends on how the proxy server is configured. If its not a proxy you control then the answer would be yes a client could potentially circumvent an ACL. If you do control the proxy you can set the XFF (X-Forwarded-For) header and set your server to read the IP from that header.
1
2
152
2017-09-19T12:41:32.603
api_errors
serverfault.com
819,774
docker-compose exec composer as user
I have a docker-compose setup working perfect on my local machine for my symfony projects with nginx, php7-fpm and mysql. I often need to install new packages via composer, so I just deliver the command to my php-fpm container like this: [CODE] The problem is that install all the packages as root, so I have to chown ev...
After doing some research I just realized that the php7-fpm image I am using has some users built-in like www-data (compatible with my actual box configuration). So I just had to use the flag "--user www-data" along with the command to use the composer inside the container and keep the files with the right permissions....
6
7
12,826
2016-12-09T11:24:35.430
database_errors
serverfault.com
535,874
nginx: trouble creating subdomain.subdomain.domain.com
I'm trying to prototype a website on my server using a default domain name I get through my hosting provider and I'd like to run it off a subdomain but I'm having trouble doing so. The domain I'm trying to add a subdomain to is: [CODE] And I'd like to temporarily run a site off [CODE] the domain does work with my serve...
You have no DNS entry, this is not nginx related. Kimsufi only gave you the ks12345 subdomain and you need a DNS entry for test.ks12345 in order to reach your server. Check your hosting package if you can control your DNS. Ask Kimsufi, but I believe this is not included in your package (because I know Kimsufi).
0
0
241
2013-09-03T11:19:24.817
infrastructure
serverfault.com
787,960
Varnish not working with last-modified
I'm new to Varnish and to reverse proxies in general. I'm testing Varnish in an application that works like a blog where I have a page with an "updated_at" that changes once the page is updated. As a consequence, I decided that my cache strategy should be based on the last-modified header. The reason for that is the us...
There is not such thing as "Last Modified doesn't work". This header simply indicates the date resource was last modified. The clients may issue "if not modified since" requests afterwards, but this is not important to your situation. It is natural that subsequent requests will return exactly the same headers. Objects ...
1
0
1,652
2016-07-05T09:46:00.110
infrastructure
serverfault.com
197,262
Error ORA-00918 not raised as expected when using the FETCH command
The Oracle 12c documentation about FETCH is telling the below If the select list contains columns with identical names and you specify the row_limiting_clause, then an ORA-00918 error occurs. This error occurs whether the identically named columns are in the same table or in different tables. You can work around this i...
Do not believe everything you read in Oracle documentation. Try the below: [CODE] Then: [CODE] 1), 3) and 4) runs successfully on [CODE] , 2) throws [CODE] . On [CODE] , all 4 runs successfully. The one thing to keep in mind: never rely on implicit behaviour you can not control. Use explicit, unique aliases.
1
0
289
2018-02-07T12:35:58.507
database_errors
dba.stackexchange.com
8,481
Why does ada (adaboost) in R return different training error graphs and variable importance plots when running the same function multiple times?
Question says most of it. I created a matrix of descriptors, set the vectors of responses, and input a set number of iterations. Each time I run the function with the same exact inputs, I get the same confusion table, but I get a different training error graph and different variable importance plots.
Boosting, together with bagging, falls into the realm of so cold ensemble models: you randomly draw a sample from the data, fit a model, adjust your predictions, sample once again. Unless your samples are fixed, every time you run the algo you'll get slightly different results.
1
2
322
2015-10-17T21:10:40.957
data_quality
datascience.stackexchange.com
697,133
Shorewall: Block repeatedly failling ips on port 22
I am on Fedora 21, and port 22 is open for ssh connections. I am using key-based authentication with password and root logins disabled. My logs are flooded with messages like the ones appended at the end of the post. I am using shorewall, is there a native way to blacklist an IP for 2 days after failing 3 times to conn...
The following config seems to be working with fail2ban out of the box and doing the desired job. My original config was misconfigured since I wrote [CODE] as [CODE] . [CODE]
0
0
354
2015-06-06T19:19:09.113
api_errors
serverfault.com
1,058,622
Postfix dovecot unable to authenticate
I use to work with postfix/sasl/courrier-auth on Gentoo for years. I just migrated to Debian 10 postfix/dovecot. I'm unable to make it work : Send mail ok, TLS ok. But unable to authenticate (SMTP 587, IMAP 993). I'm not familiar with dovecot and I can't figure out what I missed because I found nothing in log (nothing ...
Ok, that's what I missed in dovecot.conf : [CODE] I found it after enabling devcot debug, in same configuration file : [CODE] And to test authentication : [CODE]
0
1
976
2021-03-28T18:33:38.653
api_errors
serverfault.com
604,750
Postfix how to triggering my script when outgoing email status is sent?
I want to run a program when postfix has successfully sent out a mail (local or remote). I would like to pass the headers to program and if possible also the destination ip or address (exclude spam filter delivery). I just have an idea: Delivery Status Notification processing via uniqe transport program, but I'd prefer...
This is only for logging message headers. By default postix already logs most of this information, though not in one line. It doesn't, however, log the subject or message-id. We can add that in by using [CODE] . Note: for all mail and not just outgoing, use [CODE] instead of [CODE] . [CODE] These messages will be logge...
2
1
2,833
2014-06-12T19:30:40.540
infrastructure
serverfault.com
834,378
How can I move share permissions to a new partition that I've moved data to?
I've just installed a new Disk Enclosure, and it's been set up, RAID configured, and the new partition R: is now configured on the file server VM. I used robocopy to migrate all of our data from E: (NAS) to R: (DskEnc) and it has successfully done this, and copied over all NTFS permissions and kept all the relevant tim...
To be sure of the synchronisation of your 2 servers and because you have under windows2012, you can use DFS for the sharing and DFS-R for the replication of your two servers. You could follow those simples steps for that : 1/ install and activate DFS replication (DFS-R) between the servers. When you are sure the initia...
0
1
949
2017-02-23T08:27:09.557
infrastructure
serverfault.com
87,273
Is large row size in this case a problem?
I have a table from which 99% of the time I retrieve only 1 row. Searching is done using a clustered index (which is only 20 bytes long). My row size however, is 800 bytes (fixed size). Do you think this row size is a problem in the given scenario? If it makes any difference - this table will be containing 10s of milli...
Row size will make little difference if you are querying by that index every time. The index structure will be searched for the one row, and the final index entry will point directly to the data block holding the row. If you regularly query just part of the row, then adding extra indexes might help as you can include m...
0
2
92
2009-11-23T10:12:01.063
infrastructure
serverfault.com
819,931
Hyper-V Cluster network not reachable between nodes
Microsoft recommends a Hyper-V Cluster has its own dedicated cluster network that will be: Used for inter-node cluster communication such as the cluster heartbeat and Cluster Shared Volumes (CSV) redirection. With help from the following guide on creating a 2-Node Hyper-converged Cluster with Windows Server 2016 , I us...
Looking a little closer at your script, you've configured your vSwitch with a VLAN ID. Have you configured the physical switch ports that these hosts are connected to as trunk ports and allowed the appropriate VLAN's on those ports? In order to carry traffic for that VLAN the physical switch ports need to configured as...
0
2
5,309
2016-12-10T05:21:57.563
infrastructure
serverfault.com
540,029
Upgrade issue from Debian Server Squeeze 6 to Wheezy 7 - still on kernel 2.6
I upgraded from Debian Squeeze 6 to Wheezy 7 but it seems i am using the old kernel. [CODE] But i have the newer kernel installed [CODE] What should i do? Here is the proccess i followed to upgrade: [CODE]
You're on an OpenVZ (container) based virtual machine. As a result you have no control over the kernel; it is provided by your hosting provider, and you are limited to whatever the provider chooses to provide. If you want a different kernel, you either need to contact your hosting provider, or use something other than ...
4
10
599
2013-09-18T19:05:41.280
infrastructure
serverfault.com
375,554
Alternatives to SQL for describing data mappings
Back story: I work for a startup which was acquired by a large Fortune 500 company. I'm the lead engineer on a project which aims to consolidate duplicate data stored by both companies. Our new corporate overlords have a mature RESTful API (written in Java) exposing all their data which happens to live in a Oracle DB u...
ERD diagrams seem like a pretty good way to accomplish this (especially if you ignore the links parts). Just looking at the names of the tables and the data in the fields corresponds pretty naturally to any other representation. The only thing that's hard to capture in a very sensible modeling neutral way is the hierar...
3
1
124
2018-07-20T15:24:22.853
api_errors
softwareengineering.stackexchange.com
350,142
How can I manage the code base of significantly complex software?
I often create programs both for myself and others using various object-oriented programming languages. When doing so, they are usually relatively small (a few thousand lines at most). Recently, however, I have been attempting to get into making larger projects, such as complete game engines. When doing so, I often see...
I often seem to run into a road block: complexity. There are entire books written on this subject. Here is a quote from one of the most important books ever written on software development, Steve McConnell's Code Complete : Managing complexity is the most important technical topic in software development. In my view, i...
12
9
3,311
2017-06-04T18:26:21.577
api_errors
softwareengineering.stackexchange.com
46,305
JMETER: How do I run parallel JDBC requests in JMeter?
I have defined the JDBC Connection configuration and have added multiple JDBC requests in JMeter. Currently, when I trigger the requests, the requests are executed one after the other. I would like to run all requests parallel with each other to distribute the load on my database How can I simulate this scenario using ...
Each JMeter thread (virtual user) is executing Samplers upside down (or according to the Logic Controllers ) JMeter thread model assumes that: 1 User executes 1 Sampler at the given moment of time JMeter waits for the previous sampler to finish before starting execution of the next one Therefore you have 2 options: Eit...
0
0
986
2020-12-01T13:46:15.757
database_errors
sqa.stackexchange.com
944,298
linux hosts.deny ALL EXCEPT not working
I have added this line to hosts.deny file [CODE] to allow only access to our apache server from selected address but it does not work for me. any suggestion where I am wrong? [CODE]
I suspect you've got the exception the wrong side of the colon, that is to say, in the daemon_list half of the entry, not the client_list half. Try [CODE] or to make this apply only to the web server (and assuming that apache consults these files, which I'm not sure is a given) [CODE]
-1
4
2,274
2018-12-14T05:30:15.907
infrastructure
serverfault.com
908,414
mysql simple master-slave replication stops without any errors
mysql Ver 14.14 Distrib 5.7.21-20 (it's Percona fork, if it's matter). Trying to make simple M-S replication, only 2 servers, different id-s. Replications starts normally, but after a while (several hours usually) slave stops to execute any operations, recieved from master. I mean in SHOW SLAVE STATUS [CODE] and Master...
Are queries actually being made? If there is nothing to write from the master than it won’t work. If there was any problem such as network issue etc. Then the slave would stop itself.
0
0
394
2018-04-19T06:13:56.873
database_errors
serverfault.com
369,701
Implementing an ILogger: how to make public some fields that are needed in specific implementation of Logger but not in others
I am implementing a custom ILogger (interface for logging). I have succesfully developed implementations of it with some famous loggers like Serilog or Log4Net. Now I want to create a memory logger that stores all the logs inside a List (memory). Since the List will only exist in the MemoryLogger:ILogger , I think that...
You don't need an interface for your [CODE] . You just need to pass that instance into the class being tested. A simplified test case would be something like this: [CODE] The only thing you need to make this work is that your constructor takes your ILogger: [CODE] . From [CODE] 's perspective, it has an ILogger and it ...
1
7
440
2018-04-20T12:15:20.437
api_errors
softwareengineering.stackexchange.com
539,217
Oracle 10g backup issue
Introduction: I have to set up a backup concept for an old Oracle 10g installation. The server is old and poorly managed, but I have to ensure we have rock solid backups until the system will be taken offline in early 2014. I've already read a few lines about exp and RMAN in the oracle documentation. Sadly the system l...
The backup tools provided by Oracle can be used from the client side, but to do so, you need SYSDBA privileges. You can use the [CODE] , [CODE] or [CODE] commands from the client side. Using [CODE] is recommended, since it is the only one which is capable of taking differential backups. To use [CODE] , connect to the s...
0
2
67
2013-09-16T11:36:10.290
database_errors
serverfault.com
36,734
Why does my script not working in internet explorer but working fine in chrome
Why do I get following errors to execute script in internet explorer : [CODE]
This is probably a mismatch between the browser version and Selenium. https://stackoverflow.com/a/51023244 Also, IE requires additional configuration .
0
1
1,745
2018-12-08T05:34:25.567
data_quality
sqa.stackexchange.com
372,907
CentOS 5.5 x86_64 VPS - A lot of inbound traffic when idle?
I have a CentOS VPS from UKWSD and I'm getting inbound traffic that I cannot understand. The VPS was setup yesterday and I installed vnstat this morning around 10am, since then the server was basically idle and doing nothing from 12pm but it's showing activity inbound which is way over what it should be and i'd say the...
When you purchase/rent a server from a provider, chances are the assigned IP address was used on another customer's account. This is most likely what has happened here, you have acquired the IP/system of a previous customer and have been getting the traffic they used to get. There is also a chance a small portion of th...
3
1
404
2012-03-23T22:54:02.297
infrastructure
serverfault.com
182,758
What does registry setting EnableLinkedConnections do on a technical level?
Note: the base problem for me is to be able to access a network share that I (Win 7 admin user) have set up when I run an elevated program. Normally the elevated program will not have access to my non-elevated network shares. According to Microsoft the registry setting EnableLinkedConnections will allow elevated proces...
Not having source access to Windows it's difficult to say anything that isn't speculation. That disclaimer aside, here's what I've been able to glean by reading up on this: UAC creates two security tokens on logon: the elevated token containing the user's full group memberships, and the restricted token which has membe...
15
19
39,607
2010-09-20T07:05:36.597
infrastructure
serverfault.com
206,877
Handling Deployment to Multiple Environments
How should I handle deploying web applications to multiple servers? Constraints I have a dev, test and prod environment. No build server is available. Developers can't deploy to prod. The people that do deploy to prod copy files from test to prod. They don't have VS installed. Currently The way it's handled is using we...
Normally the higher the deployment process is automated, the lower risk there will be. To achieve better automation, i think command line procedures (with different modes, for example, interactive v.s. quiet mode) could be a good option: I believe you won't have many environments (DEV/QA/UAT/PROD/etc.) and they are alr...
3
1
3,495
2013-08-02T00:16:57.197
data_quality
softwareengineering.stackexchange.com
246,572
open-iscsi does not login into targets on boot
We have a Debian Lenny server with open-iscsi that's configured to log into a target automatically: [CODE] If I issue a restart of open-iscsi via init.d, it works fine. But if I reboot the machine, iscsi starts, but does not even search for targets. I have to manually restart it before it works. Any ideas how to make i...
The problem is the [CODE] script is looking for the iscsi node config files in the wrong place. [CODE] vs [CODE] or, if you have multiple interfaces configured: [CODE] Edit that file accordingly and the interface should be able to be brought up on networking start.
4
2
15,652
2011-03-12T12:51:41.143
infrastructure
serverfault.com
78,503
Identical Servers but different query execution plans
We have two server with identical hardware configuration and SQL server configuration. The only difference in the server's being: Server SQL1 - 256 GB RAM Server SQL2 - 128 GB RAM The same database has been restored on both servers. The query execution plan for a query on both servers is different.The MAXDOP on both se...
To me it looks like that the statistics are way off on the server with the bad plan. For instance, Audit_New.dbo.RevOrder shows an estimated rows of 40k vs. actual rows = 8k. I'd recommend to rebuild/reorganize the indexes involved in the query on the poorly performing server.
0
0
2,146
2014-10-06T18:42:48.380
database_errors
dba.stackexchange.com
438,081
Efficient data structure to index a collection of unique values shared among objects
I have a collection of many millions of objects, each with a unique id, each composed of tens to thousands of values. Values in this case are simply arrays of floats, with dimensions in the tens to a hundred. The same value can be present in different objects, thus duplicate values are many, taking up to 70% of the vol...
Assuming you can't drop any of the non-duplicate values. Hashing the values might be out of the question. A fairly effective way to find duplicates would be to sort them, and avoid the duplicates, since these entities will only be read afterwards. In java, you can use a TreeSet (ByteUtil::compareByteArrays) to sort the...
1
1
980
2022-04-15T15:03:40.560
database_errors
softwareengineering.stackexchange.com
107,522
Need to make sense of FileTable permissions
I'm setting up a FileTable to allow users to quickly stuff some PDF report files into a database for later searching via an intranet application (to be built later). Sorting out the necessary permissions is a bit of a challenge, and I'm hitting a few roadblocks. First, I have confirmed that I (with sysadmin privileges)...
I've had to resort to a bit of guesswork, but as far as I can tell, I haven't done anything overly permissive. I started with a non-privileged test account that's a member of the AD group I created, and I was able to navigate as far as the FileStream directory for the database ( [CODE] ), but nothing was visible in the...
0
0
3,204
2015-07-20T14:49:44.893
database_errors
dba.stackexchange.com
969,837
Mount merged partition at boot, fuse module missing
I have a merged partition from 3 different hard drives with mergerfs . I set it up following this tutorial . To automate the mounting I added instructions in the [CODE] : [CODE] When I do [CODE] the first time it fail with this message : [CODE] . So I do it and the second [CODE] works perfectly. After this, the merged ...
I found a simple an elegant solution : register [CODE] in [CODE] . Adding this one in this file do the trick since they are loaded before [CODE] .
1
0
610
2019-06-02T12:21:14.553
infrastructure
serverfault.com
541,803
How can I detect if I have access to a resource on an FTP server?
I'm trying to write bash script for file copying from local machine to FTP using [CODE] . Problem is, when someone enter inaccessible path for [CODE] or [CODE] , then [CODE] returns: [CODE] And my Bash script gets stuck and doesn't terminate. How can I check if I am able to access resource before executing next command...
As suggested in comments, you can prevent the process from getting stuck by using a timeout, for example: [CODE] @Marki made an excellent suggestion in a comment: larger FTP scripts you may use Perl or similar, which would allow you to perform explicit error handling after each command.
2
0
690
2013-09-26T10:21:12.200
infrastructure
serverfault.com
407,559
Can a Second Domain Controller, with buggy hard drive hardware, cause a corruption to Active Directory?
We have a new Domain Controller that holds all FSMO roles. We also have two old hardware servers, about 4-5 years old each, set up as secondary Domain Controllers (or better described as Domain Controllers that are DNS servers too not holding any FSMO roles but are Global Catalog servers in the same Site). My question ...
Yes, there is a risk. There is no such thing as secondary Domain Controllers, AD is a Multi-Master setup. So if you have corruption on one you could corrupt your AD Database.
7
6
460
2012-07-13T15:59:29.730
data_quality
serverfault.com
313,168
Is it possible to run two webservers on the same port on the same server? E.g., Apache and Lighttpd
Possible Duplicate: Running two services on port 80 I have a QNAP TS-459 Pro II that comes with an Apache webserver which runs on port 80. I'd also like to run a small Sinatra app; also on port 80. I'd like Apache to serve up [CODE] and [CODE] , but I'd like Sinatra to serve up [CODE] . Is it possible to have both webs...
Only one app can have a particular port/IP combination open at a time , but you can approximate what you want by setting Apache up as a reverse proxy. The highlights - Run Apache on port 80, and enable mod_proxy Do NOT turn on ProxyRequests (this is for forward proxying only) Run your other app on a different port and/...
1
2
18,830
2011-09-19T21:00:23.470
data_quality
serverfault.com
959,288
iptables - bridge / routing between two independent LANs (and router)
I can't find a solution in a network like in the drawing below. I need to be able to open admin page of router 2 on LAN2 from a pc in a LAN1, w/o routing throught Internet. I have a "bridge" PC with 2 NIC and linux (Debian) and I can doing everything on it. I would like that from any PC connected to LAN 1 it's possible...
You are moving in good direction but you are on half way... literally :-). The problem is with the answer - way back. [CODE] [CODE] [CODE] This rule would change just destination but not changing source. Let's think about source IP 192.168.55.55: [CODE] is changed by this rule to [CODE] and properly routed. This part w...
1
0
3,672
2019-03-21T11:52:17.147
infrastructure
serverfault.com
437,674
Unit tests and mocking when functions arguments have changed?
I'm learning how to write unit tests on a project I'm doing with my friends. One thing we tried was to mock the return values of function calls if the functions are declared in a different "layer". For example, if I have a function in the [CODE] directory that calls another function in the [CODE] directory, my unit tes...
Is scenario above an example of bad implementation of unit testing? Or inappropriate use of mocks? Did I completely misunderstood the way unit tests are supposed to be implemented? Not necessarily any of those - it may be that you were missing other checks that could have detected the problem. Martin Fowler 2002 introd...
0
4
672
2022-03-29T01:11:12.023
api_errors
softwareengineering.stackexchange.com
947,029
Partially working network bridging - Ping works but services can't connect
So, here's the setup - I have a network with a Xen host on it. The Xen host is configured to bridge between the physical network and hosted VMs. i.e. [Network] [Xen DomO / Bridge] [VM] This network is partially working, such that: I can ping the VM from my desktop on the network just fine. If I attempt to connect to a ...
Ok, so after a bit of rummaging around I found and fixed two network config issues and everything works now: Routing was incorrectly configured in the guest machine, so it would have been routing its responses to the default gateway. For some reason Fedora Core had created a second config file for the same interface, s...
1
0
1,017
2018-12-30T02:03:03.650
infrastructure
serverfault.com
221,275
Manipulating IIS7 Configuration with Powershell
I'm trying to script some IIS7 setup tasks in PowerShell using the WebAdministration module. I'm good with setting simple properties, but am having some trouble when it comes to dealing with collections of elements in the config files. As an immediate, example, I want to have application pools recycle on a given schedu...
Rather than using Clear-WebConfiguration, use Remove-WebConfigurationProperty instead: [CODE] This will add the node inside
4
1
1,778
2011-01-11T20:43:01.513
infrastructure
serverfault.com
563,129
I/O priority per LVM volume (cgroups)
How can I prioritize LVM volumes I/O performance using cgroups? I know I can use ionice to make changes at the process level but I wish to be able to do this per LV and not per process.
Lvm volume is a normal block device, so you can configure various process priorities on lvm volume using cgroup, for more information read this doc https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt example: [CODE]
3
3
2,059
2013-12-23T10:56:41.577
infrastructure
serverfault.com
904,239
Route one or multiple Public IPs via VTI over IPSec site-to-site tunnel
I successfully created VTI over IPSec Site-to-Site tunnel between my home router (UBNT Edgerouter) and dedicated server (Ubuntu 16.04) at OVH. I can route internal private networks of each sides via VTI device and access it on the other site (I can access site B private range devices from NATed devices (for ex. from co...
Ok, I solved it by myself few days ago. Site A: added the route for a public IP (which I want to route to home) via vti0 device [CODE] Site B (a choice between one of two options): Route Public IP to Home Router Add wanted Public IP to eth0 (or vti0 ) device and create route table with mark and default gateway via vti0...
0
0
1,436
2018-03-23T14:59:43.057
infrastructure
serverfault.com
451,490
Debian date jumping, causing complete lockup
I have a Debian Squeeze VM that has suddenly chosen to jump it's date forwards just over a month, which seems to confuse it no end and cause it to require a hard reset (yikes!). There is nothing unusual in the logs, except that the datestamp suddenly jumps (today back to 2005). It's happened three times, so I don't thi...
I've seen several situations where NTP really doesn't like running in a VM. One provider advised me to stop running [CODE] , and instead have something like this in [CODE] : [CODE] This make the clock on my VMs much more stable, and stopped [CODE] from doing the sync-unsync-sync dance. If you do this, remember to put s...
0
1
323
2012-11-23T09:35:27.987
infrastructure
serverfault.com
11,461
Restart docker container from another container
I'm in a planning phase for a little tool for myself. I have to say that I have close to 0 experience with docker. My setup 1 x Nodejs App in a Container (lets call it App ) n x Instances/Containers of the same image (lets call it Agent ) What I want I'm looking for a way to restart one of the Agents from within my App...
In majority of circumstances I wouldn't recommend this in production, but to restart docker container from another container, you need to install docker in that container and then run that "master" container with [CODE] as described here: https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/ (look f...
2
2
5,876
2020-04-29T09:19:51.140
pipeline_ops
devops.stackexchange.com
318,549
How to update multiple databases in parallel
As part of performance regression testing of a backup product, one stage of the workflow requires updating a single table that exists in multiple databases on a single SQL Server instance and then taking incremental/differential backups of all the databases. Currently I'm running the update query serially on each datab...
I have modified the Powershell script in Backup SQL Server Databases in Parallel with PowerShell by Pablo Echeverria on MSSQLTips.com to suit my purposes. I have so far seen update speed increases between 1.2x and 1.6x.
0
1
156
2022-10-22T04:03:09.100
database_errors
dba.stackexchange.com
175,664
keyboard shortcut to quit 'telnet'
on Windows XP/server 2003 When telnet some remote host on a specified port, after connection established, sometimes press ctrl+] doesn't quit. Is there any command can quit instead of just close the command line window? Thanks. EDIT: But sometimes even type ctrl + ] , telnet command line doesn't show up, still stuck at...
ctrl+] is an escape sequence that puts telnet into command mode, it doesn't terminate the session. If you type [CODE] after hitting ctrl+] , that will "close" the telnet session.
44
57
81,800
2010-08-28T17:02:25.527
infrastructure
serverfault.com
22,186
unique constraint on a set
With reference to this SO question , what would be a correct way to implement Unique tag Combination Constraint in SQL Server 2005? To illustrate the problem, I make an example: A tag_bundle consists of one or more than one tags. A unique tag combination can map to a unique tag_bundle, vice versa. [CODE] There can't be...
My only suggestion is to create stored procedure that performs DML on [CODE] and restrict all users from manipulating the table directly (it's in a sense 'explicit lock' as you say). I don't see any other acceptable ways to enforce the required restriction. In my understanding your simple solution just adds complexity ...
4
4
172
2012-08-08T16:48:14.943
database_errors
dba.stackexchange.com
311,212
Why is passing large anonymous functions as arguments to other functions so widely accepted in JavaScript?
I have an opinion (which I am sure will be shared by some) that passing anonymous functions which contain more than a few lines of code, as arguments to other functions affects readability and self-documentation drastically, to the point where I feel it would be far better for anyone likely the use the code to just dec...
Three main reasons I can think of: Parent Scope Access Privacy Reduction of names defined in higher scopes Parent Scope Access: Inline function definitions allow the inline code to have access to variables defined in parent scopes. This can be very useful for many things and can reduce the amount or complexity of code ...
28
25
2,250
2016-02-26T18:19:34.990
api_errors
softwareengineering.stackexchange.com
246,617
Lob Logical Read and lob read-ahead reads in NCCI
I have a test table with following structure. [CODE] Next I populated my table with about 470 million records with the following script. [CODE] The script was executed about 470 times to generate 470 million records in the table and created NCCI on that table. [CODE] Next I test simple query to count the records in the...
How it is possible to have only 1 lob physical read with cold cache if the table has about 470 million records? There is one LOB physical read and 1,877,324 read-ahead reads. Read-ahead is still a physical read, just performed in advance (prefetching). The quote from Redgate is incorrect. How it is possible the total n...
9
13
1,087
2019-08-30T08:30:35.157
database_errors
dba.stackexchange.com
826,003
CREATE command denied to user - Access Migration -> MySQL (SQL Workbench)
Doing a MS Access to MySQL Migration with SQL Workbench. At the create Schema point I am getting the following error for all tables (9): [CODE] MySQL is hosted by GoDaddy. I have ensured that the user has all privileges and ensured my IP was added to the Hosts. I am completely new to SQL. The need for the migration was...
I have been able to solve this. It appears that with this migration method that you must have a Database with the same file name as the MS Access file.
0
0
639
2017-01-13T01:47:55.803
database_errors
serverfault.com
196,028
Alternatives to Amazon VPC
I currently have 20 Windows VMs that are running on Amazon EC2. There are LOTS of people in the company that need ad-hoc RDP access to each one of these boxes. Occassionally I also run Unix instances, which again tend to have a lot of ad-hoc SSH access from a large number of users. So now I have a problem... When these...
OK, this is an old question that I'm first seeing now. The options for "secured networks" or VPNs spanning multiple servers on EC2 are pretty much only: Amazon's own "Virtual Private Cloud", a.k.a. VPN-as-a-service from Amazons datacenter to your own firewall, as you mentioned. 3rd party VPN 'overlay' networks like VPN...
2
3
1,879
2010-10-27T20:30:51.457
infrastructure
serverfault.com
363,024
Cisco 878 Router Physical Layer troubleshooting
My problem: Upon connecting the FastEthernet0 with a straight-through cable to a Catalyst switch, the line protocol comes up briefly and then goes down. Interface goes down too, I now have this on my show ip int brief: [CODE] I hereby state that the physical connection is down, and that there must be a problem with the...
As you suspected, port security (MAC address limitation) will cause the router to connect and then disconnect immediately. (The reason being, it connects electrically, but is not allowed to send traffic - the very first ethernet packet will be rejected and the switch places the port in a down state) If you have the opt...
0
1
514
2012-02-23T13:56:04.230
infrastructure
serverfault.com
865,490
Redirect api calls from subdomain to main domain using Location proxyPass
I want to redirect my api calls from sub domain to main domain. My api server is in example.com. Request url is http://foo.example.com/api?service=work&action=all_work , but my file system calls should come through. [CODE] But I am getting 404 on the browser.
Instead of using proxy pass we can have fine grain control over it using RewriteCond and RewriteRule and use the [P] mod_proxy flag [CODE] If the request is from sub domain then i am rewriting it to the other site.
0
0
689
2017-07-27T13:37:23.007
infrastructure
serverfault.com
301,379
DNS not resolving some websites properly
From the network in our office, some websites are not getting resolved to their proper IP addresses. I guess it is a problem with our DNS server because, when I changed it to Google's public DNS, I was able to access all the websites. What is the solution?
Sounds like you have created the a-records/domain on your internal DNS servers. Try doing start -> run -> nslookup [CODE] Do all DNS servers resolve the website to the same IP address? Check your hosts file. Are you using correct DNS forwarders or Root servers? Properties on the DNS servers...
0
1
1,946
2011-08-15T21:14:54.917
infrastructure
serverfault.com
768,905
Windows Domain-joined PC cannot RDP to a PC on another domain
I created an AD DS and domain called NEWDOM. Then I added a Win2012 machine "newPC" with a local account called "userA" and joined it to the NEWDOM domain. If I use my personal PC on home network, I can RDP to the machine without issue by providing "userA" or "newPC\userA" as username. But if I use my company provided ...
Issue appears to be that the work PC has the following key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\LSA\LmCompatibilityLevel=1 which restricts NTLM to version 1, which Windows Server 2012 does not support.
1
0
3,216
2016-04-07T21:11:30.577
infrastructure
serverfault.com
105,384
PostgreSQL doesn't log
I'm using [CODE] and [CODE] 9.4.4 and have enabled the logging in the config file: [CODE] then restart or reload the service: [CODE] the loaded settings: [CODE] the [CODE] permission: [CODE] the [CODE] usage: [CODE] doing some query on [CODE] , but the [CODE] still doesn't show up. What can I do to find which part that...
The logging collector tries to capture [CODE] and write it to a file. But it looks like systemd wins the redirecting war, and sends the output to the journal. You can check the systemd journal with: [CODE] The systemd configuration is in [CODE] . I've tried various settings for [CODE] , but none seems to allow the regu...
8
3
13,976
2015-06-29T03:08:11.330
database_errors
dba.stackexchange.com
298,660
Apache randomly predictable slow loading
I have multiple virtual hosts set up. On one of them, let's say three out of ten page loads are basically instant. The other seven always take (pretty much) exactly 5 seconds of server lag (as opposed to data transfer). It doesn't matter which page is loading, or whether or not it's a Drupal page. There are a lot of re...
It could be server queueing (server-status should tell you that), but from the precision and consistency of the delay, I'd be inclined to think it's probably rDNS lookups timing out -- which is why everyone turns it off (with [CODE] ).
1
0
747
2011-08-07T21:52:16.283
infrastructure
serverfault.com
62,976
fsck root filesystem on a remote machine
I have filesystem problems on a machine running Ubuntu 8.04 machine in a colocation facility. What was once a directory now looks like this: [CODE] This was cache data, so I don't mind the data loss, I just want to fix the filesystem. The problem is, this is the root filesystem, so I can't unmount it to run fsck. So my...
[CODE] Should force a fsck of all disks in /etc/fstab on reboot. link: man shutdown Alternatively, if you want a fsck on every reboot: [CODE]
5
3
11,390
2009-09-07T09:00:28.783
infrastructure
serverfault.com
931,649
LVM commands - copying LV between two disks
id like to simply copy LV from one disk to another but as simply as it sounds, its becoming really abstract for me after lots of googling, to come up with the correct process. So i think i need a push to the right direction. -how do i move lv.root do md10, i have hints that i need to expand vg.system over md10 and md20...
I think you might be better of by create new volumes and simply copying the data than attempting the following: The steps are roughly (and untested of course, so start by checking the backups of your data) : convert the new block devices to storage suitable for LVM [CODE] add the new storage to the existing volume grou...
0
0
1,147
2018-09-19T09:30:21.877
infrastructure
serverfault.com
899,534
Iptables protection against port scanners without DoS vulnerability
Archwiki features an article with suggestions for a stateful iptables firewall . They recommend some rules to trick port scanners , but advise that they open up a vulnerability for DoS attacks. In particular, by denying access to IPs that continuously try to access closed ports, a potential attacker could send these pa...
There are a couple of issues with using the TTL option for this purpose. You are essentially proposing using TTL as an additional component of identification when identifying addresses. However, just as attackers can spoof IPs to lock out legitimate clients, they can also spoof packets' TTL values; anybody can generate...
1
1
1,296
2018-03-01T18:56:10.920
infrastructure
serverfault.com
409,789
How does TDD behave when the tested unit needs to be expanded?
I want to write some invoicing logic, and I start coding it, using TDD. The following example is silly, but I'm confident it represents well the everyday dilemma I'm facing [CODE] When I start with the implementation I realise that just the following is not enough, since I need some kind of [CODE] that decides how and ...
If the tests feel wrong in either place, then you might be discovering an architectural problem with your code. Fixing the architectural problem will likely fix your test dilemma as well. Focus on this negative use case and write a test for it. Write the code you would like other code authors to use in this case. Shoul...
1
6
270
2020-05-06T17:09:36.057
api_errors
softwareengineering.stackexchange.com
434,133
Javascript and payment security
I'm using a third party CRM application which allows you to build web forms using drag and drop widgets and the ability to add javascript code to manipulate those widgets. I need to build a form to take payments using another third party payment gateway. The basic process is as follows: customer selects products on the...
Is it possible for a malicious user to edit the javascript and change the total amount e.g. using chrome dev tools etc? Absolutely - or just write their own client to post to your API. What are the implications of doing it this way Your business will fail miserably when you send out all your products for zero cost. is ...
0
6
168
2021-12-07T10:53:26.500
api_errors
softwareengineering.stackexchange.com
897,673
SFTP vs FTPS, and is an FTP server even required for SFTP?
I have an Ubuntu 16.04 instance that seems to not have FTP installed, but I can use WinSCP to connect from my local pc to the instance using protocol SFTP on port 22, and then I can download files from the instance to my local pc. The instance doesn't seem to have any kind of FTP server installed, and all incoming port...
The instance doesn't seem to have any kind of FTP server installed, and all incoming ports are blocked other than 22 and 443. Does this mean that an FTP server is not required for SFTP? SFTP ; the S SH F ile T ransfer P rotocol uses the SSH port and is a subsystem of your SSH server. No separate FTP server needed. (Wel...
7
14
2,221
2018-02-17T13:28:48.227
api_errors
serverfault.com
590
On a dedicated database server, how much memory to reserve for the OS?
Assuming you have a dedicated server explicitly for database functions -- how much memory should you reserve for the operating system? I realize this will probably vary somewhat depending on the specific OS, the specific database software, and so forth. But, as memory is so important to database performance, I want the...
Assuming Windows and SQL Server... There are two schools of thought. Leave 2-4 Gigs for Windows (depending on what is installed besides SQL Server). Leave 10% of your available memory free. As you get over 64 Gigs this gets to be a crazy large amount of memory to leave for the OS, which it probably won't need. Personal...
40
30
8,411
2011-01-13T02:33:17.000
warehouse_errors
dba.stackexchange.com
540,967
How do I configure routing for an IPSEC tunnel between Openswan and RouterOS
I am trying to create a site-to-site VPN between a Linux router that runs [CODE] and [CODE] (host A , serving subnet 10.10.0.0/16) and a MikroTek RouterBoard running [CODE] (host B , serving 192.168.88.0/24). The IPSEC tunnel itself seems to be up, host A says: [CODE] and: [CODE] while on host B : [CODE] and: [CODE] I ...
Here's the solution if anyone else has the same problem... The problem was that I have another VPN setup on the [CODE] box, which is a L2TP road warrior setup called [CODE] (the site-to-site VPN is named [CODE] ) So my [CODE] file looked like this: [CODE] and my [CODE] like this: [CODE] It turns out that the order of z...
2
4
8,274
2013-09-23T12:26:36.030
infrastructure
serverfault.com
909,037
Error while connecting to remote host using Ansible
Geting error while connecting to remote Mysql host using Ansible . Playbook as below [CODE] When try to connect getting following error. [CODE]
it was due to syntax . Correct is below - [CODE]
-2
0
1,428
2018-04-23T15:20:01.267
database_errors
serverfault.com
285,242
MariaDB fails due to timeout
So I'm having troubles starting the MariaDB service. I have tried all the suggested answers I found on the site, but I think I can't even debug it properly. I'll tell you what happened before the problem occurs. Someone killed a proccess in MariaDB with [CODE] and [CODE] . And then that proccess went into [CODE] state....
Ubuntu-18.04 has systemd v229 . It wasn't until v236 that systemd gained the ability to extend timeout at request of MariaDB As such the large rollback is exceeding the default 90 second allowed service startup and systemd is oblivious as to why. If upgrading distribution isn't an option you can increase the timeout in...
3
2
1,433
2021-02-11T18:58:33.607
database_errors
dba.stackexchange.com
249,758
Trigger based on linked table
OK I have 3 tables: client: [CODE] (int)auto-inc [CODE] (varchar) tnt_group: [CODE] (int)auto-inc [CODE] (int)foreign-key tnt_item: [CODE] (int)auto-inc [CODE] (int) [CODE] (int)foreign-key Now, I need to generate an [CODE] for each record in tnt_item , starting from 1 for each [CODE] so each client see's their item co...
[CODE] fiddle
0
1
46
2019-09-27T07:38:37.700
warehouse_errors
dba.stackexchange.com
1,076,219
NGINX+wordpress: CSS being served but not applied
Cheers fellow stackers, I kinda have to get wordpress running in a self hosted nginx environment. More or less exactly using the suggested config from NGINX wordpress doc . [CODE] Everything works mostly as expected, except for the styling. No styling seems to be applied on the site (also applies to the admin login/qui...
My nginx config did not include the mime.types defaults. That seems to be affecting the nginx "Content-Type" response header, leading to it being "text/plain" instead of "text/css" ... ... which is unfortunate because none of the wordpress templates specify the content type in the request, e.g: [CODE] Should probably l...
0
1
1,769
2021-08-31T23:25:33.063
bi_errors
serverfault.com
96,953
MOOC - for causal analysis - no statistics background
Am a software guy with no background in causal inference. While I am now familiar with prediction techniques due to the plethora of courses available online, I would like to seek recommendations from people here for causal inference. As you might know, how prediction techniques tutorials are available in a way that can...
Even i am getting accustomed with concepts of causal inference and working on it's use case for telecom data. Sharing some of the resources which might be helpful to you: Causalnex Package Pyro Tutorials https://github.com/altdeep/causalML https://github.com/DeekshaD/causalML-lecturenotes (Notes of the course ) Some co...
2
3
88
2021-06-22T11:22:44.000
data_quality
datascience.stackexchange.com
331,860
Use extended events to track autoupdate statistics on a specific table
I'm trying to find a way to track a table that has auto update statistics on, I'm trying to track how often it auto updates and at what intervals. The table in question is used quite often and because the statistics are updated alot, on the auto update, because it doesn't sample the whole table its mostly giving me a b...
The Extended Event is (unsurprisingly) called [CODE] Occurs when index and column statistics are automatically updated. This event can be generated multiple times per statistics collection when the update is asynchronous. You might want to experiment with the filters. Your best bet is to start with the [CODE] and [CODE...
0
3
165
2023-10-05T08:16:52.687
database_errors
dba.stackexchange.com
375,311
Should reused exceptions types be favored over single use ones?
Let's say I have [CODE] s that are managed by a [CODE] . The [CODE] is in charge of opening, closing and locking the doors that are stored on the database. [CODE] For the lock method, there's a [CODE] and for the open method there's a [CODE] . This is an option but there's other options possible: 1) Use [CODE] for ever...
I know people make a big deal out of using exceptions for flow control but that isn't the biggest problem here. I see a huge command query separation violation. But even that's not the worst. No, the worst is right here: [CODE] Why the hell does everything else blow up if your assumption about the doors state is wrong ...
8
21
1,746
2018-07-17T01:34:52.580
api_errors
softwareengineering.stackexchange.com
828,774
Can I use SES for one particular email address, Google for the rest?
I want to use SES to receive emails for one email address on my domain: myhotstartup.pizza. The problem is, all our emails for myhotstartup.pizza are currently in Google for Work, so ceo@myhotstartup.pizza for example has a gmail inbox. Now it seems that I can only receive emails in SES by setting MX records for the wh...
Yes this is absolutely possible with dual delivery . You do not change your mx records, Google will send all email to both endpoints. I've personally done this with gsuite, o365 and premise exchange, all working in tandem. (sent mail not sync but inbound is) Restatement from https://serverfault.com/a/827765/200560
0
2
1,584
2017-01-26T14:43:17.137
infrastructure
serverfault.com
534,970
manifest file is not being applied
I installed puppet on a virtualhost to take it for a test drive. I am using the current version from epel, 2.6.18. This test installation will have the server and client running on the same system,for simplicity. After installation of puppet, I ran [CODE] to start the server. All good. --configtest shows that my module...
You are not using the correct file structure and naming convention for the Puppet autoloader to find and apply your module manifests correctly. Your [CODE] should be called [CODE] and you should have a node definition for your server that has [CODE] . Meaning you should have this kind of directory structure: [CODE] [CO...
0
2
2,172
2013-08-29T22:15:57.310
pipeline_ops
serverfault.com
761,595
Vagrant Puppet apply manifest with wrong environment
I use Puppet 3.7 in standard client-server mode, with environments, and using Hiera for data. I use Vagrant to test the Puppet manifests directly from my Puppet repository. I recently started to use Hiera and changed my Vagrantfile (and Vagrant directory) to works with it. It now seems to work with Hiera but another pr...
You can specify all options for your puppet run. You can use something like this: [CODE] Which means that your modules are in "puppet/modules/#{env} and your manifests in "puppet/manifests/#{env}. Now, "env" is a variable that you can set in your Vagrantfile: [CODE] or: you could put all variables, like "env", in a yam...
2
1
1,205
2016-03-04T14:54:41.213
pipeline_ops
serverfault.com
749,400
Kibana: No Living connections
I have ES 1.5.2 cluster with Kibana 4.0.1. This consists of 4 data/master nodes along with 4 client nodes. When I'm trying to load kibana sometimes it takes longer time to load or sometimes I need to restart the ES client node which kibana is pointed to. When the issue is there, I get below console error in Kibana page...
I don't know if you made a typo or what but in the log I see [CODE] There's a space generally where a port should be unless you map 80->9200 [CODE] or if you map 80->92000 [CODE]
0
1
4,333
2016-01-15T14:29:58.553
bi_errors
serverfault.com
40,238
Migrating from SQL Server 2005 to SQL Server 2008 R2 on a different box
We currently have a SQL Server 2005 instance hosting a lot of application specific databases (ArchiveManager, SolarWinds, Kaspersky etc). We are planning to deploy a new SQL Server 2008 R2 instance on a new server and slowly migrate across to this instance. All of the applications have fairly straightforward migration ...
For logins, this is better IMHO: http://www.sqlsoldier.com/wp/sqlserver/transferring-logins-to-a-database-mirror And for jobs, you don't need SSIS. Just highlight the Jobs node in Management Studio, click on Object Explorer Details (F7), in the right pane select all, right-click and script. I'd do the logins first, in ...
3
3
5,916
2013-04-17T15:10:08.950
hadoop_errors
dba.stackexchange.com
1,143,462
How can I connect standard output and error of a systemd service to a file with a date in the path?
I would like to run a server process under systemd, and append its standard output and error to a file, where the file path has a date in it, like this: /initech/logs/tps-report-app/sales/2023/09/11/console.log Ideally, I would like that path to roll automatically when the date changes, but it's not the end of the worl...
You could, for example, roll the logs daily with [CODE] . Instead of using [CODE] you could tell your software to send logs to /path/$( something-bashy here)/console.log and as part of [CODE] create the path, then restart the service in question. Edit: just noticed you mention servers are restarted nightly. Then your o...
0
0
475
2023-09-11T10:59:09.440
infrastructure
serverfault.com
23,726
Response On Database Failover
Let say, that I have principal server named P, and mirror server named M. I've got 7 databases that are in server P, and 7 mirror databases on server M. Whole engine works fine when we are talking about server failover. But sometimes I've got events, when only one database is broken ( for example data consistency probl...
Glen Berry has some example code on his blog here - http://sqlserverperformance.wordpress.com/2012/03/27/sql-server-database-mirroring-tips-and-tricks-part-3/ - which aims to fix this problem. It works by monitoring the tagged databases, and if it notices one of them has failed across to the mirror it will fail the oth...
2
1
102
2012-09-03T08:06:06.123
database_errors
dba.stackexchange.com
73,195
MySQL: can a table get stuck in the table cache?
I've asked this question on the ServerFault stackexchange, someone directed me here. I'm a PHP developer and am responsible for a set of PHP scripts that run on a shared host running FreeBSD, that has a MySQL server (version 4.1.14-standard). Before anyone makes the remark: the decision to use a MySQL 4 server was not ...
The table cache does not store data , only MySQL table structs. The query cache cannot return old results because all the queries sing it are invalidated on write, and selects are blocked until that happens (actually causing some contention problems). I will not discard a MySQL bug, as you are using a 9-year old unsupp...
3
3
1,211
2014-08-05T13:07:24.567
database_errors
dba.stackexchange.com
225,426
Equivalent Join Conditions Yield Vastly Different Results
The following query aligns test data with the closest truth data equal to or earlier than the test data for all possible truth_id's. There are very few truth_ids and very few test ids, but each id has thousands of entries with consecutive epoch-times. Truth id's are not the same as test id's. So for test id X, each row...
Why the difference in performance? The correlated subquery in the join condition of the 1st variant is already potentially expensive. The second variant makes it worse by depending on two disjunct tables - forcing a Carthesian Product between the two (for nothing as it turn out later). The query planner is no AI, nor d...
1
1
83
2018-12-19T23:05:43.830
database_errors
dba.stackexchange.com
232,979
Script to mirror MS SQL Server databases between 2 servers
I have about 200 sites each of which have 2 servers running MSSQL (2k5 at some sites, 2k8 at others) One server is production and the other is primarily there as a backup. We're rebuilding all of these servers this year and as part of that we will have to set up mirroring for ... a lot ... of databases. Some of these s...
I ended up building a set of scripts to manage and complete the mirroring of databases, based off the snips provided by Jason Cumberland in link I provided in the question. I'll share them once tested properly. I haven't added any logging into the process as yet.
3
1
173
2011-02-08T22:23:57.880
database_errors
serverfault.com
924,594
iptables nat redirect to port if port open?
I'm running a router that I need filter some http request by proxy for blocked some domain request. so how can I make sure connection always available to destination even when proxy down? I need: [CODE] but if [CODE] is dead, how can I implement PREROUTING rule return like: [CODE] its possible using NQA(Network Quality...
AFAIK there is no option to let iptables determine if a port is up / working. There are two ways to work arround that problem that come up my mind. Run a script periodically to check the state of the port You could write a little bash script that checks if the port is opened and perform the required tasks. An easy way ...
0
0
128
2018-08-02T11:24:44.600
infrastructure
serverfault.com
648,728
Why .ssh directory permission need to be 700 for passwordless ssh
I am following the steps here to SSH without password In order to login from userA@hostA to userB@hostB, the [CODE] at hostB needs to contains the public key of userA@hostA. When I first create the .ssh/ when logged in userB@hostB, its permission is 771 or drwxrwxr-x . Under this permission status, I was not able to ss...
To protect your, because otherwise another user on the system could add his own key to your [CODE] file and impersonate you easily.
-2
5
2,332
2014-12-03T03:19:43.697
infrastructure
serverfault.com
346,560
Network Administration and Auditing Tools
We're a small company (~50) who outsource the bulk of our IT to an... average quality provider. I am taking on the role of day-to-day IT (think of things that can be fixed in 15 mins or less only). I'm looking for some tools that can make my life easier. Most of our computers are on the LAN, though we do have a couple ...
This is a hard question to answer because of all of the unknowns about your environment (including why your IT vendor is failing). You may have a difficult to manage environment, and\or unreasonable expectations of your IT department for dollars spent. In your question, you ask for very 'point of problem' tools, while ...
1
3
331
2012-01-04T16:23:47.897
infrastructure
serverfault.com
39,931
ssh remote command-fu
I am trying to do a remote backup from behind a firewall. It is really no problem to break this out into its own script that gets called in crontab, but that isn't any fun! What I am trying to do with: [CODE] is to backup a postgresql database (dumps everything to stdout) and redirect that to a remote ssh command that ...
try [CODE]
2
8
8,691
2009-07-13T15:26:30.757
database_errors
serverfault.com
1,033,630
Subdomain instead of a Subfolder with Apache Reverse Proxy?
The Lounge gives an example to use a reverse proxy with Apache. [CODE] It uses a subfolder, but I would rather have a subdomain. Like… [CODE] Instead of… [CODE] Regex feels incredibly complex for someone who's just trying to set up a nice service for their friends… After so many failed attempts, I would really like som...
This is not about The Lounge or reverse proxy, but how Apache handles virtual hosting . The official documentation even has examples for common setups, including Using [CODE] and mod_proxy together . [CODE] The mod_rewrite is only required to allow both HTTP and Websocket connections. If you only need the Websocket, th...
0
1
414
2020-09-12T10:30:04.587
infrastructure
serverfault.com
243,277
Redshift throws Value too long for character type character varying(100) even when values are within the range
I am aware what this error message [CODE] means. So I often look for the rows which cause the trouble and fix them appropriately as deemed fit by the requirement. But I encountered an odd issue today where the error happens even if there isn't a rough row. Failing insert query: [CODE] If I change [CODE] to [CODE] it wo...
Redshift can store multi byte strings into varchar field. But if you define your field as [CODE] it does not mean 100 characters. Instead it means 100 bytes. So if all the characters in the string are two byte characters, then the field can store at max 50 characters. From the documentation , Use a VARCHAR or CHARACTER...
4
9
25,083
2019-07-19T05:37:23.130
warehouse_errors
dba.stackexchange.com
975,000
File exists when pushing route with OpenVPN
I am trying to configure OpenVPN for access to a remote network (192.168.1.0/24) which is the same as my local network. Because of this I have added the following to the server config to force traffic through the VPN: [CODE] Unfortunately I see the following when connecting: [CODE] due to an existing route, presumably ...
Solved using [CODE] with the [CODE] flag, essentially blocking all connections to the local network and routing all traffic through the VPN server to the remote network.
2
3
4,989
2019-07-12T12:09:07.823
infrastructure
serverfault.com
209,437
Is there an Elegant solution to rewrite long image?query-urls into cachable_nice_urls, using only apache htaccess?
this is a pain in the ass-problem! Whicever genius solves this riddle will receive paypal donation to eat diner for two. Now lets get started. Given: most proxies, do not cache resources with a "?" in their URL even if a Cache-control: public header is present in the response. To enable proxy caching for these resource...
I would suggest progressively replacing fields. Something along the lines of: (untested) [CODE] and so on until you get all the fields converted one by one instead of trying to do them all at once. Each rule will be applied successively. This should work for fields in any order and allow for them to be optional. Leave ...
3
1
309
2010-12-06T02:19:38.533
infrastructure
serverfault.com
305,986
How should a service communicate with an activity in real-time?
How should a service communicate with an activity in real-time? BroadcastReceivers seem too slow and unreliable. Sometimes they appear too slow or stop working entirely. As an example, there was a delay of a few minutes between sending and receiving broadcasts with one of my test applications. I can't get traditional c...
In Android, a service is used to run some background task even when the user interface element which initiated that task is no more in foreground. For example: In a social networking app where the user wants to upload a video to the server, the video should continue to get uploaded in background even when the applicati...
5
2
21,864
2015-12-28T09:29:52.780
api_errors
softwareengineering.stackexchange.com
1,081,359
Server alias with WWW not working in firefox
I have webserver configuration: [CODE] And when i open page in chrome with www.site.si it is working fine, i get https://site.si but it doesnt work OK in firefox, i get certificate problem. Any ideas ? BR RK
Are you using a certificate from a known issuer? If so, It could be also be that the certificate itself is not created correctly and you're missing a CA in the chain, and firefox might pick it up. You can also try to import the CA into the firefox certificates or try to find if there's an issue with your certificate (y...
0
0
76
2021-10-22T06:26:40.607
infrastructure
serverfault.com