I am kind of new to server setups. I installed Nginx + NGX Pagespeed + PHP FPM + APC + MemCached on Ubuntu 12.04 and topped all of this with Joomla 3.1
All works well except when I try to run siege for load testing. When I use the -b parameter with siege (benchmarking), I start getting a 502 error immediately. Even if I bring the concurrent connections down to 2, I still get the error.
The site goes down and even in a browser, I get a 502 error. With some research, I think the issue is with the persistent connections in Memcached however I have no clue on how and where to tweak the configuration. In fact, I do not know how to proceed :-(
When I run siege, without the -b switch, and even with 50 users - all works fine.
Will appreciate some guidance preferably if you can point me to some links / tutorials.
Thanks and regards,
Mangesh
Related
I have already installed rstudio server and shiny-server on my ubuntu machine (ec2 aws). I usually code in rstudio server, drop the scripts of my shiny applications in /srv/shiny-server and go to the url of the application to see it and everything works.
Since a few days I want to go through gitlab ci/cd for versioning and to automate my work, however when I run my gitlab-ci.yml I get this error :
Being new to CI/CD, I'm having a really hard time and I'd like your help if possible. Thanks
I have my community 4.1.1 neo4j service installed on the ubuntu commandline running on my windows machine. I have been using neo4j steadily for a month or two now, just recently it has prevented me from accessing the neo4j database, it will say this in neo4j browser:
Database 'neo4j' is unavailable. Run :sysinfo for more info.
I have tried uninstalling neo4j and reinstalling but that has not worked either. I tried playing around with the default listen address previously, but now with the reinstall all config data is back to normal. Running ./neo4j-community-4.1.1/bin/cypher-shell under bin does not work. It says:
Unable to establish connection in 3000ms
If I run ./neo4j-community-4.1.1/bin/cypher-shell -a 192.168.0.19 it says:
Database 'neo4j' is unavailable
When I run ./neo4j-community-4.1.1/bin/neo4j-admin check-consistency --database=neo4j it also states:
.2020-08-18 22:12:16.868+0000 WARN [o.n.c.ConsistencyCheckService] Index was dirty on startup which means it was not shutdown correctly and need to be cleaned up with a successful recovery. Index file: /home/thomp105/neo4j-community-4.1.1/data/databases/neo4j/neostore.relationshipgroupstore.db.id.
I would love to reset everything from scratch but I am unsure how
At this point I cannot even access the browser at localhost:7474. It hangs indefinitely trying to load.
I am truly stumped. Anyone have any advice on how I navigate this issue?
It's not easy to guess the issue without seeing your system, but may I ask if you can try to delete your default database, i.e. neo4j physically from the disk (e.g. rm -rf /home/thomp105/neo4j-community-4.1.1/data/databases/neo4j/), and then try to create another database with different name instead (open neo4j.conf, search for dbms.active_database, which point out on default database, and change it to some other name)?
I had this problem running on a linux server. The server was up but got this error on any query: Database 'neo4j' is unavailable. To troubleshoot I ran sudo neo4j console and the problem went away. When I ran the console as user ne04j the problem came back.
$ /usr/share/neo4j/bin/neo4j console
Directories in use:
home: /var/lib/neo4j
config: /etc/neo4j
logs: /var/log/neo4j
plugins: /var/lib/neo4j/plugins
import: /var/lib/neo4j/import
data: /var/lib/neo4j/data
certificates: /var/lib/neo4j/certificates
run: /var/run/neo4j
So I tried: sudo chown -R neo4j:neo4j /var/lib/neo4j/data and the problem went away. Apparently when I'd done a restore of the database I'd run the neo4j server as root and when the system runs neo4j it does it as the user neo4j so couldn't read any of its data. It seems that an error like this would warrant an easy to parse error message but verbosity is not the neo4j way.
I'm trying to connect uWSGI Flask application on CentOS 7 with nginx, nginx error log at /var/log/nginx/error.log gives:
2017/10/04 22:35:29 [crit] 24381#0: *54 connect() to unix:/var/www/html/CON29Application1/socket.sock failed
(13: Permission denied) while connecting to upstream, client: 80.44.138.51,
server: 188.226.174.121, request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://unix:/var/www/html/CON29Application1/socket.sock:",
host: "188.226.174.121", referrer: "http://188.226.174.121/"
uWSGI error log shows I think that uWSGI running correctly:
WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x1a1ebd0 pid: 26364 (default app)
This is my first deployment on Linux, but read another SO answer here: Nginx can't access a uWSGI unix socket on CentOS 7
This guy answered his own question, and referred to blog post on SE Linux http://axilleas.me/en/blog/2013/selinux-policy-for-nginx-and-gitlab-unix-socket-in-fedora-19/, saying SE Linux was the problem. I don't really understand what is running where on SE Linux, and solution seems to involve altering "AVC" messages in nginx audit.log, I'm getting in over my head!
As the blog post referred, I do get AVC messages mentioning denied write and nginx at /var/log/audit/audit.log:
type=AVC msg=audit(1507153878.777:559609): avc: denied { write } for pid=24381
comm="nginx" name="socket.sock" dev="vda1" ino=715975
scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_t:s0 tclass=sock_file
But being a newbie, is there perhaps something simpler perhaps I did wrong and can fix with chmod permissions or chown? Thanks any ideas.
Socket permissions:
ls -l socket.sock
srwxrwxrwx. 1 will nginx 0 Oct 4 17:02 socket.sock
Well, my SELinux settings did make a difference in the end, and changing this has got my web application actually working! I looked at another tutorial: https://www.digitalocean.com/community/tutorials/an-introduction-to-selinux-on-centos-7-part-1-basic-concepts
I must say from a Linux newbie's point of view, I have seen a few other posts mentioning how good Digital Ocean's tutorials are (I certainly don't have any affiliation with them whatsoever..).
For other newbies reading this, SELinux stands for Security Enhanced Linux, and is something included with many distributions of Linux now apparently, including CentOS 7. It's there for added security of some kind. I ran the simplest command they list on this page: getenforce
which output
enforcing
As the Digital Ocean tutorial states, "SELinux should currently be disabled", mine wasn't - no idea why, I hadn't touched anything on SELinux as had no idea what it was until 2 days ago.
Anyway, trying for simplest fix, as their advice did:
vi /etc/sysconfig/selinux
Or actually I think I didnt have permission to do this as my user, had to do it as root:
sudo vi /etc/sysconfig/selinux
There's only actually 2 settings in this file. So reset:
SELINUX=permissive
Then tried reboot as their advice to restart server, so apparently then SE Linux will start logging some security mumbo jumbo stuff, ie I think this means it records security booboos and people hacking into the system rather than stopping them. Reboot then asked me for Cloud something password, which I thought must be my sudo password, it wasn't, then crashed after trying this couple times anyway, so restarted it I think this is reboot yes? And my website now works.
As the other post I mentioned here, I think this means SELinux doing something to stop nginx running when it is set to enforcing. But the other post here seemed bit more complex for a newbie than to just change one setting as I have done here, more potential to create further problems. If I can ever develop this or another app further, i think need to find someone with more Linux experience.
I have the simplest code for firebase :
var Firebase=require('firebase');
var Ref=new Firebase('http://mydb.firebaseio.com/requests');
Ref.push({name:"checkin",type:"mandatory"},function(response){
console.log(response);
});
and I'm running it with SSH in command line on my Ubuntu 12.04 server. For some reason the push method runs but doesn't push anything and doesn't even show an error. I tried logging the error to a file but the file remains empty. I also tried catching an uncaught exception from the process, no luck. There basically isn't an error to show. How should I catch an error so I can investigate further ?
Extra information :
-Node.JS version installed on the server is 12.4 .
-One thing I noticed is there is no certificate file on the server and for example I can't use curl with an https url or PPA to download a package.
-Ubuntu 12.04.
-When I push to firebase using a PHP script it works fine but nodeJS fails to do it.
-The server is in a hospital's internal network and connects to internet through a proxy. Certain HTTPS websites are allowed on port 80 , the rest are blocked . Some similar policies might be in place for other ports and protocols.
Iv'e been trying to set up a web server off my homes internet. At the moment its a dusty little Toshiba Netbook with and Ubuntu server running off of it. I have all that set up, and apache + php, but now i'm trying to get lua to work with it. I first edited the htttpd.conf to have the
LoadModule lua_module modules/mod_lua.so
line uncommented so it would load (I somehow got it to install with all the modules enabled, just not active), and I got this error after trying to start it back up.
httpd: Syntax error on line 116 of /usr/local/apache2/conf/httpd.conf: Cannot load modules/mod_lua.so into server: /usr/local/apache2/modules/mod_lua.so: undefined symbol: luaL_loadbufferx
Since this isn't working and I have no idea why, I'd like to ask you all for help! Thanks in advance for any help you might be able to offer!
Seems like mod_lua.so is unable to find the Lua library (in which luaL_loadbufferx function is implemented). Verify that LD_LIBRARY_PATH includes path to Lua library folder, and that the user account under which the web server runs has execute privileges on liblua51.so.