1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to restart Nginx and Centos services - urgent

Discussion in 'Server Configuration and Hosting' started by Glockie, Jan 1, 2016.

  1. Glockie

    Glockie Well-Known Member

    Hello all,
    Happy New Year.

    I had to reboot our server but I am still struggling with Centos and Nginx over Ubuntu and Apache.
    I cannot get my systems back online :(

    Tried everything I know, can anyone help please? This is quite urgent..
    Many thanks
     
  2. Glockie

    Glockie Well-Known Member

    I've tried and used the commands

    service nginx start
    service php-fpm start
    service mysqld start
     
  3. Jake B.

    Jake B. Well-Known Member

    service nginx start should start nginx. Does it throw any errors?

    Also may be a good idea to make nginx start on boot also
     
  4. Glockie

    Glockie Well-Known Member

    Nginx starts, config files load. Site shows DB error. :(
     
  5. Mouth

    Mouth Well-Known Member

    Take a look at /var/log/mysql/mysql.err (or similar file)
     
    Glockie likes this.
  6. Glockie

    Glockie Well-Known Member

    Where to start...
    [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    IS one.. Loads of issues. Nginx maybe quicker, but Apache is reliable. This is the first time in over a year, a server reboot has killed my site and it's new Years' Day.
    This is not good.. Yes they will come back, but almost 1k members booted offline. :(
     
  7. Glockie

    Glockie Well-Known Member

    Nginx has been installed, but none of the paths are default paths they're all edited paths.
    I have to work out what they are to get them going....
    The defaults don't exist @MattW - are they all custom paths?
     
  8. Jeremy P

    Jeremy P Well-Known Member

    If it's a database error then nginx has nothing to do with it, and Apache wouldn't fix anything.

    MySQL is having problems starting, as your error log indicates. Post more of it so the error can be identified.
     
    Glockie likes this.
  9. Mouth

    Mouth Well-Known Member

    Post the full lines related to trying to start MySQL

    Generally relates to a corruption of your MySQL DB or a misconfiguration.

    If your MySQL is not working, then it's unrelated to either Nginx or Apache. Both are just clients of MySQL.
     
    Glockie likes this.
  10. Glockie

    Glockie Well-Known Member

    I'm stuck. Been at this hours and the server runs, but doesn't accept anything.
    hosts shows an IP not our address. It's as if we don't exist but do..

    Code:
    [Note] Plugin 'FEEDBACK' is disabled.
    160101 21:57:47 [ERROR] Unknown/unsupported storage engine: InnoDB
    160101 21:57:47 [ERROR] Aborting
    
    160101 21:57:47 [Note] /usr/sbin/mysqld: Shutdown complete
    
    160101 21:57:47 mysqld_safe mysqld from pid file /var/lib/mysql/ns3607815.ip-151-80-22.eu.pid ended
    160101 22:43:20 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    160101 22:43:20 [Note] /usr/sbin/mysqld (mysqld 10.0.22-MariaDB) starting as process 19670 ...
    160101 22:43:20 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    160101 22:43:20 [Note] InnoDB: The InnoDB memory heap is disabled
    160101 22:43:20 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    160101 22:43:20 [Note] InnoDB: Memory barrier is not used
    160101 22:43:20 [Note] InnoDB: Compressed tables use zlib 1.2.3
    160101 22:43:20 [Note] InnoDB: Using Linux native AIO
    160101 22:43:20 [Note] InnoDB: Using CPU crc32 instructions
    160101 22:43:20 [ERROR] mysqld: Can't create/write to file '/var/mysqltmp/ibVdkfgW' (Errcode: 13 "Permission denied")
    2016-01-01 22:43:20 72f82adb9820  InnoDB: Error: unable to create temporary file; errno: 13
    160101 22:43:20 [ERROR] Plugin 'InnoDB' init function returned error.
    160101 22:43:20 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    160101 22:43:20 [Note] Plugin 'FEEDBACK' is disabled.
    160101 22:43:20 [ERROR] Unknown/unsupported storage engine: InnoDB
    160101 22:43:20 [ERROR] Aborting
    
    160101 22:43:20 [Note] /usr/sbin/mysqld: Shutdown complete
    
    160101 22:43:20 mysqld_safe mysqld from pid file /var/lib/mysql/ns3607815.ip-151-80-22.eu.pid ended
    160101 23:12:41 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    160101 23:12:41 [Note] /usr/sbin/mysqld (mysqld 10.0.22-MariaDB) starting as process 2030 ...
    160101 23:12:41 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    160101 23:12:41 [Note] InnoDB: The InnoDB memory heap is disabled
    160101 23:12:41 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    160101 23:12:41 [Note] InnoDB: Memory barrier is not used
    160101 23:12:41 [Note] InnoDB: Compressed tables use zlib 1.2.3
    160101 23:12:41 [Note] InnoDB: Using Linux native AIO
    160101 23:12:41 [Note] InnoDB: Using CPU crc32 instructions
    160101 23:12:41 [ERROR] mysqld: Can't create/write to file '/var/mysqltmp/ibaEjhOy' (Errcode: 13 "Permission denied")
    2016-01-01 23:12:41 682aa712a820  InnoDB: Error: unable to create temporary file; errno: 13
    160101 23:12:41 [ERROR] Plugin 'InnoDB' init function returned error.
    160101 23:12:41 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    160101 23:12:41 [Note] Plugin 'FEEDBACK' is disabled.
    160101 23:12:41 [ERROR] Unknown/unsupported storage engine: InnoDB
    160101 23:12:41 [ERROR] Aborting
    
    160101 23:12:42 [Note] /usr/sbin/mysqld: Shutdown complete
    
    160101 23:12:42 mysqld_safe mysqld from pid file /var/lib/mysql/****** pid ended
    
    I don't know what to do. This our first restart on a dedi and first downtime in over a year.
     
    Last edited: Jan 2, 2016
  11. Glockie

    Glockie Well-Known Member

    We use MariaDB Nginx, and Centos.
     
    Last edited: Jan 2, 2016
  12. Mouth

    Mouth Well-Known Member

    These both look to be your issue.
    /var/mysqltmp/ needs to exist and have access privileges for your mysql user
    /etc/my.cnf or /etc/mysql/my.cnf or /usr/etc/my.cnf (in that order) need to have config settings for InnoDB
     
    Glockie likes this.
  13. Glockie

    Glockie Well-Known Member

    Thank you.. I will look asap. Been a long day, new years day, tried a restart and lost my site and 1k members.
    Gutted. :(
    I will look in the morning but thank you Mouth, appreciated. :(
    See you tomorrow. Thank you..
     
  14. Tracy Perry

    Tracy Perry Well-Known Member

    #1, you don't have INNODB enabled in y0ur my.cnf it looks like @Glockie.
    Check to see if you have (in your my.cnf, not sure where it is located for you but updatedb && locate my.cnf should find it) something similar to
    Code:
    innodb=ON
    innodb_large_prefix=1
    innodb_purge_threads=1
    innodb_file_format = Barracuda
    innodb_file_per_table = 1
    innodb_open_files = 1000
    innodb_data_file_path= ibdata1:10M:autoextend
    innodb_buffer_pool_size = 8192MM
    innodb_log_file_size = 128M
    innodb_log_buffer_size = 8M
    innodb_flush_log_at_trx_commit = 2
    innodb_thread_concurrency = 0
    innodb_lock_wait_timeout=50
    innodb_flush_method = O_DIRECT
    innodb_support_xa=1
    
    The #'s after the equal sign will be different, but to the left you should have similar in it (those are INNODB config related parameters)
    the first one is a major one - odds are it sounds like INNODB is disabled in your config file.


    Who set the server up for you?
    And were you trying to use nginx as a proxy to apache or nginx alone?
    Odds are the members are not "lost".
     
    Glockie likes this.
  15. Glockie

    Glockie Well-Known Member

    Good morning..
    Thanks @Tracy Perry we found what it was. As it happens @MattW got my message and checked, seems a query we use to check the server real time, changed some permissions and thus prevented the server from booting correctly.
    Talk about heart attack! :whistle: :confused:

    Of course, it meant on reboot like one member on, but that's better than losing a server. Had backups etc, but the issues was it not starting. Oddly enough when I was in SSH - Mariadb, php, and caches were all running.
    Very very odd.
    NodeQuery is the bugger. Keep an eye on that one..
     

Share This Page