Bug #2410
closedredux testing message get saved in the image
Added by Anchi Cheng over 11 years ago. Updated about 7 years ago.
0%
Description
When running
redux --filename=test.jpg --oformat=PNG > test.png
The message "***Using custom copy of fftw3" got saved in the image and cause the file to become broken.
This is a required test as instructed in install Redux image server.
Updated by Jim Pulokas over 11 years ago
- Assignee changed from Jim Pulokas to Anchi Cheng
Anchi, can you give the details of what machine you ran the test on? I think it is system dependent, because it is working fine for me. The message should be printed to stderr, while the image data should go to stdout. Is there something in your particular case that is redirecting stderr to stdout?
Updated by Anchi Cheng over 11 years ago
Jim,
This happened on Fedora 18 from Chen Xu at Brandeis. I don't know the details.
Updated by Anchi Cheng over 11 years ago
- Assignee changed from Anchi Cheng to Chen Xu
Chen,
Please add details here by updating the issue if you can. Thanks.
Anchi
Updated by Chen Xu over 11 years ago
Jim and Anchi,
Here is the screen output.
[xuchen@localhost ~]$ redux --filename=images.jpg --oformat=PNG > images.png
no wisdom found
NOT IN MEMORY: Format(30988112,oformat=PNG,rgb=False)
IN FILE: Format(30988112,oformat=PNG,rgb=False)
There are two lines
"*** Using custom copy of fftw3 wrapper
PNG"
which are not in the stderr but somehow written into image.
I am using Fedora18 64-bit. Let me know how I can give more info about this.
-Chen
Updated by Jim Pulokas over 11 years ago
to summarize from the recent email trail:
The text added to the PNG is due to the older version of calc_fftw3.py which printed this message to stdout. In the more recent revision, the messages are directed to stderr. The solution is to merge the recent changes into the branch.
The next problem encountered is that the php redux client code will not connect to the redux server.
Updated by Jim Pulokas over 11 years ago
Chen,
Can you look in /var/log/httpd/error_log to see if any errors are generated when you try to view an image.
A similar problem recently was due to the socket extension for php not being installed.
If there is nothing useful in the log, the first thing to check is how the redux server and/or client is configured with a host name and port number. Make sure it is what you expect.
Check the client side configuration (php). The redux server host and port number are configured in your myamiweb/config.php:
define('SERVER_HOST', "localhost"); define('SERVER_PORT', "55123");
reduxd is configured by the redux.cfg file. You can check the content of that config file, and also verify that this config file will be read properly by starting python and entering these commands:
>>> import redux.reduxconfig >>> redux.reduxconfig.config {'log file': 'redux.log', 'server host': 'localhost', 'server port': 55123, 'cache on': False}It will show you the configuration parameters. In my example it is configured to start the server on the "localhost" network interface and using port 55123.
Now test reduxd. Start reduxd in one terminal, then from another terminal make a simple connection to it using telnet:
telnet localhost 55123If there is an error connecting, then the problem is isolated to the configuration of host name and port for reduxd, or there is a firewall that blocks even local clients. Try changing redux.cfg to set the host name to 0.0.0.0 and try the test again.
If the telnet test is already working with your original config, then the problem is in the php client side, and you would expect to see some errors in your web log. In that case, you may have to try some different configurations of host name in config.php. Instead of localhost, you could try "127.0.0.1" or the IP number of the host as seen from your local network.
Please post your results here and we will continue to solve this.
Jim
Updated by Anchi Cheng over 11 years ago
Chen,
I merged all the recent redux and pyami/fft changes in trunk to 2.2-redux branch. It should fix the printing problem this issue is originally for. Please update. This way we know we are all working on the same version. The recent changes have more places catching odd configurations and correct them. It might help in this situation.
Anchi
Updated by Chen Xu over 11 years ago
Dear Jim and Anchi,
thanks your help!!!
Here is what I found:
1) from /var/log/httpd/error_log, it generates lines including
[Thu Jul 11 17:26:08.308653 2013] [:error] [pid 7068] [client ::1:35554] PHP Warning: socket_connect(): unable to connect [13]: Permission denied in /var/www/html/myamiweb/inc/redux.inc on line 357, referer: http://localhost/myamiweb/viewerxml.php
[Thu Jul 11 17:26:08.308671 2013] [:error] [pid 7068] [client ::1:35554] PHP Warning: socket_write(): unable to write to socket [32]: Broken pipe in /var/www/html/myamiweb/inc/redux.inc on line 358, referer: http://localhost/myamiweb/viewerxml.php
[Thu Jul 11 17:26:08.308688 2013] [:error] [pid 7068] [client ::1:35554] PHP Warning: socket_read(): unable to read from socket [107]: Transport endpoint is not connected in /var/www/html/myamiweb/inc/redux.inc on line 363, referer: http://localhost/myamiweb/viewerxml.php
2)from /var/www/http/myamiweb/config.php
define('SERVER_HOST',"localhost");
define('SERVER_PORT',"55123");
[root@localhost ~]# python
Python 2.7.3 (default, Aug 9 2012, 17:23:57)
[GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import redux.reduxconfig
redux.reduxconfig.config
{'server host': 'localhost', 'server port': 55123, 'cache on': True, 'log file': '/tmp/redux.log', 'cache path': '/var/cache/myami/redux', 'cache mem size': 500, 'cache disk size': 500}
3) while reduxd is started from one terminal, from other terminal
[xuchen@localhost log]$ telnet localhost 55123
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
-Chen
Updated by Jim Pulokas over 11 years ago
It looks like telnet was successful on the second attempt when it used the local IP number directly: 127.0.0.1. The first attempt was trying "::1" (IPV6, maybe?)
This could mean the the php client is also trying "::1" and failing. You can try to configure your myamiweb/config.php to set the redux host name to 127.0.0.1 directly and maybe that will work.
Let us know.
Jim
Updated by Chen Xu over 11 years ago
Hi Jim,
change the line to use 127.0.0.1 in config.php
//define('SERVER_HOST',"localhost");
define('SERVER_HOST',"127.0.0.1");
define('SERVER_PORT',"55123");
and fired up reduxd from on terminal, while the telnet went through
[xuchen@localhost log]$ telnet 127.0.0.1 55123
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
However, the MRC still doesn't display, after restart httpd.
-Chen
Updated by Jim Pulokas over 11 years ago
Chen, is there anything new in /var/log/httpd/error_log?
Or the same error message as before?
Updated by Chen Xu over 11 years ago
Jim,
1) if I start reduxd via service, telnet doesn't connect at all, including 127.0.0.1
2) Here are some line from error_log, I tried both localhost/myamiweb and 127.0.0.1/myamiweb,
still socket communication permission issue?
=== error_log ====
[Fri Jul 12 13:40:38.288376 2013] [:error] [pid 19713] [client ::1:35855] PHP Notice: Undefined property: redux::$frameValue in /var/www/html/myamiweb/inc/redux.inc on line 346, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288384 2013] [:error] [pid 19713] [client ::1:35855] PHP Notice: Undefined property: redux::$frameValue in /var/www/html/myamiweb/inc/redux.inc on line 346, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288546 2013] [:error] [pid 19713] [client ::1:35855] PHP Warning: socket_connect(): unable to connect [13]: Permission denied in /var/www/html/myamiweb/inc/redux.inc on line 357, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288567 2013] [:error] [pid 19713] [client ::1:35855] PHP Warning: socket_write(): unable to write to socket [32]: Broken pipe in /var/www/html/myamiweb/inc/redux.inc on line 358, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288584 2013] [:error] [pid 19713] [client ::1:35855] PHP Warning: socket_read(): unable to read from socket [107]: Transport endpoint is not connected in /var/www/html/myamiweb/inc/redux.inc on line 363, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288621 2013] [:error] [pid 19713] [client ::1:35855] PHP Notice: Undefined offset: 2 in /var/www/html/myamiweb/inc/image.inc on line 260, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288644 2013] [:error] [pid 19713] [client ::1:35855] PHP Notice: Undefined variable: lpf_sigma in /var/www/html/myamiweb/inc/image.inc on line 200, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288668 2013] [:error] [pid 19713] [client ::1:35855] PHP Notice: Undefined variable: pieline in /var/www/html/myamiweb/inc/redux.inc on line 309, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288674 2013] [:error] [pid 19713] [client ::1:35855] PHP Notice: Undefined variable: pieline in /var/www/html/myamiweb/inc/redux.inc on line 310, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288706 2013] [:error] [pid 19713] [client ::1:35855] PHP Notice: Undefined index: padShapeX in /var/www/html/myamiweb/inc/imagerequest.inc on line 17, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288713 2013] [:error] [pid 19713] [client ::1:35855] PHP Notice: Undefined index: padShapeY in /var/www/html/myamiweb/inc/imagerequest.inc on line 17, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288726 2013] [:error] [pid 19713] [client ::1:35855] PHP Notice: Undefined index: padPosX in /var/www/html/myamiweb/inc/imagerequest.inc on line 18, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288731 2013] [:error] [pid 19713] [client ::1:35855] PHP Notice: Undefined index: padPoxY in /var/www/html/myamiweb/inc/imagerequest.inc on line 18, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288745 2013] [:error] [pid 19713] [client ::1:35855] PHP Notice: Undefined index: padValue in /var/www/html/myamiweb/inc/imagerequest.inc on line 19, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288764 2013] [:error] [pid 19713] [client ::1:35855] PHP Notice: Undefined variable: maskRadius in /var/www/html/myamiweb/inc/imagerequest.inc on line 26, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288858 2013] [:error] [pid 19713] [client ::1:35855] PHP Notice: Undefined variable: str in /var/www/html/myamiweb/inc/redux.inc on line 327, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288911 2013] [:error] [pid 19713] [client ::1:35855] PHP Warning: socket_connect(): unable to connect [13]: Permission denied in /var/www/html/myamiweb/inc/redux.inc on line 357, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288924 2013] [:error] [pid 19713] [client ::1:35855] PHP Warning: socket_write(): unable to write to socket [32]: Broken pipe in /var/www/html/myamiweb/inc/redux.inc on line 358, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.288938 2013] [:error] [pid 19713] [client ::1:35855] PHP Warning: socket_read(): unable to read from socket [107]: Transport endpoint is not connected in /var/www/html/myamiweb/inc/redux.inc on line 363, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.289304 2013] [:error] [pid 19713] [client ::1:35855] PHP Notice: Undefined variable: filename in /var/www/html/myamiweb/getimgxml.php on line 69, referer: http://localhost/myamiweb/viewerxml.php
[Fri Jul 12 13:40:38.289332 2013] [:error] [pid 19713] [client ::1:35855] PHP Warning: imagejpeg(): Filename cannot be empty in /var/www/html/myamiweb/inc/imagerequest.inc on line 94, referer: http://localhost/myamiweb/viewerxml.php
===================
Updated by Chen Xu over 11 years ago
Hi Jim and Anchi,
I got the same error_log line for httpd, even without reduxd started at all.
-Chen
Updated by Anchi Cheng over 11 years ago
Hi, Chen,
Please run reduxd directly, don't use service until we get the simpler case working.
I also just found that the viewerxml.php in myami-2.2-redux does not work even here.
Go to troubleshooting page to see if you get those images displayed.
Anchi
Updated by Chen Xu over 11 years ago
Hi Anchi,
troubleshooting page never displays the two images. I am kind of glad
you also have this issue, in the sense you can debug it easier there.
-Chen
Updated by Anchi Cheng over 11 years ago
Sorry to get your hope up. It was my problem. I was switching versions of myami and the browser still remembers the javascript of the trunk version so that it didn't match the php instruction (2.2-redux) with the loaded javascript (trunk). Once I restarted the web browser, it worked.
Updated by Anchi Cheng over 11 years ago
Try if this help. It came up from google search
Updated by Anchi Cheng about 7 years ago
- Status changed from Assigned to Closed
- Target version set to myami-3.0
Not followed up. Has been working on multiple sites since.