#foswiki 2016-11-09,Wed

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
gac410vrurg, not sure about your fix to stderr capture. I'm not getting any STDERR to the error log. (from some debug print's I added).
(even with the mute code disabled)
did a reset HEAD^ --hard and stderr came back.
[00:31]
vrurgI'll try to recheck it. Maybe missed something. Though generally the issue is direct use of STDERR/STDOUT globs by everybody. Instead of 'print STDERR' there better be something like 'debug()' or 'print $STDERR' where $STDERR would be exported from Foswiki.pm
Because to have the HTTP output sent back to the user I had to fix write() in FastCGI engine.
[00:34]
gac410May not be a good idea to change this for a patch release. [00:36]
vrurghttp://pastebin.com/qR0KP9aE – what would you think if Config.spec would be replaced with something like this? I'm still thinking of splitting Configure UI from actual Config functionality.
That's why I spend so much time trying to figure out a way around this FCGI... er... specific. ;)
[00:37]
gac410It would sure put a nail in the compatibility coffin .. if all plugin Config.spec files also need replacement. But it sure is easier to read.
There are some other proposals out there as well .. to replace LocalSite.cfg with a non-perl, don't recall the specifics
[00:39]
vrurgThey could even be auto-rewritten by a script.
But that's raw draft, just few thoughts. I'm still thinking of it. And targetting at the new extensions model.
But what I wanna get out of it eventually is that $app->cfg->data->{SomeKey} = 'Invalid Value'; would raise an exception. $app->cfg->wizard( Extensions => SomeExt => Config => Key ) will give you the wizard for this key. And so on. While for the outside world it would still be a hash.
[00:41]
gac410Might also be interesting to use a json format, for external storage of the spec file. Get perl out of the picture. [00:44]
vrurgWhatever. Parse json and feed it to the ->spec() in the format I shown. Makes no difference. [00:45]
gac410yes. [00:45]
vrurgThen again – parse the old .spec and you get the compatibility for the old contribs. [00:46]
gac410right. I suppose it could be done by the extensions installer, [00:46]
vrurgJust if we get away from the complicated and hard to follow Configure structure - that could be a bin advantage.
If it's done by installer then it must store a parsed version somewhere because it might be requested anytime for, say, correct saving of the config. Or it might even be needed always – to have all the checkers in place and ready to catch up possible errors in, say, tests.
Ok, I'm off to see what's happening to STDERR.
[00:47]
gac410okay thanks. [00:49]
vrurgWorks for me. :( [00:51]
gac410hm What I was trying to do was to print STDERR Data::Dumper::Dumper( ... the ISA stuff) [00:51]
vrurgI have added print STDERR in the MuteOut construtor _before_ open's and in the DESTROY method after open's.
Somewhere around line 258?
Ah, no – 780.
[00:51]
gac410yes,
I was trying to see what was in it, to figure out the reuse, But really don't know wtf I'm doing
[00:53]
vrurgActually you get what you wanted: the _autoconfigSMTP is called by _muteExec. ;)
:D
[00:57]
gac410No... I also removed the 0 || from the if statement to disable the mute [00:58]
vrurgAh, ok. Sorry then. I'll do the same and see if it helps.
if (0 && FastCGI) - I get the output in the log.
[00:58]
That's really-really weird.
Look at the output: http://pastebin.com/uYhMPZ3H
The first two lines are for the first click, the others – for the second.
Why does cfg->{isa} change??? It's assigned nowhere!
[01:05]
***ChanServ sets mode: +o Lynnwood [01:15]
gac410wow that's really strange. [01:16]
vrurgI caught it.
For starttls method isa is set to @Net::SMTP::ISA (line 637)
But right after initializing %config @Net::SMTP::ISA is set to Foswiki::Configure::Wizards::AutoConfigureEmail::SSL
[01:20]
FoswikiBothttps://trunk.foswiki.org/System/PerlDoc?module=Foswiki::Configure::Wizards::AutoConfigureEmail::SSL [01:21]
vrurgSo, on next consequent run $config{starttls}{isa} includes this class too which is causing the recurse inheritance. [01:22]
gac410yes indeed [01:22]
vrurgI don't know how Net::SMTP::ISA is supposed to work. But pre-emptying it begore setting %config must help.
Actually changing of @Net::SMTP::ISA isn't documented. Do you know what is it for?
[01:22]
gac410I think it is trying to remove the parent class of INET or IP, but not certain. Yeah, Net::SMTP inherits from parent Socket. And we are replacing it with the appropriate SSL socket [01:26]
vrurgOk. [01:26]
gac410described a bit around line 1132
Timothe Litt wrote all of the SSL support magic
[01:26]
vrurgI think I've got a simple solution. Gimme a bit. [01:30]
gac410btw, regarding config file format, https://foswiki.org/Development/MovingConfigIntoFile Stalled due to concerns :( [01:40]
GithubBot[distro] vrurg pushed 1 new commit to Item14205: https://git.io/vXzol
distro/Item14205 ed6218f Vadim Belman: Item14205: Fixed a bug where two consequent auto-config button clicks led to a perl error.
[01:43]
***GithubBot has left [01:43]
FoswikiBothttps://foswiki.org/Tasks/Item14205 [ Item14205: Autoconfig Email failing with recent versions of IO::Socket::SSL ] [01:43]
vrurgI fixed it. Though there is another concern: Net::SMTP ISA could be left in a test state causing problems until the fastcgi daemon restarts.
I think a deamon must be reaped after configure is run because there might be numeros incosistencies left behind.
Will read about the config tomorrow. Finishing for today. Thanks and cu!
[01:45]
gac410Hm. Well in theory if you don't save the config it shouldn't matter. But this wizard sounds like dynamite.
Maybe at the very start save Net::SMTP::ISA and then restore it at the end.
[01:46]
vrurgI'm back for a second. There is no real 'very start' because Net::SMTP is loaded dynamically. But anyway, I preserved ISA in @Net_SMTP_default_ISA. Just choose where to restore it back.
Ok, I know how the STDIN issue must be resolved. That's all for today. See you!
[01:53]
gac410cu Thanks again! [01:56]
................................................................. (idle for 5h24mn)
***ChanServ sets mode: +o CDot [07:20]
........................................ (idle for 3h15mn)
stefan_slightHi @all,
do someone know what can cause a _default_mytest Web template to show up in the sidebar-webs list?
i have edited the webpreferences of this web with an admin user -
and after this it showed up.
(also to none logged in users :-? )
[10:35]
jastthat's an interesting thing to happen. which version of Foswiki are you using? [10:45]
.... (idle for 16mn)
stefan_slighthm - seems to have to do with login/logout things...
is there somewehre a version page i can look this up?
found...
This site is running Foswiki version v2.1.2, Release Foswiki-2.1.2, Plugin API version 2.4
i have tested from another computer -
there it is not showen..
so seems that browserchache is responsible for this?!
oh - no -
my fault...
sorry for the noise..
if you are viewing a page inside this web it is listed in the sidebar.. :-)
and viewing of this web is not ristricted... so i also could view it in logedout mode..
[11:01]
jastyeah, that would explain it
these webs are hidden everywhere except when you're in them
phew, I was confused for a moment :)
[11:06]
......... (idle for 44mn)
***ChanServ sets mode: +o Lynnwood [11:51]
...... (idle for 26mn)
stefan_slight;-) [12:17]
................ (idle for 1h18mn)
PatrezzePatrezze de volta. [13:35]
***ChanServ sets mode: +o gac410 [13:47]
...................... (idle for 1h49mn)
foswiki_irc9Hi there. I am just testing Foswiki 2.1.2 and when clicking "Save and continue" in an edit view I just get a red box appearing on the upper right saying "error".
Any idea how I can debug that?
I see nothing in working/logs/*
[15:36]
gac410Are you able to save (without the continue?) [15:37]
foswiki_irc9Yes, that works.
Nothing interesting in the apache logs either.
[15:38]
gac410hm strange. Sometimes the errors are reported back to the javascript but they get suppressed. ... Do you have something like the developer toolbar available on your browser where you could see the actual HTML POST / Response [15:39]
foswiki_irc9I will try... just a sec... [15:39]
gac410Just tried it on foswiki.org https://foswiki.org/Sandbox/TestSaveContinue ... works fine there, so something is going on with your install.
When you click save & continue, do you get the black box [Saving] message, and then the error, or do you get the error right away?
Also, what browser, web server, and server OS ?
[15:42]
foswiki_irc9I get the black Saving message very shortly, yes and afterwards the error.
Browser: Firefox 45.4.0
Web Server Apache 2.4.6
OS: RHEL7.3
I just started the Firefox network tool, and have the window here showing the request, URL .../rest/NatEditPlugin/save, POST, HTTP/1.1 302 FOUND...
Header...
Cookie...
Response Header...
[15:45]
gac410bingo ... 302 FOUND [15:47]
foswiki_irc9and a single received cookie, the SFOSWIKISID
nothing more
[15:47]
gac410You are getting a redirect, and the javascript cannot handle it. [15:47]
foswiki_irc9Uhmm....? [15:48]
gac410What do your normal URLs look like ... yoursite/bin/view/Web/Topic? or yoursite/Web/Topic or something else? [15:48]
foswiki_irc9Right now https://..../wiki/bin/edit/Main/WebHome?t=1478706101;nowysiwyg=1 [15:48]
gac410Okay. and if you just view your main webhome what does it look like?
in the URL bar
wiki/bin/view/ or wiki/Main/WebHome
[15:49]
foswiki_irc9/wiki/Main/WebHome [15:49]
gac410Okay. So looks like Short URL support is misconfigured
Check one more thing. hover over a topic link on your main webhome page. maybe the WebChanges link in the left bar. Do you see wiki/Main/WebChanges or wiki/bin/view/Main/WEbChanges
[15:50]
foswiki_irc9Hmm... where do I look? I have the following in the apache config:
RewriteEngine on
Alias /${WIKIDIR} "${BASEDIR}/${WIKIDIR}/bin/view"
[15:51]
gac410hang on... don't post hole config here [15:51]
foswiki_irc9RewriteRule ^/+${WIKIDIR}/+bin/+view/+(.*) /${WIKIDIR}/$1 [L,NE,R]
nono... just one more line:
RewriteRule ^/+${WIKIDIR}/+bin/+view$ /${WIKIDIR}/ [L,NE,R]
[15:51]
gac410It's not in the apache config. [15:51]
foswiki_irc9ok, sorry [15:52]
gac410Again... please hover over a topic link. Don't click it. Where does the browser info say you will go (bottom of the page info) [15:52]
foswiki_irc9the short version, for example: https://.../wiki/Main/WikiUsers [15:52]
gac410damn. That says it's configured okay
How did you make your apache configuration? Foswiki:Support.ApacheConfigGenerator or some other way?
[15:53]
FoswikiBothttps://foswiki.org/Support.ApacheConfigGenerator [ ApacheConfigGenerator ] [15:54]
foswiki_irc9yes, I started with the configurator [15:54]
gac410okay good. Back to your POST for the save and continue request.
hang on ... I want to try it here with the trace active too.
Okay, When I try it on Foswiki.org, I click save and continue The Request is: https://foswiki.org/bin/rest/NatEditPlugin/save
And it returns 200 ...
When you post to the save, you get a 302. What is the "Location: ..." returned with the 302. That's what the server is redirecting you to.
Need to understand what the difference is between the POSTed URL and the redirected Location: URL
[15:55]
foswiki_irc9I don't see a "Location:" Parameter... in the Firefox network tool
In the results
[15:59]
gac410With a 302? redirect withtout a target? strange. [16:00]
foswiki_irc9Ah, wait, you mean with the working "Save" operation? It is /wiki/Main/WebHome [16:00]
gac410No, when you Save & Continue, it should POST to save, which returns 200 status. [16:01]
foswiki_irc9In the Save-Operation, I see the Location parameter, in the same info-box with the Save-and-Continue-Operation, there is no Location parameter
The other thing that is missing is a WWW-Authenticate parameter
[16:02]
gac410Right. A Save does a 302 [16:03]
foswiki_irc9Yes, and the Save&Continue does as well... (incorrectly as I understand it) [16:04]
gac410to redirect back to the view, where as a "save and continue" should just post to save, and get a 200 back telling the JS that it worked.
gac410 isn't clear on WWW-Authenticate. What type of authentication are you using?
[16:04]
foswiki_irc9ApacheLogin with Kerberos [16:05]
gac410ugh I don't have anything here to compare to. [16:05]
foswiki_irc9Maybe there is missing some authentication token during that process?
Hmm...
In the request header of the Save&Continue request, there is set "X-Requested-With: XMLHttpRequest". Maybe that's a hint?
[16:05]
gac410no idea ... Unfortunately you've moved out of an area I'm familiar with. [16:09]
foswiki_irc9Hmm... okay. Anything else I can maybe try to at least get to the bottom of this? [16:09]
gac410The only place our code does anything at all with the WWW-Authenticate header is in our template login, which you are not using. We return that header with at 401 status to force a login.
Do you know if any other javascript based posting is working. ... like CommentPlugin? or EditTablePlugin ... hm if you used bin/configure, then that's all based on javascript / JSON behind the scenes.
[16:11]
foswiki_irc9I just changed a parameter in bin/configure and could save successfully [16:14]
gac410I guess to debug, back on the apache / kerberos side, can you see why it might be redirecting with a 302. maybe from apache logs.
But if it was authentication related, a 302 doesn't make much sense. 401 seems more appropriate.
[16:15]
foswiki_irc9So, what I *should* see in the network analysis with Save&Continue is a HTTP 200 ?
In access.log I only see one single line, after clicking it:
"POST /wiki/bin/rest/NatEditPlugin/save HTTP/1.1" 302
That we knew already
[16:15]
gac410yes. You can try it on foswiki.org if you have an account (or register), See https://foswiki.org/Sandbox/TestSaveContinue [16:17]
foswiki_irc9Well, at least it's not that important function. Where/How can I maybe hide or disable the Save&Continue button? [16:21]
gac410whenever there is a 302, there really should be a Location: response header, it's part of the standard. [16:21]
foswiki_irc9Maybe I will do some wiresharking later. [16:21]
gac410I'd have to go digging int the templates a bit to figure how to remove the button. The dev who knows this area better is offline [16:22]
foswiki_irc9Yeah it's okay than. You have already helped me so much.
I will find it somewhere I guess.
[16:23]
gac410If you enter on the URL yoursite.com/wiki/bin/rest/NatEditPlugin/save ... you should get an error 405 or something - POST requires
Do you get that error, or do you get a 302 from that?
[16:23]
foswiki_irc9ERROR: (405) Bad Request: GET denied [16:24]
gac410okay. Thats the correct response , coming from foswiki, not apache. Which makes the 302 even more unusual.
Check out the template files: templates/edittoolbar.natedit.tmpl for the Save and Continue button
give me a minute and I'll try to remove it and suggest a change.
[16:25]
foswiki_irc9Oh, if that's it, I think/hope I find out the rest... no worry. [16:28]
gac410in edittoolbar.natedit.tmpl Line 138, is where the button is expanded. %TMPL:P{"checkpointbutton"}% is the macro that expands the save and continue button [16:30]
foswiki_irc9So I just remove this part then. Okay. [16:31]
gac410Best strategy is to create a new skin. say nocontinue. Copy edittoolbar.natedit.tmpl to edittoolbar.nocontinue.tmpl And then change your skin to
set SKIN = nocontinue,natedit,pattern
That way you don't get your change overwritten when you upgrade
[16:32]
foswiki_irc9yes, okay. I will do that later after all the tests have finished. Maybe I find something to solve the problem later. [16:32]
gac410Though if this is tempoaray until you can figure it out, just edit and keepa backup ;) [16:33]
foswiki_irc9How does Apache decide to give a 302 instead of a 200 ? [16:33]
gac410Normally through a RewriteRule. Though somethign strange is going on here because I would have expected your "get" test where you got the 405 to also have redirected
So I'm not 100% convinced that it's a rewrite rule
When we see unexpected 302's 99% of the time it's due to a "Short URL" vs. "Full URL" misconfiguration. Obviously not your situation.
And a 302, without the required Location: header, is even stranger. Does sound like it might be some error in our code. A rewrite rule would always have the header
But I have no idea why / where
[16:35]
foswiki_irc9I just tested with IE11 in my windows vm, id doesn't work here either, but I don't get an error box, the Saving-message just doesn't disappear.
seems logical, probably the browser waits for the redirect url
[16:40]
gac410Just looking to where we 302, in Foswiki/Validation.pm: There is a line "use constant TRACE = 0" Change that to a TRACE = 1, and restart server if mod_perl or fastcgi
That will give you some printing in the apache error_log that tells you if it's a redirect 302 due to a failed validation.
(validation - the "Strikeone" keys used to prevent some scripting attacks
Does the "Preview" button work. It uses a similar mechanism, but does a view rather than a save.
[16:41]
foswiki_irc9Yes, I tested the other buttons before, they work.
I just set TRACE=1
I see some messages now in error_log, but I don't think they helppp
V: CHECK .... -> 1 (two times)
V: EXPIRE ... 0
V: ADD KEY .... = ....
that's all
[16:43]
gac410You would see something like "V: CONFIRMATION REJECTED\n" if it was a redirect for validation [16:44]
foswiki_irc9no, nothing more
only those 4 lines appear, when I click the button
[16:45]
gac410Okay. so the 302 is not coming from there. That eliminates one possibility.
I really don't see many places where we redirect. So possibility are Rewrite rules (doubtful) Foswiki code (I can't find it but it's possible), or something in your kerberos auth routines in apache (and there I'm clueless)
I'm running out of ideas. All I can suggest is try back later and see if anyone else around is using Kerberos / Apache auth and has this working, or might have ideasl.
[16:46]
foswiki_irc9I just set {Validation}{Method} to 'embedded' and 'none' for testing. With both settings it still doesn't work. [16:50]
gac410(I just tried the same thing and couldn't get it to fail :D)
So it's nothing to do with validation.
[16:51]
foswiki_irc9Okay, nevermind. Thank you very much for your help! [16:51]
gac410Wish I had been more successful. [16:51]
foswiki_irc9Maybe I ask again later? Is there someone who could test a kerberos setup as well? [16:52]
gac410In Foswiki/Response.pm, you could add something like "print STDERR "Someone called redirect "; But again that code there is hard-coded to add a -Location header, so I'd really expect to see Location in the response.
And acutally that code does "return unless $url" so it won't even redirect if there is no URL.
[16:52]
foswiki_irc9So, no use if I try some debug code there? [16:53]
gac410Anyway, it's around line 404. I can't see how it could redirect without a URL to redirect to. [16:54]
foswiki_irc9yes, I think the question is: Why does Apache try a redirect at all? [16:54]
gac410Well, we don't know for certain that it is apache. But I'm not seeing any obvious way that our code would return 302 status without a Location header.
And it would be pretty shocking to me if an apache RewriteRule redirected to 302 without a location.
All that's left is something in the kerberos agent, but I have no clue.
Jast ... are you around?
[16:55]
foswiki_irc9It would be nice to see, if someone else with a kerberos setup has this problem as well. [16:57]
gac410y, I don't know of any develoers running kerberos. Unfortunately people who do are in large enterprises / universities. And they may drop in time to time, but don't lurk here for support.
Another idea would be to write up a succinct description and sent it to foswiki_discuss email list. Much wider audience. For emails, brief concise is better than gazillion lines config dumps.
At least you might identify someone else running kerbereos.
[16:59]
foswiki_irc9Maybe I can open an issue/question for that here as well? [17:01]
gac410I'd say the email list has the widest possible audience. Support questions tend to get less love, just because people have to go looking for unanswered questions. [17:02]
foswiki_irc9okay, I'll think about it [17:02]
gac410And Tasks web is really for well defined bugs, not general support
Anyway, good luck. Sorry I was unable to help
[17:03]
foswiki_irc9Oh, no need to apologize! Again: Thank you!
Maybe I have some ideas as well later.
[17:03]
gac410you're welcome. Gotta go run some errands here. Back later. Georg
e
[17:04]
foswiki_irc9Bye [17:04]
***foswiki_irc9 has left [17:08]
........................... (idle for 2h11mn)
vrurggac410: Just have fixed the STDIN issue. [19:19]
GithubBot[distro] vrurg pushed 1 new commit to Item14205: https://git.io/vX2Of
distro/Item14205 d079f79 Vadim Belman: Item14205: Fixed STDIN issue when post data was lost....
[19:19]
***GithubBot has left [19:19]
FoswikiBothttps://foswiki.org/Tasks/Item14205 [ Item14205: Autoconfig Email failing with recent versions of IO::Socket::SSL ] [19:19]
vrurgFastCGI engine is now completely unbound of the standard filehandles. Any code in Foswiki can use $Foswiki::engine->{fhERR} to send error messages to. [19:20]
............... (idle for 1h12mn)
gac410Thanks vrurg ... I'm debating now whether or not this is becoming too big for a patch. I was already on the fence. But the odds of there being a 2.2 anytime soon is pretty slim.
Does this break current usage of STDERR in any way?
[20:32]
vrurgNo, it shouldn't. This is why there is the hack with STDERR->fdopen() in run().
And I retested it with a spawned process – still get the STDERR into the log file.
[20:32]
gac410oh... okay. good. I think 2.1.3 is going to need a beta cycle anyway. There are a few other large-ish changes. [20:33]
vrurgYou also wanted me to test on FreeBSD. I'm reinstalling a VM, hope to get it ready some time today.
What would be the steps to test it?
[20:36]
gac410Ah... excellent. thank you. My questions will be - does it find a valid CA cert bundle, and detect an email server. I also still need to merge in your changes to the Tar utility you did quite a while ago.
If you fill in the server, user, passwd and click autoconfig, does it also find and enable either the {Email}{SSLCaFile} and {SSLCaPath}
I still think I have the validation stuff wrong. It *should* be able to validate even without those fields, but I think the code doesn't even try if they are missing.
Comments suggest that the SSL backend should use its internal defaults if those fields are missing.
[20:37]
vrurgActually I was asking about tar testing. BTW, mail auto conf doesn't work for my server, falls back to sendmail.
But I could have mistyped smtp password.
[20:52]
gac410Oh... No idea on tar testing. That was a problem you found :D Maybe install an extension? It should try to use tar,
It tries Archive::Tar, and if that is missing, the native tar. (or I might have that reversed) ... and if tar doesn't work, it moves onto zip.
For the email autoconfig, the diags should be enough to determin if it connect, but couldn't use the credentials. or failed to connect altogether.
[20:52]
.................................... (idle for 2h56mn)
GithubBot[distro] gac410 pushed 1 new commit to Release02x01: https://git.io/vX2Am
distro/Release02x01 6afb147 George Clark: Item13963: Correct possible undefined error in Form.pm...
[23:50]
***GithubBot has left [23:50]
FoswikiBothttps://foswiki.org/Tasks/Item13963 [ Item13963: Foswiki::Form::getField() might generate 'use of undefined value' warnings. ] [23:50]
GithubBot[distro] gac410 pushed 1 new commit to master: https://git.io/vX2Ag
distro/master 5d1f44f George Clark: Merge branch 'Release02x01'
[23:52]
***GithubBot has left [23:52]

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)