Webserver

Questions and comments specific to a particular plugin should go here.

Re: Webserver

Postby wysocki » Tue Sep 05, 2017 7:50 pm

@kgschlosser:
Here are the listings you asked for. To be clear, EG does not "hang" after a restart, just the webserver is not functioning. For reference, here is a listing BEFORE I restart EG (when all is working fine):
Code: Select all
  TCP    0.0.0.0:88             0.0.0.0:0              LISTENING       2892
  TCP    192.168.1.105:88       192.168.1.101:59244    ESTABLISHED     2892
  TCP    192.168.1.105:88       192.168.1.101:59257    ESTABLISHED     2892
  TCP    192.168.1.105:88       192.168.1.101:59381    ESTABLISHED     2892
  TCP    192.168.1.105:88       192.168.1.101:59382    ESTABLISHED     2892
  TCP    192.168.1.105:88       192.168.1.101:64417    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64428    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64447    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64466    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64478    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64490    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64505    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64536    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64549    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64566    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64578    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64590    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64606    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64615    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64628    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64649    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64661    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64671    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64684    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64718    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64730    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64740    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64747    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64755    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64756    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64757    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64758    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64759    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64760    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64761    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64762    ESTABLISHED     2892
  TCP    192.168.1.105:88       192.168.1.101:64763    ESTABLISHED     2892
  TCP    192.168.1.105:88       192.168.1.101:64772    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64775    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64784    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64787    TIME_WAIT       0
  TCP    [::]:88                [::]:0                 LISTENING       2892
out-lineoutput : The object of type "Microsoft.PowerShell.Commands.Internal.For
mat.FormatStartData" is not valid or not in the correct sequence. This is likel
y caused by a user-specified "format-list" command which is conflicting with th
e default formatting.
    + CategoryInfo          : InvalidData: (:) [out-lineoutput], InvalidOperat
   ionException
    + FullyQualifiedErrorId : ConsoleLineOutputOutOfSequencePacket,Microsoft.P
   owerShell.Commands.OutLineOutputCommand


I'm not sure that it worked as it should since there appears to be some error in it?
Now I've restarted EG, webserver is not responding:
Code: Select all
  TCP    0.0.0.0:88             0.0.0.0:0              LISTENING       3644
  TCP    0.0.0.0:88             0.0.0.0:0              LISTENING       2892
  TCP    192.168.1.105:88       192.168.1.101:59244    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:59257    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:59381    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:59382    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64762    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64763    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65033    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65040    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65043    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65053    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65060    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65069    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65072    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65081    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65094    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65105    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65108    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65126    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65129    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65139    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65142    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65151    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65154    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65167    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65170    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65180    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65183    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65192    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65197    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65214    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65217    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65228    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65231    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65241    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65244    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65255    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65258    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65269    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65277    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65297    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65300    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65308    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65321    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65324    ESTABLISHED     2892
  TCP    192.168.1.105:88       192.168.1.101:65325    ESTABLISHED     2892
  TCP    192.168.1.105:88       192.168.1.101:65330    ESTABLISHED     2892
  TCP    192.168.1.105:88       192.168.1.101:65333    CLOSE_WAIT      2892
  TCP    192.168.1.105:88       192.168.1.101:65347    ESTABLISHED     2892
  TCP    [::]:88                [::]:0                 LISTENING       2892
  TCP    [::]:88                [::]:0                 LISTENING       3644
out-lineoutput : The object of type "Microsoft.PowerShell.Commands.Internal.For
mat.FormatStartData" is not valid or not in the correct sequence. This is likel
y caused by a user-specified "format-list" command which is conflicting with th
e default formatting.
    + CategoryInfo          : InvalidData: (:) [out-lineoutput], InvalidOperat
   ionException
    + FullyQualifiedErrorId : ConsoleLineOutputOutOfSequencePacket,Microsoft.P
   owerShell.Commands.OutLineOutputCommand


And now I've killed eventghost.exe*32 task:
Code: Select all
  TCP    0.0.0.0:88             0.0.0.0:0              LISTENING       2892
  TCP    192.168.1.105:88       192.168.1.101:59244    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:59257    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:59381    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:59382    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64762    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:64763    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65139    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65142    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65151    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65154    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65167    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65170    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65180    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65183    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65192    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65197    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65214    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65217    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65228    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65231    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65241    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65244    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65255    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65258    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65269    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65277    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65297    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65300    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65308    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65321    TIME_WAIT       0
  TCP    192.168.1.105:88       192.168.1.101:65324    ESTABLISHED     2892
  TCP    192.168.1.105:88       192.168.1.101:65325    ESTABLISHED     2892
  TCP    192.168.1.105:88       192.168.1.101:65330    ESTABLISHED     2892
  TCP    192.168.1.105:88       192.168.1.101:65333    CLOSE_WAIT      2892
  TCP    192.168.1.105:88       192.168.1.101:65347    ESTABLISHED     2892
  TCP    [::]:88                [::]:0                 LISTENING       2892
Get-Process : Cannot find a process with the process identifier 2892.
At line:1 char:124
+ $netstat = NetStat -abfnot | select-string ':88';$netstat;foreach($n in $nets
tat) {$segs = $n -split('       ');Get-Process <<<<  -Id $segs[-1] | Select-Obj
ect | Format-List *;'-------------------------------------'};
    + CategoryInfo          : ObjectNotFound: (2892:Int32) [Get-Process], Proc
   essCommandException
    + FullyQualifiedErrorId : NoProcessFoundForGivenId,Microsoft.PowerShell.Co
   mmands.GetProcessCommand

-------------------------------------
out-lineoutput : The object of type "Microsoft.PowerShell.Commands.Internal.For
mat.FormatStartData" is not valid or not in the correct sequence. This is likel
y caused by a user-specified "format-list" command which is conflicting with th
e default formatting.
    + CategoryInfo          : InvalidData: (:) [out-lineoutput], InvalidOperat
   ionException
    + FullyQualifiedErrorId : ConsoleLineOutputOutOfSequencePacket,Microsoft.P
   owerShell.Commands.OutLineOutputCommand


Let me know if you need anything more. AND THANKS!!
wysocki
 
Posts: 39
Joined: Mon Nov 23, 2015 9:23 pm
Location: Los Angeles area

Re: Webserver

Postby kgschlosser » Thu Sep 14, 2017 9:47 am

I apologize I missed you replying to running that for me. But I have a more refined version. hopefully this one will not error. I have already added port 88 to it (i think this is the port you are running the webserver plugin with. if EG is not getting hung then i need you to run this before you start EG when EG is running properly. after you close EG and then again when you run it and the webserver does not work.



Code: Select all
PowerShell -ExecutionPolicy ByPass -Command "function Get-NetworkStatistics{$properties = ‘Protocol’,’LocalAddress’,’LocalPort’;$properties += ‘RemoteAddress’,’RemotePort’,’State’,’ProcessName’,’PID’;netstat -ano | Select-String -Pattern ‘\s+(TCP|UDP)’ | ForEach-Object {$item = $_.line.split(” “,[System.StringSplitOptions]::RemoveEmptyEntries);if($item[1] -notmatch ‘^\[::’){if (($la = $item[1] -as [ipaddress]).AddressFamily -eq ‘InterNetworkV6’){$localAddress = $la.IPAddressToString;$localPort = $item[1].split(‘\]:’)[-1];}else{$localAddress = $item[1].split(‘:’)[0];$localPort = $item[1].split(‘:’)[-1];}if (($ra = $item[2] -as [ipaddress]).AddressFamily -eq ‘InterNetworkV6’){$remoteAddress = $ra.IPAddressToString;$remotePort = $item[2].split(‘\]:’)[-1];}else{$remoteAddress = $item[2].split(‘:’)[0];$remotePort = $item[2].split(‘:’)[-1];}New-Object PSObject -Property @{PID = $item[-1];ProcessName = (Get-Process -Id $item[-1] -ErrorAction SilentlyContinue).Name;Protocol = $item[0];LocalAddress = $localAddress;LocalPort = $localPort;RemoteAddress =$remoteAddress;RemotePort = $remotePort;State = if($item[0] -eq ‘tcp’) {$item[3]} else {$null};} | Select-Object -Property $properties;}}}$objs = Get-NetworkStatistics | Where LocalPort -eq '88';foreach ($obj in $objs) {'Network';'------------------------';$obj | Format-List *;'Process';'------------------------';Get-Process -Id $obj.PID | Select-Object | Format-List *;'================================================='}" >> %userprofile%\desktop\netstat_results.txt
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2712
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Webserver

Postby wysocki » Fri Sep 15, 2017 6:17 pm

@kgschlosser:
Looks like there's an error in your script:
Code: Select all
Where-Object : Cannot bind parameter 'FilterScript'. Cannot convert the "LocalP
ort" value of type "System.String" to type "System.Management.Automation.Script
Block".
At line:1 char:1190
+ function Get-NetworkStatistics{$properties = `Protocol','LocalAddress','Local
Port';$properties += `RemoteAddress','RemotePort','State','ProcessName','PID';n
etstat -ano | Select-String -Pattern `\s+(TCP|UDP)' | ForEach-Object {$item = $
_.line.split(" ",[System.StringSplitOptions]::RemoveEmptyEntries);if($item[1] -
notmatch `^\[::'){if (($la = $item[1] -as [ipaddress]).AddressFamily -eq `Inter
NetworkV6'){$localAddress = $la.IPAddressToString;$localPort = $item[1].split(`
\]:')[-1];}else{$localAddress = $item[1].split(`:')[0];$localPort = $item[1].sp
lit(`:')[-1];}if (($ra = $item[2] -as [ipaddress]).AddressFamily -eq `InterNetw
orkV6'){$remoteAddress = $ra.IPAddressToString;$remotePort = $item[2].split(`\]
:')[-1];}else{$remoteAddress = $item[2].split(`:')[0];$remotePort = $item[2].sp
lit(`:')[-1];}New-Object PSObject -Property @{PID = $item[-1];ProcessName = (Ge
t-Process -Id $item[-1] -ErrorAction SilentlyContinue).Name;Protocol = $item[0]
;LocalAddress = $localAddress;LocalPort = $localPort;RemoteAddress =$remoteAddr
ess;RemotePort = $remotePort;State = if($item[0] -eq `tcp') {$item[3]} else {$n
ull};} | Select-Object -Property $properties;}}}$objs = Get-NetworkStatistics |
Where <<<<  LocalPort -eq '88';foreach ($obj in $objs) {'Network';'-----------
-------------';$obj | Format-List *;'Process';'------------------------';Get-Pr
ocess -Id $obj.PID | Select-Object | Format-List *;'===========================
======================'}
    + CategoryInfo          : InvalidArgument: (:) [Where-Object], ParameterBi
   ndingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerSh
   ell.Commands.WhereObjectCommand

Network
------------------------
Process
------------------------
Get-Process : Cannot bind argument to parameter 'Id' because it is null.
At line:1 char:1345
+ function Get-NetworkStatistics{$properties = `Protocol','LocalAddress','Local
Port';$properties += `RemoteAddress','RemotePort','State','ProcessName','PID';n
etstat -ano | Select-String -Pattern `\s+(TCP|UDP)' | ForEach-Object {$item = $
_.line.split(" ",[System.StringSplitOptions]::RemoveEmptyEntries);if($item[1] -
notmatch `^\[::'){if (($la = $item[1] -as [ipaddress]).AddressFamily -eq `Inter
NetworkV6'){$localAddress = $la.IPAddressToString;$localPort = $item[1].split(`
\]:')[-1];}else{$localAddress = $item[1].split(`:')[0];$localPort = $item[1].sp
lit(`:')[-1];}if (($ra = $item[2] -as [ipaddress]).AddressFamily -eq `InterNetw
orkV6'){$remoteAddress = $ra.IPAddressToString;$remotePort = $item[2].split(`\]
:')[-1];}else{$remoteAddress = $item[2].split(`:')[0];$remotePort = $item[2].sp
lit(`:')[-1];}New-Object PSObject -Property @{PID = $item[-1];ProcessName = (Ge
t-Process -Id $item[-1] -ErrorAction SilentlyContinue).Name;Protocol = $item[0]
;LocalAddress = $localAddress;LocalPort = $localPort;RemoteAddress =$remoteAddr
ess;RemotePort = $remotePort;State = if($item[0] -eq `tcp') {$item[3]} else {$n
ull};} | Select-Object -Property $properties;}}}$objs = Get-NetworkStatistics |
Where LocalPort -eq '88';foreach ($obj in $objs) {'Network';'-----------------
-------';$obj | Format-List *;'Process';'------------------------';Get-Process
-Id <<<<  $obj.PID | Select-Object | Format-List *;'===========================
======================'}
    + CategoryInfo          : InvalidData: (:) [Get-Process], ParameterBinding
   ValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M
   icrosoft.PowerShell.Commands.GetProcessCommand

=================================================
wysocki
 
Posts: 39
Joined: Mon Nov 23, 2015 9:23 pm
Location: Los Angeles area

Previous

Return to Plugin Support

Who is online

Users browsing this forum: No registered users and 3 guests