Project

General

Profile

[Solved] Redux server not displaying images via web browser, but works on command line

Added by Michael Cianfrocco almost 10 years ago

Hello,

I have installed Appion 3.1-branch successfully and been able to set up the web interface, with the exception of redux. The test command for redux works properly through the command line, and I am able to start the reduxd server and run redux commands successfully through localhost:

redux --server_host=localhost --filename=/var/www/html/myamiweb/test/img/08mar13e_00010gr_00004sq_v02.mrc --oformat=PNG > test77.png

This command displays the following output to the log file:

REQUEST: server_host=localhost&oformat=PNG&filename=/var/www/html/myamiweb/test/img/08mar13e_00010gr_00004sq_v02.mrc
Running Read(51752400,filename=/var/www/html/myamiweb/test/img/08mar13e_00010gr_00004sq_v02.mrc,info=False)
Running Format(51752336,oformat=PNG,overlay=,overlaycolor=0.1,rgb=False)

Despite this, the test images are not displayed by redux through the web interface. I am not sure what the problem is, because I have installed Appion / redux on previous machines.

This installation is different because I am installing Appion onto an Amazon server, hosting through the elastic cloud computing infrastructure. Within this environment, I have installed all of the necessary software as root, and also started the redux server as root.

This server also has a public IP address and potential firewalls / security. Could security settings prevent redux from running on the web interface?

Any help would be appreciated!

Thanks,
Mike


Replies (12)

RE: Redux server not displaying images via web browser, but works on command line - Added by Sargis Dallakyan almost 10 years ago

Hello Mike,

Check your myamiweb/config.php and remove any blank space before opening php tag.

<?php

I had a similar case recently when png produced by redux were fine but they were showing blank on the web interface. It took me a while to debug this since png binaries looked similar and I could not spot the difference.

Best,
Sargis

RE: Redux server not displaying images via web browser, but works on command line - Added by Michael Cianfrocco almost 10 years ago

Hi Sargis,

Thank you for your reply. There weren't any blank spaces before the opening php tag, and now this is what the beginning of the file looks like:

$ head /var/www/html/myamiweb/config.php
require_once 'inc/config.inc';
define('WEB_ROOT',dirname(FILE));

// --- define myamiweb tools base --- //

And, with this config.php file, there aren't any images displayed by redux on the imageviewer.

I should clarify that it is not that the imageviewer is blank, but rather it says:

Failed:
redux failed to return anything

Does this clarify the issue?

RE: Redux server not displaying images via web browser, but works on command line - Added by Sargis Dallakyan almost 10 years ago

Hi Mike,

You are welcome. Check redux log after you use imageviewer. If there is nothing logged there, check to see if the port configured in myamiweb/config.php and in redux.cfg are matched as Anchi wrote in http://emg.nysbc.org/boards/15/topics/1982

RE: Redux server not displaying images via web browser, but works on command line - Added by Michael Cianfrocco almost 10 years ago

Hi Sargis,

The redux log is not logging anything with the imageviewer, but does log correctly when the redux server is used on the command line.

The port number agrees between config.php, redux.cfg, and the redux log file (when it is run from the command line). I used the default port number, 55123.

Since my machine has an IP address, I tried changing the redux.cfg and config.php to the public IP address, but the redux server did not work from the command line or the web browser.

I also want to point out that I the redux image viewer fails whether I am viewing the appion webserver through the web address OR localhost (when opening a browser on the machine).

Are there any security privileges that might prevent redux from being launched by the web server?

Thanks,
Mike

RE: Redux server not displaying images via web browser, but works on command line - Added by Anchi Cheng almost 10 years ago

Is reduxd running on the webserver host or another host ? In general there is no security privileges that prevent redux from receiving the request if on the same host. It might not have access to the image files but you should get an error saying so in redux.log. However, there might be firewall blocking sockets between hosts.

RE: Redux server not displaying images via web browser, but works on command line - Added by Michael Cianfrocco almost 10 years ago

Hi Anchi,

Reduxd is running on the webserver host. I was just pointing out that I could access the myamiweb server locally (localhost) or through the IP address.

There continues to be no updating to the redux log file, which means that I still can't get communication between the webserver and redux.

Are there different port numbers that might work under different scenarios?

RE: Redux server not displaying images via web browser, but works on command line - Added by Sargis Dallakyan almost 10 years ago

Disable firewall, keep redux.cfg and config.php to use localhost, restart redux and see if that works. Port 55123 is arbitrary; you can use any other port as long as it's free and allows in- and outbound traffic. You can also use the following command to make sure webserver sends requests to redux on port 55123:
tcpdump -i any port 55123

RE: Redux server not displaying images via web browser, but works on command line - Added by Michael Cianfrocco almost 10 years ago

So, I disabled the firefall and rebooted my machine:

# /etc/init.d/iptables stop
# chkconfig iptables off
# reboot

And then restarted the reduxd server, and ran your command, putting it in the background:

# tcpdump -i any port 55123

Then when I ran redux, I saw the following outputs:

@# redux --server_host=localhost --filename=/var/www/html/myamiweb/test/img/08mar13e_00010gr_00004sq_v02.mrc --oformat=PNG > test99.png
  • Using custom copy of fftw3 wrapper
    calc_fftw3: 1 CPUs found, setting threads=1
    **power thread lock in effect20:45:58.726027 IP localhost.58663 > localhost.55123: Flags [S], seq 3066918136, win 65495, options [mss 65495,sackOK,TS val 4294955698 ecr 0,nop,wscale 6], length 0
    20:45:58.726037 IP localhost.55123 > localhost.58663: Flags [S.], seq 1521945293, ack 3066918137, win 65483, options [mss 65495,sackOK,TS val 4294955698 ecr 4294955698,nop,wscale 6], length 0
    20:45:58.726045 IP localhost.58663 > localhost.55123: Flags [.], ack 1, win 1024, options [nop,nop,TS val 4294955698 ecr 4294955698], length 0
    20:45:58.726228 IP localhost.58663 > localhost.55123: Flags [P.], seq 1:109, ack 1, win 1024, options [nop,nop,TS val 4294955698 ecr 4294955698], length 108
    20:45:58.726254 IP localhost.55123 > localhost.58663: Flags [.], ack 109, win 1024, options [nop,nop,TS val 4294955698 ecr 4294955698], length 0
    20:45:58.761293 IP localhost.55123 > localhost.58663: Flags [P.], seq 1:8193, ack 109, win 1024, options [nop,nop,TS val 4294955733 ecr 4294955698], length 8192
    20:45:58.761331 IP localhost.58663 > localhost.55123: Flags [.], ack 8193, win 2047, options [nop,nop,TS val 4294955733 ecr 4294955733], length 0
    20:45:58.761385 IP localhost.55123 > localhost.58663: Flags [P.], seq 8193:16385, ack 109, win 1024, options [nop,nop,TS val 4294955733 ecr 4294955733], length 8192
    20:45:58.761411 IP localhost.58663 > localhost.55123: Flags [.], ack 16385, win 2047, options [nop,nop,TS val 4294955733 ecr 4294955733], length 0
    20:45:58.761461 IP localhost.55123 > localhost.58663: Flags [P.], seq 16385:24577, ack 109, win 1024, options [nop,nop,TS val 4294955733 ecr 4294955733], length 8192
    20:45:58.761484 IP localhost.58663 > localhost.55123: Flags [.], ack 24577, win 2047, options [nop,nop,TS val 4294955733 ecr 4294955733], length 0
    20:45:58.761549 IP localhost.55123 > localhost.58663: Flags [P.], seq 24577:32769, ack 109, win 1024, options [nop,nop,TS val 4294955733 ecr 4294955733], length 8192
    20:45:58.761574 IP localhost.58663 > localhost.55123: Flags [.], ack 32769, win 2047, options [nop,nop,TS val 4294955733 ecr 4294955733], length 0
    20:45:58.761628 IP localhost.55123 > localhost.58663: Flags [P.], seq 32769:40961, ack 109, win 1024, options [nop,nop,TS val 4294955733 ecr 4294955733], length 8192
    20:45:58.761656 IP localhost.58663 > localhost.55123: Flags [.], ack 40961, win 2047, options [nop,nop,TS val 4294955733 ecr 4294955733], length 0
    20:45:58.761699 IP localhost.55123 > localhost.58663: Flags [P.], seq 40961:49153, ack 109, win 1024, options [nop,nop,TS val 4294955733 ecr 4294955733], length 8192
    20:45:58.761784 IP localhost.55123 > localhost.58663: Flags [.], seq 49153:114621, ack 109, win 1024, options [nop,nop,TS val 4294955733 ecr 4294955733], length 65468
    20:45:58.761808 IP localhost.58663 > localhost.55123: Flags [.], ack 114621, win 1275, options [nop,nop,TS val 4294955733 ecr 4294955733], length 0
    20:45:58.761900 IP localhost.55123 > localhost.58663: Flags [P.], seq 114621:114689, ack 109, win 1024, options [nop,nop,TS val 4294955733 ecr 4294955733], length 68
    20:45:58.761971 IP localhost.58663 > localhost.55123: Flags [.], ack 114689, win 2047, options [nop,nop,TS val 4294955734 ecr 4294955733], length 0
    20:45:58.762012 IP localhost.55123 > localhost.58663: Flags [P.], seq 114689:122881, ack 109, win 1024, options [nop,nop,TS val 4294955734 ecr 4294955734], length 8192
    20:45:58.762033 IP localhost.58663 > localhost.55123: Flags [.], ack 122881, win 3072, options [nop,nop,TS val 4294955734 ecr 4294955734], length 0
    20:45:58.762096 IP localhost.55123 > localhost.58663: Flags [P.], seq 122881:131073, ack 109, win 1024, options [nop,nop,TS val 4294955734 ecr 4294955734], length 8192
    20:45:58.762178 IP localhost.55123 > localhost.58663: Flags [.], seq 131073:196541, ack 109, win 1024, options [nop,nop,TS val 4294955734 ecr 4294955734], length 65468
    20:45:58.762202 IP localhost.58663 > localhost.55123: Flags [.], ack 196541, win 2299, options [nop,nop,TS val 4294955734 ecr 4294955734], length 0
    20:45:58.762286 IP localhost.55123 > localhost.58663: Flags [P.], seq 196541:196609, ack 109, win 1024, options [nop,nop,TS val 4294955734 ecr 4294955734], length 68
    20:45:58.762305 IP localhost.58663 > localhost.55123: Flags [.], ack 196609, win 3072, options [nop,nop,TS val 4294955734 ecr 4294955734], length 0
    20:45:58.762341 IP localhost.55123 > localhost.58663: Flags [P.], seq 196609:204801, ack 109, win 1024, options [nop,nop,TS val 4294955734 ecr 4294955734], length 8192
    20:45:58.762362 IP localhost.58663 > localhost.55123: Flags [.], ack 204801, win 3072, options [nop,nop,TS val 4294955734 ecr 4294955734], length 0
    20:45:58.762416 IP localhost.55123 > localhost.58663: Flags [P.], seq 204801:212993, ack 109, win 1024, options [nop,nop,TS val 4294955734 ecr 4294955734], length 8192
    20:45:58.762513 IP localhost.55123 > localhost.58663: Flags [FP.], seq 212993:260630, ack 109, win 1024, options [nop,nop,TS val 4294955734 ecr 4294955734], length 47637
    20:45:58.762537 IP localhost.58663 > localhost.55123: Flags [.], ack 260631, win 2508, options [nop,nop,TS val 4294955734 ecr 4294955734], length 0
    20:45:58.762722 IP localhost.58663 > localhost.55123: Flags [F.], seq 109, ack 260631, win 3072, options [nop,nop,TS val 4294955734 ecr 4294955734], length 0
    20:45:58.762728 IP localhost.55123 > localhost.58663: Flags [.], ack 110, win 1024, options [nop,nop,TS val 4294955734 ecr 4294955734], length 0@

Does this give us an insight into my problem? I still don't see any images displayed by the image viewer.

RE: Redux server not displaying images via web browser, but works on command line - Added by Michael Cianfrocco almost 10 years ago

Oh, I forgot to say that the redux server worked from the command line.

RE: Redux server not displaying images via web browser, but works on command line - Added by Sargis Dallakyan almost 10 years ago

I don't know why redux and tcpdump logs are mixed together but I see that it's able to connect to redux on localhost.55123. Now when you use image viewer, does tcpdump outputs new messages. Another thing to try is to disable SELinux https://www.centos.org/docs/5/html/5.1/Deployment_Guide/sec-sel-enable-disable.html

Hope this helps.

RE: Redux server not displaying images via web browser, but works on command line - Added by Michael Cianfrocco almost 10 years ago

Ah! Yes, it was the SELinux. I had to disable it and now it works!

Thank you for your patience, I really appreciate it.

Mike

RE: [Solved] Redux server not displaying images via web browser, but works on command line - Added by Sargis Dallakyan almost 10 years ago

Great, I'm glad it's working now. I've added [Solved] to the Subject line for future references. Cheers!

    (1-12/12)