« first day (315 days earlier)      last day (3508 days later) » 

12:08 AM
[ SmokeDetector ] All-caps title: URGENT MINECRAFT WILL NOT CLOSE on gaming.stackexchange.com
 
12:26 AM
[ SmokeDetector ] Bad keyword detected: Does increasing water intake during a diet help with weight loss? on skeptics.stackexchange.com
 
12:56 AM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
1:40 AM
@Undo my script should work. Doesn't matter about that.
btw, you need python 3 for it.
 
1:56 AM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
@hichris123 k
You think it's ready to go?
I can try to deploy tomorrow.
 
@Undo ... maybe.
Just put the scripts in, run the python one, and let me test it.
 
hey why not, I'll just throw it in now
@hichris123 what should they be named?
and how do I start it?
 
@Undo Python one doesn't matter, name the other deploy_git.sh.
You'll need to change the value of autostartscript in the shell script.
 
yup, done so far
 
2:08 AM
You start it with python mypythonfile.py.
 
here goes...
> ImportError: No module named http.server
:P
 
@Undo oh sorry, python3 mypythonfile.py
 
oh right, python 3
Traceback (most recent call last):
  File "github-request-thingy.py", line 11, in <module>
    HOOK_SECRET_KEY = os.environ[b'HOOK_SECRET_KEY']
  File "/usr/lib/python3.4/os.py", line 628, in __getitem__
    value = self._data[self.encodekey(key)]
  File "/usr/lib/python3.4/os.py", line 704, in encode
    raise TypeError("str expected, not %s" % type(value).__name__)
TypeError: str expected, not bytes
I need to see HOOK_SECRET_KEY, I guess?
 
uh, that should be os.environb.
So just add a b to the end of environ.
@Undo yep.
wait, wrong thing
 
@hichris123 so os.environb['HOOK_SECRET_KEY']?
@hichris123 ah okay
 
2:11 AM
@Undo yes
tell me when you're ready.
 
just a minute
generating key
 
@Undo Key as in...?
wait, maybe not.
Yeah, random string.
 
yup
 
@Undo ok, ready?
 
nope
Traceback (most recent call last):
  File "github-request-thingy.py", line 11, in <module>
    HOOK_SECRET_KEY = os.environb['HOOK_SECRET_KEY']
  File "/usr/lib/python3.4/os.py", line 628, in __getitem__
    value = self._data[self.encodekey(key)]
  File "/usr/lib/python3.4/os.py", line 732, in _check_bytes
    raise TypeError("bytes expected, not %s" % type(value).__name__)
TypeError: bytes expected, not str
when running
Did a $ export HOOK_SECRET_KEY=random_awesomeness
 
2:16 AM
... sorry, it should be os.environb[b'HOOK_SECRET_KEY']
 
k
it's running
no errors, but nothing's getting printed
@hichris123 so I guess we're ready
 
hmm, weird, it's not serving it on port 8080.
 
that port might be in use.
or firewalled
 
hmm, maybe.
eh, I have to go now so we can figure this out later.
 
yup
Opening 8080
 
2:32 AM
back
Sooo... what happened @Undo?
 
getting closer.
I've made some changes, let me commit it to a branch
 
Oh, btw I think GH is always going to say it didn't get a response.
 
yeah, I'm getting python errors
or dash errors now
okay @hichris123, current code: github.com/Charcoal-SE/SmokeDetector/tree/hooks
 
alright, and the errors?
 
yup
... now I can't repro :P
 
2:39 AM
:P
 
... hmm
where's that test link again @hichris123? github.com/Charcoal-SE/SmokeDetector/settings/hooks/3094841, right?
 
yep.
 
huh
Okay, can we change the port? I might have something sitting on 8080
 
sure
 
because nothing happens now when I click the button
 
2:41 AM
 
changed to 8081
... okaaay
well this is embarrassing :P
 
... what?
 
oh right
8081 isn't open in the firewall
 
hah
 
so many things to think about :P
well, it's even more broke now
namely that I can't get it to spit anything out
 
2:46 AM
welp
 
before it was a trivial pkill -P syntax bug
 
It actually runs?
 
it does
 
huh
 
but... this is all it does:
$ sudo python3 github-request-thingy.py
sudo: unable to resolve host ip-172-30-0-158
Password: <me puts in password and hits enter>
and nothing
 
2:47 AM
... don't use sudo.
 
I've tried it both ways
 
It won't get your environmental variable.
 
I'm not using an environ var right now
changed it to a prompt for testing
 
(because I wanted to use sudo :P)
 
2:49 AM
1
A: PermissionError: [Errno 13] Permission denied Python

D.ShawleyTry changing the port to 8080. You didn't say which OS, but most UNIX derivatives will only allow root to listen on ports below 1,024 or 4,096 depending on the OS and its configuration.

hmmm
5
Q: sudo: unable to resolve host ServerName (takes very long time to "sudo su" )

pocI use vmware and install ubuntu 12.10 as my guest OS. and run my pc , my network interface is a wireless card however everytime when i try to sudo , i should wait for a long time. and echo sudo: unable to resolve host ServerName pocUbuntu [sudo] password for poc: I search almost solutions by...

I guess check /etc/hosts?
 
hmm
but it was working before
if __name__ == '__main__':
    server = HTTPServer(('', 8081), MyHandler)
    server.serve_forever()
    print("got to here")
^ it never gets printed
 
What did you do to it?
 
not much
thinks
 
Honestly, no clue.
 
well crap
we were so close
let me try a few more things
oh wait
serve_forever() is blocking, so it shouldn't get printed
 
2:54 AM
ah
 
so yeah, it does start the server
The only thing I can think of is that something else is listening on 8081
and 8080
 
47
A: How to know what program is listening on a given port?

Antoine Rodriguezyou can use netstat to see which process is listening on which port. I use this command to have a full detail : sudo netstat -taupen if you need to know exactly which one is listening on port 8000 you can use this : sudo netstat -tapen | grep ":8000 " There is no process that can hide from...

 
@hichris123 nothing suspicious there
 
Is it running @Undo?
 
yup
when I start it
and when I stop it it isn't
 
2:57 AM
run it
 
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      1000       20658866    23416/python3
and nothing else is on 808(0/1)
 
it's 8080 again now, but that doesn't either
Neither does <ip>:8080
that's bizarre
 
It's open on the firewall, right?
 
right
 
3:00 AM
double check that
 
Oh, both of them are open to 192.30.252.0/22 which are the GH IPs
that's why it won't load in our browsers.
 
@Undo wait, what?
 
$ wget 0.0.0.0:8080
--2014-09-28 03:00:07--  0.0.0.0:8080
Connecting to 0.0.0.0:8080... connected.
HTTP request sent, awaiting response... 501 Unsupported method ('GET')
2014-09-28 03:00:07 ERROR 501: Unsupported method ('GET').
coming in from the inside works
 
Wait, what does that mean?
 
@hichris123 as in?
 
3:02 AM
That GH is communicating with it?
 
@hichris123 the wget means that I can communicate with it from within the server
(bypassing the AWS firewall)
 
not sure what you mean - this is what I have in AWS:
 
Also, btw the post URL should be https://api.github.com/repos/Charcoal-SE/SmokeDetector/deployments/" + id + "/statuses, instead of what it is now.
 
> 192.30.252.0/22
 
3:04 AM
ah
Wait, is it running now @Undo?
 
@hichris123 id or deploy_id?
 
... deploy_id.
 
oh wait, it worked
!!!
 'url': 'https://api.github.com/users/hichris1234'},
 'sha': 'ff4bbba139c3d251c576ff0b82e60d923b1c3b3d',
 'task': 'deploy'}
192.30.252.41 - - [28/Sep/2014 03:03:26] "POST / HTTP/1.1" 200 -
From github.com/Charcoal-SE/SmokeDetector
 * branch            master     -> FETCH_HEAD
Already up-to-date.
deploy_git.sh: 2: deploy_git.sh: autostartscript: not found
deploy_git.sh: 3: deploy_git.sh: startPID: not found
pkill: option requires an argument -- 'P'

Usage:
 pkill [options] <pattern>

Options:
 
there's a python prompt at the bottom of the screen
so you're doing variables wrong, it seems
 
3:06 AM
yup
ah, take out the spaces @Undo.
like:
autostartscript="autostartscript.sh"
startPID=pgrep $autostartscript
 
okay
now it quit working again
maybe it just takes an insane amount of time to get the GH request?
seems weird to me
Let's sleep on it, maybe it's GH ratelimiting us or something (unlikely, but still) and it'll fix itself in the morning
 
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
(switched it back over to master)
I really appreciate the work you're doing on this, btw ;)
 
@Undo go into the webhook, not the service, and press something like 'resend push' or whatever.
That should make it work.
 
okay
yup
:D
hmm
 * branch            master     -> FETCH_HEAD
Already up-to-date.
deploy_git.sh: 3: deploy_git.sh: ./nocrash.sh: Permission denied
pkill: option requires an argument -- 'P'

Usage:
 pkill [options] <pattern>

Options:
 -<sig>, --signal <sig>    signal to send (either number or name)
 -e, --echo                display what is killed
 -c, --count               count of matching processes
 -f, --full                use full process name to match
 -g, --pgroup <id,...>     match listed process group IDs
... permission denied?
huh.
I've got to go.
reverting to master again...
 
3:21 AM
OK, we'll figure this out tomorrow
 
yup :D
 
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
cya
 
 
1 hour later…
4:22 AM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
 
1 hour later…
5:22 AM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
 
1 hour later…
6:22 AM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
6:55 AM
[ SmokeDetector ] Bad keyword detected: Enable touchscreen on Lenovo Yoga 11s Ubuntu 14.04 on askubuntu.com
 
7:23 AM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
 
1 hour later…
8:23 AM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
 
1 hour later…
9:23 AM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
@hichris123 Then we'd need to use the Python 2to3 tool to upgrade ChatExchange every time we update it, as it is a Python 2.7 wrapper.
And about the validator that checks whether a revert is needed, I have a suggestion: if SmokeDetector crashes 5 consecutive times after 30 seconds (we can check this in the nocrash.sh script), there is probably something wrong and we should revert.
@hichris123 @Undo ^
 
10:23 AM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
 
1 hour later…
11:23 AM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
11:50 AM
Wait, perhaps what I said about 2to3 is wrong. Probably the hook script does not interact with SmokeDetector's code or ChatExchange, and then it is not necessary.
 
12:23 PM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
 
1 hour later…
1:24 PM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
 
1 hour later…
2:24 PM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
2:50 PM
@ProgramFOX nope, hook script calls a shell script, which calls the nostart.sh script.
 
3:06 PM
!!/alive?
 
@hichris123 Of course
 
@Undo who did you give block privs to in the Tavern?
 
:2457752 ff4bbba
:2457770 ff4bbba
 
3:24 PM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
[ SmokeDetector ] All-caps title: IS THERE A TOR VPN WITH THE TOR BROWSER on tor.stackexchange.com
 
@hichris123 Some of those people are added in ws.py. I don't know whether he added more to his local version though.
 
@ProgramFOX yeah, I'm not sure.
 
4:24 PM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
 
1 hour later…
5:24 PM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
@Undo There is a new SmokeDetector revision to pull. Before attempting to delete a message, it checks whether it is its own message.
So after pulling, you can make him room owner again.
 
6:25 PM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
7:19 PM
@hichris123 why?
lemme check
@hichris123 us three (me, manish, and you), ProgramFOX, Doorknob, Lynn Crumbling, TGMCians, Andy. The GH list is current.
@ProgramFOX will pull when I get a chance.
 
@Undo just wondering.
@Undo ok
 
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
[ SmokeDetector ] All-caps title: SEG FAULT WHEN THREADS ARE USED on stackoverflow.com
 
8:25 PM
[ SmokeDetector ] SmokeDetector started at rev ff4bbba (owned by Undo)
 
 
thanks @ProgramFOX
@SmokeDetector delete
yay!
!!/rev?
 
@Undo 31528b4
 
9:27 PM
nevermind
Pushed latest changes to the shell script, @Undo, now all you'll need to do is change nocrash.sh to use environmental vars.
 
9:39 PM
kk
 
[ SmokeDetector ] SmokeDetector started at rev ceeaf58 (owned by Undo)
 
k, nocrash.sh uses environ vars now
@SmokeDetector delete
From github.com/Charcoal-SE/SmokeDetector
 * branch            master     -> FETCH_HEAD
Already up-to-date.
deploy_git.sh: 3: deploy_git.sh: -f: not found
pkill: option requires an argument -- 'P'

Usage:
 pkill [options] <pattern>

Options:
 -<sig>, --signal <sig>    signal to send (either number or name)
@hichris123
 
pulling
 
[ SmokeDetector ] SmokeDetector started at rev f5c2a86 (owned by Undo)
 
... did it work?
 
From https://github.com/Charcoal-SE/SmokeDetector
* branch master -> FETCH_HEAD
Already up-to-date.
pkill: option requires an argument -- 'P'

Usage:
pkill [options] <pattern>
:/
why do you need -P?
 
It kills all the children of the parent process.
 
10:16 PM
I don't think so
> match only child processes of the given parent
I think it just kind of filters them
 
No, that's for pgrep.
 
oh right
 
could you just do a echo $startPID?
 
yeah
 
[ SmokeDetector ] SmokeDetector started at rev f5c2a86 (owned by Undo)
 
10:18 PM
Oh, I get the error, @Undo.
 
umm... adding the echo... fixed it?
:[
 
You need to have a version of nocrash.sh running when you do it.
Otherwise, there's nothing to kill the child process of.
 
ah
anyway, it seems to be working now.
 
That's good. :D
 
now SD's running, but it won't respond to GH pushes
 
10:21 PM
Yeah, that's probably a problem on my end.
 
Nope, it responded the first time.
 
hmm, then I dunno.
 
anyway, it seems to be working now so I'm gonna leave it for a while.
(kinda working)
 
ok, so it's running now?
 
yup
!!/alive?
 
10:22 PM
@Undo Of course
 
Is the python3 thingy running, too?
The one listening for GH stuff.
 
I think
that's how I started it from the command line
 
ah, okay.
 
11:18 PM
[ SmokeDetector ] SmokeDetector started at rev f5c2a86 (owned by Undo)
 

« first day (315 days earlier)      last day (3508 days later) »