Using Episerver in VS 2017
My site runs in IIS Express. When I start the project from VS in Chrome, I get the default IIS Screen (The blue screen with IIS info) - so IIS starts, but the site does not launch. If I reload the browser, the site launches.
Here is my site definition in the applicationhost.config:
<site name="MySite" id="3">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Projects\mysite-episerver\src\MySite" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:mysite.mydomain.com" />
</bindings>
</site>
Update
Looking at the log:
Software: Microsoft Internet Information Services 10.0
Version: 1.0
Date: 2018-05-25 18:09:24
Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2018-05-25 18:09:24 127.0.0.1 GET / - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 - 302 0 0 13991
2018-05-25 18:09:31 127.0.0.1 GET /personal/ - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 - 200 0 0 6389
2018-05-25 18:09:31 127.0.0.1 GET /dist/styles/main.css v=636627702363674333 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 37
2018-05-25 18:09:31 127.0.0.1 GET /dist/fonts/stylesheet.css - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 29
2018-05-25 18:09:31 127.0.0.1 GET /EPiServer.Forms/DataSubmit/GetFormInitScript formGuid=6bd570d3-3e91-447f-903e-566e9d9f9468&formLanguage=en 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 171
2018-05-25 18:09:31 127.0.0.1 GET /WebResource.axd d=TzRGlCddaaqtz0Im2nSJhBlH3P1Fze7Czb4HaEn0ZkkpUFjLB2tREFUTizpsCAfxQQOQDZCZqUiBZLAo7l7EhsGTwsuUFnRXRabRz6n3XcvVK2Bd0VQe-ZDaVHtSCoc3paD6qdAAJwaIPHOv9FJMVOt6_eqfG_NNb1zepx_9qUk1&t=636601600300000000 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 81
2018-05-25 18:09:31 127.0.0.1 GET /dist/scripts/sticky-header.js v=636627702363754120 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 130
2018-05-25 18:09:31 127.0.0.1 GET /dist/scripts/main.js v=636627702363724200 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 149
2018-05-25 18:09:31 127.0.0.1 GET /dist/scripts/forms.js v=636627702363704257 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 165
2018-05-25 18:09:31 127.0.0.1 GET /siteassets/settings/logo_mysiteusa.svg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 171
2018-05-25 18:09:31 127.0.0.1 GET /dist/images/profile.svg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/dist/styles/main.css?v=636627702363674333 200 0 0 185
2018-05-25 18:09:31 127.0.0.1 GET /siteassets/image-blocks/785x650.png - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 181
2018-05-25 18:09:31 127.0.0.1 GET /siteassets/heros/180800277.jpg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 294
2018-05-25 18:09:31 127.0.0.1 GET /dist/images/BG-Pattern.png - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/dist/styles/main.css?v=636627702363674333 200 0 0 70
2018-05-25 18:09:31 127.0.0.1 GET /siteassets/image-and-text-blocks/bbb.png - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 217
2018-05-25 18:09:31 127.0.0.1 GET /dist/images/chevron.svg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/dist/styles/main.css?v=636627702363674333 200 0 0 65
2018-05-25 18:09:31 127.0.0.1 GET /siteassets/image-and-text-blocks/bestmysite.png - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 255
2018-05-25 18:09:31 127.0.0.1 GET /siteassets/settings/logo_ehl.svg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 253
2018-05-25 18:09:31 127.0.0.1 GET /dist/images/jumplink.svg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/dist/styles/main.css?v=636627702363674333 200 0 0 89
2018-05-25 18:09:31 127.0.0.1 GET /siteassets/settings/footer-mountains.png - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 112
2018-05-25 18:09:31 127.0.0.1 GET /dist/images/footer_linkedin.svg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/dist/styles/main.css?v=636627702363674333 200 0 0 38
2018-05-25 18:09:31 127.0.0.1 GET /dist/images/icon_quotation.png - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/dist/styles/main.css?v=636627702363674333 200 0 0 37
2018-05-25 18:09:31 127.0.0.1 GET /dist/images/footer_twitter.svg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/dist/styles/main.css?v=636627702363674333 200 0 0 76
2018-05-25 18:09:31 127.0.0.1 GET /dist/images/doublearrow.svg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/dist/styles/main.css?v=636627702363674333 200 0 0 173
2018-05-25 18:09:31 127.0.0.1 GET /dist/images/footer_facebook.svg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/dist/styles/main.css?v=636627702363674333 200 0 0 68
2018-05-25 18:09:31 127.0.0.1 GET /dist/images/mobilephone.svg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/dist/styles/main.css?v=636627702363674333 200 0 0 43
2018-05-25 18:09:31 127.0.0.1 GET /dist/images/email.svg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/dist/styles/main.css?v=636627702363674333 200 0 0 115
2018-05-25 18:09:31 127.0.0.1 GET /dist/images/footer_youtube.svg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/dist/styles/main.css?v=636627702363674333 200 0 0 200
2018-05-25 18:09:31 127.0.0.1 GET /dist/images/doublearrow-white.svg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/dist/styles/main.css?v=636627702363674333 200 0 0 105
2018-05-25 18:09:31 127.0.0.1 GET /dist/images/worldwide.svg - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/dist/styles/main.css?v=636627702363674333 200 0 0 115
2018-05-25 18:09:31 127.0.0.1 GET /util/LiveMonitor/Tracking/Index contentId=34&languageId=en&r=0.6407196012207004&referrer= 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 131
2018-05-25 18:09:32 127.0.0.1 GET /util/LiveMonitor/Tracking/Index contentId=34&languageId=en&r=0.5590579783850214&referrer= 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/personal/ 200 0 0 565
2018-05-25 18:09:36 127.0.0.1 GET /login/ - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 - 200 0 0 223
2018-05-25 18:09:36 127.0.0.1 GET /util/LiveMonitor/Tracking/Index contentId=271&languageId=en&r=0.29442535680181825&referrer= 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/login/ 200 0 0 55
2018-05-25 18:09:36 127.0.0.1 GET /util/LiveMonitor/Tracking/Index contentId=271&languageId=en&r=0.21276262992917028&referrer= 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/login/ 200 0 0 578
2018-05-25 18:09:52 127.0.0.1 POST /login/post/ - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/login/ 302 0 0 443
2018-05-25 18:09:52 127.0.0.1 GET /login/post/mysiteusa/cms/ - 80 admin 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/login/ 404 0 0 506
2018-05-25 18:09:52 127.0.0.1 GET /util/LiveMonitor/Tracking/Index contentId=9&languageId=en&r=0.2522424054704595&referrer=http%3A//mysite.mydomain.com/login/ 80 admin 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/login/post/%2Fmysiteusa%2Fcms%2F 200 0 0 37
2018-05-25 18:09:52 127.0.0.1 GET /util/LiveMonitor/Tracking/Index contentId=9&languageId=en&r=0.9305181288066644&referrer=http%3A//mysite.mydomain.com/login/ 80 admin 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/login/post/%2Fmysiteusa%2Fcms%2F 200 0 0 42
2018-05-25 18:09:52 127.0.0.1 GET /epiutil/images/quicknav/quicknav-arrow.png - 80 admin 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 http://mysite.mydomain.com/epiutil/styles/quicknavigator.css 200 0 0 57
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://goalaskausa.mydelphic.com</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
UseIIS keeps getting reset to true. I think whats happening is that its hitting IIS, not IIS express. Then when I refresh it hits IIS express.
Related
I have a list of URL and I'm trying construct a firewall log with that list.
Example:
$ cat urls.csv
a.com
I know how to construct the log with IP directly mentioned as variable.
$ cat processor.sh
#!/bin/bash
filename="$1"
while read -r line
do
URLS="$line"
IP='10.109.1.1'
today_date=`date +%d/%b/%Y`
conact_1=" - - ["
concat_2=":00:00:00 +0000] "
date_concat=$conact_1$today_date$concat_2
GET='"GET '
protocol=' HTTP/1.1" 304 0 304 0 0 0 655 456 645 368 0'
final_url=$IP$conact_1$today_date$concat_2$GET$URLS$protocol
echo $final_url
done < "$filename"
Result:
$ bash processor.sh urls.csv
10.109.1.1 - - [22/Jul/2018:00:00:00 +0000] "GET a.com HTTP/1.1" 304 0 304 0 0 0 655 456 645 368 0
Now If i have a log line of 50 or 100 or even more , How can I generate random IP for the total number of URLs and generate a log line ?
$cat urls.csv
a.com
b.com
c.com
d.com
....
Any suggestions on how to generate random IPs in bash?
Expected Result:
$ bash processor.sh urls.csv
1.1.1.1 - - [22/Jul/2018:00:00:00 +0000] "GET a.com HTTP/1.1" 304 0 304 0 0 0 655 456 645 368 0
1.1.1.2 - - [22/Jul/2018:00:00:00 +0000] "GET b.com HTTP/1.1" 304 0 304 0 0 0 655 456 645 368 0
1.1.1.3 - - [22/Jul/2018:00:00:00 +0000] "GET c.com HTTP/1.1" 304 0 304 0 0 0 655 456 645 368 0
1.1.1.4 - - [22/Jul/2018:00:00:00 +0000] "GET d.com HTTP/1.1" 304 0 304 0 0 0 655 456 645 368 0
............
For IPv4, the basics would be:
printf "%d.%d.%d.%d\n" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))"
You'll probably want to filter out 192.168.0.0/16 and 10.0.0.0/8 and a lot of other addresses. For IPv6, you might try:
for ((i=0;i<8;i++)); do printf "%02x%02x:" $((RANDOM%256)) $((RANDOM%256)); done | sed 's/:$//'
($RANDOM only generates values up to 2^15-1, so $((RANDOM%65536)) is pointless)
Works as expected based on Inder's answer.
$cat processor.sh
#!/bin/bash
filename="$1"
while read -r line
do
URLS="$line"
#IP=$(printf "%d.%d.%d.%d\n" "$((RANDOM % 256 ))")
IP=$(printf "%d.%d.%d.%d\n" "$((RANDOM % 256 ))" "$((RANDOM % 256 ))" "$((RANDOM % 256 ))" "$((RANDOM % 256 ))")
#IP='10.109.1.1'
today_date=`date +%d/%b/%Y`
conact_1=" - - ["
concat_2=":00:00:00 +0000] "
date_concat=$conact_1$today_date$concat_2
GET='"GET '
protocol=' HTTP/1.1" 304 0 304 0 0 0 655 456 645 368 0'
final_url=$IP$conact_1$today_date$concat_2$GET$URLS$protocol
echo $final_url
done < "$filename"
$ bash processor.sh input.csv
103.137.94.111 - - [22/Jul/2018:00:00:00 +0000] "GET a.com HTTP/1.1" 304 0 304 0 0 0 655 456 645 368 0
74.123.232.234 - - [22/Jul/2018:00:00:00 +0000] "GET b.com HTTP/1.1" 304 0 304 0 0 0 655 456 645 368 0
102.13.8.154 - - [22/Jul/2018:00:00:00 +0000] "GET c.com HTTP/1.1" 304 0 304 0 0 0 655 456 645 368 0
210.106.160.230 - - [22/Jul/2018:00:00:00 +0000] "GET d.com HTTP/1.1" 304 0 304 0 0 0 655 456 645 368 0
I am trying to configure ntp server on centos 7 instead of ip address its showing INIT while executing ntpq -p command.
my ntp server configuration file.
/etc/ntp.conf
driftfile /var/lib/ntp/drift
restrict default nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict ::1
# Hosts on local network are less restricted.
Allow 10.0.3.0/24 network clients to syncronize time with this server
restrict 10.0.3.0 mask 255.255.255.0 nomodify notrap
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 2.in.pool.ntp.org
server 1.asia.pool.ntp.org
server 3.asia.pool.ntp.org
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
disable monitor
I have have following outputs while executing ntpq -q command
[centos#ip-10-0-3-53 etc]$ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp.your.org .INIT. 16 u - 128 0 0.000 0.000 0.000
ns3.weiszhostin .INIT. 16 u - 128 0 0.000 0.000 0.000
resolver2.skyfi .INIT. 16 u - 128 0 0.000 0.000 0.000
ntp2.wiktel.com .INIT. 16 u - 128 0 0.000 0.000 0.000
[spryiq#ip-10-0-3-53 etc]$
Port 123 is listening correctly
[centos#ip-10-0-3-53 etc]$ netstat -plnu | grep 123
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
udp 0 0 10.0.3.53:123 0.0.0.0:* -
udp 0 0 127.0.0.1:123 0.0.0.0:* -
udp 0 0 0.0.0.0:123 0.0.0.0:* -
udp6 0 0 fe80::10c9:ecff:fe9:123 :::* -
udp6 0 0 ::1:123 :::* -
udp6 0 0 :::123 :::* -
[centos#ip-10-0-3-53 etc]$ ntpstat
timeout
[centos#ip-10-0-3-53 etc]$ ntpq
ntpq> as
ind assid status conf reach auth condition last_event cnt
===========================================================
1 1255 8011 yes no none reject mobilize 1
2 1256 8011 yes no none reject mobilize 1
3 1257 8011 yes no none reject mobilize 1
4 1258 8011 yes no none reject mobilize 1
I have configured iptables correctly.instead of INIT it should display ip addresses How can i troubleshoot this problem??
So, I had just started out with Elasticsearch on my local machine.
I have started 5 instances of Elasticsearch nodes. (simple ./bin/elasticsearch)
curl -s 'localhost:9200/_cat/nodes?v' gives:
host ip heap.percent ram.percent load node.role master name
127.0.0.1 127.0.0.1 5 99 3.13 d m Shirow Ishihara
127.0.0.1 127.0.0.1 7 100 3.13 d m Madame Web
127.0.0.1 127.0.0.1 5 100 3.13 d m Anthropomorpho
127.0.0.1 127.0.0.1 5 100 3.13 d m Paste-Pot Pete
127.0.0.1 127.0.0.1 2 100 3.13 d * Mephisto
My index has 2 primary shards and 5 replicas (total 10 replicas).
I had read that ES automatically scales horizontally and assigns/moves shards to new nodes. However, still all the 10 replicas are unassigned and both the 2 primary shards are in the same node.
curl -s 'localhost:9200/_cat/allocation?v' gives:
shards disk.indices disk.used disk.avail disk.total disk.percent host ip node
0 0b 105.5gb 6.2gb 111.8gb 94 127.0.0.1 127.0.0.1 Shirow Ishihara
0 0b 105.5gb 6.2gb 111.8gb 94 127.0.0.1 127.0.0.1 Paste-Pot Pete
2 318b 105.5gb 6.2gb 111.8gb 94 127.0.0.1 127.0.0.1 Mephisto
0 0b 105.5gb 6.2gb 111.8gb 94 127.0.0.1 127.0.0.1 Anthropomorpho
0 0b 105.5gb 6.2gb 111.8gb 94 127.0.0.1 127.0.0.1 Madame Web
10 UNASSIGNED
You have too few available disk space an ES is actually trying to move away some shards. But all your nodes are on the same machine so there is nowhere else where to move them and they stay unassigned. The used disk space is more than 90% of the total disk size and ES is hitting the the high watermark.
Read here more about this.
I create a simple rack application to serve static files on heroku. But I have a problem that when trying to run the application locally with rackup. It seems to requests files continuously, this results hanging tab in Chrome.
What is the problem I have and how to fix it ?
config.ru
use Rack::Static,
:urls => ["/images", "/scripts", "/styles", "/components"],
:root => "public"
run lambda { |env|
[
200,
{
'Content-Type' => 'text/html',
'Cache-Control' => 'public, max-age=86400'
},
File.open('public/index.html', File::RDONLY)
]
}
And the error :
...
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /scripts/scripts.js?_=1362996702033 HTTP/1.1" 200 8543 0.0007
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /components/jquery/jquery.min.js?_=1362996702034 HTTP/1.1" 200 92629 0.0021
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /components/jquery-ui/ui/minified/jquery-ui.custom.min.js?_=1362996702035 HTTP/1.1" 200 228147 0.0041
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /components/angular-strap/dist/angular-strap.min.js?_=1362996702040 HTTP/1.1" 200 11632 0.0010
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /components/bootstrap/docs/assets/js/bootstrap.min.js?_=1362996702041 HTTP/1.1" 200 28545 0.0010
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /components/angular-ui/build/angular-ui.min.js?_=1362996702042 HTTP/1.1" 200 17515 0.0009
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /components/angular-ui/build/angular-ui-ieshiv.min.js?_=1362996702043 HTTP/1.1" 200 1018 0.0006
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /scripts/scripts.js?_=1362996702044 HTTP/1.1" 200 8543 0.0007
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /components/jquery/jquery.min.js?_=1362996702045 HTTP/1.1" 200 92629 0.0021
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /components/jquery-ui/ui/minified/jquery-ui.custom.min.js?_=1362996702046 HTTP/1.1" 200 228147 0.0041
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /components/angular-strap/dist/angular-strap.min.js?_=1362996702051 HTTP/1.1" 200 11632 0.0007
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /components/bootstrap/docs/assets/js/bootstrap.min.js?_=1362996702052 HTTP/1.1" 200 28545 0.0060
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /components/angular-ui/build/angular-ui.min.js?_=1362996702053 HTTP/1.1" 200 17515 0.0008
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /components/angular-ui/build/angular-ui-ieshiv.min.js?_=1362996702054 HTTP/1.1" 200 1018 0.0006
127.0.0.1 - - [11/Mar/2013 11:11:43] "GET /scripts/scripts.js?_=1362996702055 HTTP/1.1" 200 8543 0.0007
...
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/ HTTP/1.1" 200 169 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/.treeinfo HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/Fedora HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/Server HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/Client HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/RedHat HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/CentOS HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/SL HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/directory.yast HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/current/images/MANIFEST HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/images/daily/MANIFEST HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/boot/platform/i86xpv/kernel/unix HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/platform/i86xpv/kernel/unix HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/STARTUP/XNLOADER.SYS HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/images/xen/vmlinuz HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/images/boot.iso HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/boot/boot.iso HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/current/images/netboot/mini.iso HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:27 +0530] "HEAD /sk/install/images/boot.iso HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:35 +0530] "HEAD /sk/ HTTP/1.1" 200 169 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:35 +0530] "HEAD /sk/.treeinfo HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
1 27.0.0.1 - - [08/Mar/2011:00:26:35 +0530] "HEAD /sk/Fedora HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:35 +0530] "HEAD /sk/Server HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:35 +0530] "HEAD /sk/Client HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:35 +0530] "HEAD /sk/RedHat HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:35 +0530] "HEAD /sk/CentOS HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:35 +0530] "HEAD /sk/SL HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:35 +0530] "HEAD /sk/directory.yast HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
127.0.0.1 - - [08/Mar/2011:00:26:35 +0530] "HEAD /sk/current/images/MANIFEST HTTP/1.1" 404 182 "-" "Python-urllib/2.6"
How can I remove date from above logs using a sed script [08/Mar/2011:00:26:35 +0530] like this there are many instances.
You can use:
sed -r 's/\[[0-9]{2}\/[A-Z][a-z]{2}\/[0-9]{4}:[0-9]{2}:[0-9]{2}:[0-9]{2} \+[0-9]+\]//g'
See it on Ideone
Alternatively if there are no other occurrences of [..] in the input you can just do:
sed 's/\[.*\]//g'
If you have Ruby(1.9+)
$ ruby -i.bak -ne 'print $_.gsub(/\[.*?\]/,"")' file
if you absolutely must use sed
$ sed -i.bak 's/\[.[^]]*\]//g' file
The general pattern would be:
sed -e 's/pattern/replacement/' filename
With:
-e command
Append the editing commands specified by the command argument
to the list of commands.
In your case, this could be e.g.:
sed -e 's/\[.*\]//' yourfilename.log
Note that [.*] will work correctly as long as you don't have additional ] characters in a line.