gree / Orion

126 stars 22 forks source link

wsod - no logs #10

Closed grnrk closed 11 years ago

grnrk commented 11 years ago

I keep getting blank whites or 500 when i try accessing /index.php. PHP works, but generates nothing in error logs. Haven't done any major conf changes except for pointing to my graphite server. Using Apache 2.2.22 on debian squeeze.

karankurani commented 11 years ago

hi dragane. can you confirm that by error logs you mean the logs in LOG_DIRECTORY/orion-[date].log ?

pcockwell commented 11 years ago

Have you made any changes to the root index.php file's ENVIRONMENT variable? Posting a gist of your config file (with credentials removed) would also be appreciated.

On Fri, Mar 8, 2013 at 11:33 AM, Karan Kurani notifications@github.comwrote:

hi dragane. can you confirm that by error logs you mean the logs in LOG_DIRECTORY/orion-[date].log ?

— Reply to this email directly or view it on GitHubhttps://github.com/gree/Orion/issues/10#issuecomment-14629128 .

Patrick Cockwell Software Engineering 4A University of Waterloo

grnrk commented 11 years ago

hi guys, That logfile is non-existent. I have not touched the ENVIRONMENT variable. Here's orion.php: https://gist.github.com/dragane/5132871 Please let me know how i can help you help me further. :)

Edit: I changed the log folder and raised the log level which gave me this output (https://gist.github.com/dragane/5132914) when trying to load index.php. Note that this log file is not named with the LOG_FILE_BASE specified in orion.php

pcockwell commented 11 years ago

Can you check your php error log and post the contents. You can find the location of this file either by loading a php page containing only the php_info() function or by looking at your php.ini file. In either cases you are looking for the error_log value. This should give you the log file location. My initial thought is that this is some form of a permissions issue for the creation of the Orion log file

grnrk commented 11 years ago

To be specific, the content of my error_log is what i call "output" above. And the main issue here is that i only get a white screen when loading index.php. apache logs are not helpful, returns a 200 is all.

karankurani commented 11 years ago

Oh. Can you try loading up index.php/orion instead of just index.php? And if that doesnt work can you try index.php/orion/index ? I think that auto redirection to the home page is not yet in the code.

grnrk commented 11 years ago

Still nothing I'm afraid :(

karankurani commented 11 years ago

Does loading up the link http://localhost/orion/index.php/cache/repopulate actually give you output such as

ADDED 1409 NEW METRICS

REMOVED 24 DEPRECATED METRICS

REPOPULATION IS COMPLETE

or is that blank too?

Also, is there a possibility that I can get access to your setup (at least temporarily) so I can look at whats going on?

grnrk commented 11 years ago

Probably not possible, but i'll look into it. Going away for a week now, talk then.

mterron commented 11 years ago

Hi, I'm trying to deploy Orion and got stuck in the same situation. Do you have any tips or hints? I don't see anything horribly wrong with my setup, I have graphite running, mysql running, the DB schema is ok, username and pwd works.

I don't see any errors when trying to access Orion, just a blank page.

There's no error for php or the webserver either.

Orion looks like a nice frontend, but it'd really benefit from a way to get it going :-).

Thanks for your help.

pcockwell commented 11 years ago

I'll test this again and see what I can come up with

pcockwell commented 11 years ago

I think I might have a solution for this.

@MATERROR, if I could get you to test the following, and post any errors that arise, I'd appreciate it.

First, go to your php.ini file and ensure that the following lines are NOT commented out.

(For windows) extension=php_curl.dll extension=php_mysql.dll extension=php_mysqli.dll

(For unix) extension=curl.so extension=mysql.so extension=mysqli.so

If they were commented, please uncomment them and try the app again.

If they were not commented, please modify the php.ini display_errors variable so that it is set to On. Afterwards, go into orion_dir/system/database/drivers/mysql/mysql_driver.php in the following function:

     * Persistent database connection
     *
     * @access  private called by the base class
     * @return  resource
     */
    function db_pconnect()
    {
        if ($this->port != '')
        {
            $this->hostname .= ':'.$this->port;
        }

        return @mysql_pconnect($this->hostname, $this->username, $this->password);
    }

Remove the @ symbol in front of the mysql_pconnect call and retry the application. Post any errors you encounter here.

mterron commented 11 years ago

No joy, the same empty page, no errors in the log or the page.

Maybe you can document what you do to get an instance going, because surely I'm missing a simple step.

Do you have a list of prerequisites for this tool? I'm using nginx, php5, php-fpm, mysql 5.5, graphite 0.9.10 from source, bucky (statsd).

I started with a clean Debian 7 install, and now this is my package list, do you see anything missing?: acpi acpi-support-base acpid adduser apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common apt apt-listchanges apt-utils aptitude aptitude-common at base-files base-passwd bash bash-completion bc bind9-host binutils bsd-mailx bsdmainutils bsdutils build-essential busybox bzip2 ca-certificates console-setup console-setup-linux coreutils cpio cpp cpp-4.6 cpp-4.7 cron daemon dash db5.1-util dc debconf debconf-i18n debian-archive-keyring debian-faq debianutils dictionaries-common diffutils discover discover-data dkms dmidecode dmsetup dnsutils doc-debian dpkg dpkg-dev e2fslibs:amd64 e2fsprogs eject elinks elinks-data ethtool exim4 exim4-base exim4-config exim4-daemon-light fakeroot fgetty file findutils ftp g++ g++-4.7 gcc gcc-4.6 gcc-4.6-base:amd64 gcc-4.7 gcc-4.7-base:amd64 geoip-database gettext-base git git-core git-man gnupg gpgv grep groff-base grub-common grub-pc grub-pc-bin grub2-common gzip host hostname iamerican ibritish ienglish-common ifupdown info initramfs-tools initscripts insserv install-info installation-report iproute iptables iputils-ping isc-dhcp-client isc-dhcp-common iso-codes ispell kbd keyboard-configuration klibc-utils kmod krb5-locales laptop-detect less libacl1:amd64 libaio1:amd64 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libapt-inst1.5:amd64 libapt-pkg4.12:amd64 libasprintf0c2:amd64 libattr1:amd64 libbind9-80 libblkid1:amd64 libboost-iostreams1.49.0 libbsd0:amd64 libbz2-1.0:amd64 libc-bin libc-dev-bin libc6:amd64 libc6-dev:amd64 libcap2:amd64 libclass-isa-perl libcomerr2:amd64 libcurl3-gnutls:amd64 libcwidget3 libdb5.1:amd64 libdbd-mysql-perl libdbi-perl libdevmapper1.02.1:amd64 libdiscover2 libdns88 libdpkg-perl libdumbnet1 libedit2:amd64 libept1.4.12 liberror-perl libevent-2.0-5:amd64 libexpat1:amd64 libexpat1-dev libffi5:amd64 libfile-fcntllock-perl libfreetype6:amd64 libfsplib0 libfuse2:amd64 libgc1c2 libgcc1:amd64 libgcrypt11:amd64 libgdbm3:amd64 libgeoip1 libglib2.0-0:amd64 libglib2.0-data libgmp10:amd64 libgnutls26:amd64 libgomp1:amd64 libgpg-error0:amd64 libgpgme11 libgpm2:amd64 libgssapi-krb5-2:amd64 libgssglue1:amd64 libhtml-template-perl libicu48:amd64 libidn11:amd64 libisc84 libisccc80 libisccfg82 libitm1:amd64 libk5crypto3:amd64 libkeyutils1:amd64 libklibc libkmod2:amd64 libkrb5-3:amd64 libkrb5support0:amd64 libldap-2.4-2:amd64 liblocale-gettext-perl liblockfile-bin liblockfile1:amd64 liblwres80 liblzma5:amd64 libmagic1:amd64 libmount1 libmpc2:amd64 libmpfr4:amd64 libmysqlclient18:amd64 libncurses5:amd64 libncursesw5:amd64 libnet-daemon-perl libnewt0.52 libnfnetlink0 libnfsidmap2:amd64 libonig2 libp11-kit0:amd64 libpam-modules:amd64 libpam-modules-bin libpam-runtime libpam0g:amd64 libpci3:amd64 libpcre3:amd64 libperl5.14 libpipeline1:amd64 libplrpc-perl libpng12-0:amd64 libpng12-dev libpopt0:amd64 libprocps0:amd64 libpth20 libpython2.7 libqdbm14 libquadmath0:amd64 libreadline6:amd64 librtmp0:amd64 libsasl2-2:amd64 libsasl2-modules:amd64 libselinux1:amd64 libsemanage-common libsemanage1:amd64 libsepol1:amd64 libsigc++-2.0-0c2a:amd64 libslang2:amd64 libsqlite3-0:amd64 libss2:amd64 libssh2-1:amd64 libssl-dev libssl-doc libssl1.0.0:amd64 libstdc++6:amd64 libstdc++6-4.7-dev libswitch-perl libtasn1-3:amd64 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libtimedate-perl libtinfo5:amd64 libtirpc1:amd64 libtokyocabinet9:amd64 libtre5:amd64 libudev0:amd64 libusb-0.1-4:amd64 libusb-1.0-0:amd64 libustr-1.0-1:amd64 libuuid-perl libuuid1:amd64 libwrap0:amd64 libx11-6:amd64 libx11-data libxapian22 libxau6:amd64 libxcb1:amd64 libxdmcp6:amd64 libxext6:amd64 libxml2:amd64 libxml2-dev:amd64 libxmuu1:amd64 linux-base linux-headers-3.2.0-4-amd64 linux-headers-3.2.0-4-common linux-headers-amd64 linux-image-3.2.0-4-amd64 linux-image-amd64 linux-kbuild-3.2 linux-libc-dev:amd64 locales login logrotate lsb-base lsb-release lsof m4 make man-db manpages manpages-dev mawk menu mime-support mlocate module-init-tools mount mpt-status multiarch-support mutt mysql-client-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5 nano ncurses-base ncurses-bin ncurses-term net-tools netbase netcat-traditional nfs-common open-vm-dkms open-vm-tools openssh-blacklist openssh-blacklist-extra openssh-client openssh-server openssl os-prober passwd patch pciutils perl perl-base perl-modules php5 php5-cgi php5-cli php5-common php5-fpm php5-mysql php5-mysqlnd pkg-config procmail procps psmisc python python-apt python-apt-common python-chardet python-debian python-debianbts python-dev python-fpconst python-medusa python-meld3 python-minimal python-pkg-resources python-reportbug python-setuptools python-soappy python-support python2.6 python2.6-minimal python2.7 python2.7-dev python2.7-minimal readline-common reportbug rpcbind rsync rsyslog runit sed sensible-utils sgml-base shared-mime-info ssl-cert sudo supervisor sysv-rc sysvinit sysvinit-utils tar task-english task-ssh-server tasksel tasksel-data tcpd telnet texinfo time traceroute tzdata ucf udev usbutils util-linux util-linux-locales vim-common vim-tiny w3m wamerican wget whiptail whois xauth xkb-data xml-core xz-utils zerofree zlib1g:amd64 zlib1g-dev:amd64

pcockwell commented 11 years ago

Turns out the extensions I listed in my last comment are for Windows only. There are equivalent extensions for unix though. Please see below.

From a clean system (which I just did this morning), here is the process I went through.

  1. Install Apache (I have 2.4 though I sure 2.2 would work just fine)
  2. Configure Apache (DocumentRoot, ServerRoot, Listen, etc)
  3. Install MySQL (again any relatively recent version should work just fine)
  4. Install PHP5
  5. Configure PHP5 (doc_root, extension_dir, etc)
  6. Install PHP extensions (php5-curl, php5-mysql)
  7. Enable PHP extensions in php.ini (curl.so, mysql.so)
  8. Configure and create Orion database in MySQL (use https://github.com/gree/Orion/blob/master/scripts/orion_schema.sql)
  9. Ensure the code base is in the DocumentRoot (via symlink or directly placing the code there) and load the application

Your package list seems to be missing php5-curl and php5-mysql. Make sure you install those and enable the extensions. If that works for you, I will update the README to clearly indicate that in the install process.

mterron commented 11 years ago

Now I managed to get a little further down the road. php5-mysql was installed, php5-curl wasn't. I was also missing a line in my configuration file. Now I'm seeing this, a webpage with the header, a login link and the legends "Category" and "Select a category and dashboard above" but there's no way to do that.

The HTML: <!doctype html>

``` Orion ```

pcockwell commented 11 years ago

There's no way to select a category because there are none created yet.

First you'll want to populate your metrics cache with http://localhost/orion/index.php/cache/repopulate (modify the url as needed to point to your instance).

What authentication method are you using? If it's NOAUTH, you just need to click Log In and you'll be able to create dashboards. If it's GOOGOAUTH2, you'll need to sign in via google oauth, and modify your permissions in the DB so that all of the perm_create, perm_read, perm_update, perm_delete, and perm_restricted are set to 1. (You'll only need to do this for the first user and I'm working on making it happen automatically, but it's not doing that yet).

mterron commented 11 years ago

I'm almost sure my webserver is acting up, can you share your Apache config?

pcockwell commented 11 years ago

Why do you think your webserver is acting up?

Here is my Apache Config. Keep in mind that it is for a windows machine, so the paths and extensions will be different. https://gist.github.com/pcockwell/5588810

mterron commented 11 years ago

I'm getting 404s everywhere.

Seems you just git cloned orion in the document root. Let me play for a little more and I'll get back to you.

Thanks for all the help

grnrk commented 11 years ago

The "extension=xxx.so" lines didn't exist in my conf and I had no knowledge they were required so it's probably a good idea to mention that step in the installation guide. Anyways, This gets me further and I now see the same "select a category"-page MATERROR posted above. When I click Orion or login, I'm forwarded to graphite composer. Is this what's supposed to happen? Is this page supposed to look like that? If this is right I don't get the next step. Oh, and metrics are populated OK and I'm using NOAUTH.

pcockwell commented 11 years ago

You get redirected to the graphite composer after logging in?

Can you post the URLs that those links direct you to when you go to the home page and are not logged in? For me,the Orion link points to localhost:8080/orion/index.php and the Log In link points to localhost:8080/orion/index.php/authenticate?location=orion/index/

I'm modifying the code now so that the README specifies installing those extensions and I'm going to make it such that the first user that signs in when using authentication other than NOAUTH will get full admin permissions.

grnrk commented 11 years ago

I accidently had my config.php pointing to my graphite server, so now I am able to login but all the menu bar links are dead; i.e nothing happens when clicked. (except for Orion Home and Log Out buttons) They point respectively at orion.installation.local/index.php/orion/create_dashboard, orion.installation.local/index.php/links and orion.installation.local/index.php/orion/users

Hmm. when hovering over empty areas I see this in my browser link address preview down in the corner: http://my.graphite.server/composer/?location=orion%2Findex%2F# Pasting this in the browser will get me the composer.

pcockwell commented 11 years ago

I believe your current issue is this one here: https://github.com/gree/Orion/issues/9

Please try pulling the changes at the end of that bug and see if it helps.

With regards to the url pointing to your graphite server, could you post a gist to your current config? Thanks.

By the way, I really appreciate your patience with solving these issues.

grnrk commented 11 years ago

Yeah, that did it, thanks. However, it seems the app is still very buggy, a lot of functions displaying weird behavior.. Looks good tho, has potential! Gonna play with it for a bit now, see if i can compile a list of things for you to fix. :P

pcockwell commented 11 years ago

Feel free to post as many bugs as you can find. I'm more than willing to put the time in to fix them :D Again, thanks for your patience.

pcockwell commented 11 years ago

@MATERROR I actually didn't clone it in the document root, I set up a symlink in the document root that points to my orion dev folder.