client ui

This commit is contained in:
wzdwc
2020-05-08 00:59:48 +08:00
parent 01b6b2e1c1
commit 7f1b08fea5
29 changed files with 784 additions and 176 deletions
+7 -10
View File
@@ -2,14 +2,10 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="f9039135-aa11-4abd-ad74-f40c84e4fdb2" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/client/src/assets/gold.svg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/client/src/assets/less/base.less" afterDir="false" />
<change afterPath="$PROJECT_DIR$/client/src/utils/Link.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/client/src/App.vue" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/App.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/client/src/components/CommonCard.vue" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/components/CommonCard.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/client/src/components/SitList.vue" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/components/SitList.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/client/src/utils/request.ts" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/utils/request.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/client/src/views/Home.vue" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/views/Home.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/client/src/views/game.vue" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/views/game.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/server/logs/ELKLog/error.log" beforeDir="false" afterPath="$PROJECT_DIR$/server/logs/ELKLog/error.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/server/logs/ELKLog/info.log" beforeDir="false" afterPath="$PROJECT_DIR$/server/logs/ELKLog/info.log" afterDir="false" />
@@ -53,7 +49,7 @@
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="js.linters.configure.manually.selectedtslint" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/client/src/assets" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/client/src/utils" />
<property name="list.type.of.created.stylesheet" value="Less" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.detected.package.standard" value="true" />
@@ -65,11 +61,12 @@
<property name="node.js.selected.package.standard" value="" />
<property name="node.js.selected.package.tslint" value="$PROJECT_DIR$/server/node_modules/tslint" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="settings.editor.selected.configurable" value="settings.javascript.linters.tslint" />
<property name="settings.editor.selected.configurable" value="preferences.keymap" />
<property name="ts.external.directory.path" value="$PROJECT_DIR$/server/node_modules/typescript/lib" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/client/src/utils" />
<recent name="$PROJECT_DIR$/client/src/assets" />
</key>
</component>
@@ -89,7 +86,7 @@
<workItem from="1588119564722" duration="238000" />
<workItem from="1588166446649" duration="17000" />
<workItem from="1588166552136" duration="2062000" />
<workItem from="1588168659920" duration="19408000" />
<workItem from="1588168659920" duration="21070000" />
</task>
<servers />
</component>
@@ -105,10 +102,10 @@
<screen x="0" y="0" width="1440" height="900" />
</state>
<state x="533" y="173" key="#com.intellij.ide.util.MemberChooser/0.0.1440.900@0.0.1440.900" timestamp="1587206645912" />
<state x="221" y="89" key="SettingsEditor" timestamp="1588168578146">
<state x="221" y="89" key="SettingsEditor" timestamp="1588864041632">
<screen x="0" y="0" width="1440" height="900" />
</state>
<state x="221" y="89" key="SettingsEditor/0.0.1440.900@0.0.1440.900" timestamp="1588168578146" />
<state x="221" y="89" key="SettingsEditor/0.0.1440.900@0.0.1440.900" timestamp="1588864041632" />
<state x="100" y="100" width="1240" height="700" key="com.intellij.history.integration.ui.views.FileHistoryDialog" timestamp="1588771907080">
<screen x="0" y="23" width="1440" height="823" />
</state>
+2
View File
@@ -0,0 +1,2 @@
# Default ignored files
/workspace.xml
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
+67
View File
@@ -0,0 +1,67 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JSCodeStyleSettings version="0">
<option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="ALIGN_OBJECT_PROPERTIES" value="2" />
<option name="USE_DOUBLE_QUOTES" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
<option name="OBJECT_LITERAL_WRAP" value="2" />
<option name="IMPORTS_WRAP" value="0" />
<option name="SPACES_WITHIN_IMPORTS" value="true" />
<option name="CHAINED_CALL_DOT_ON_NEW_LINE" value="false" />
</JSCodeStyleSettings>
<TypeScriptCodeStyleSettings version="0">
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="USE_DOUBLE_QUOTES" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" />
<option name="SPACE_WITHIN_TYPE_ASSERTION" value="true" />
</TypeScriptCodeStyleSettings>
<codeStyleSettings language="JavaScript">
<option name="RIGHT_MARGIN" value="80" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
<option name="METHOD_CALL_CHAIN_WRAP" value="5" />
<option name="BINARY_OPERATION_WRAP" value="1" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="true" />
<option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="TypeScript">
<option name="RIGHT_MARGIN" value="120" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
<option name="METHOD_CALL_CHAIN_WRAP" value="5" />
<option name="BINARY_OPERATION_WRAP" value="1" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="true" />
<option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="WHILE_BRACE_FORCE" value="3" />
<option name="FOR_BRACE_FORCE" value="3" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
</component>
+5
View File
@@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>
+6
View File
@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="TsLint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/client.iml" filepath="$PROJECT_DIR$/.idea/client.iml" />
</modules>
</component>
</project>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
+1 -1
View File
@@ -28,7 +28,7 @@
return !!this.cardList[0];
}
private isBlack(type: string) {
return type === '♠' || type === '♣'
return type === '♠' || type === '♣';
}
}
</script>
+210 -163
View File
@@ -1,20 +1,29 @@
<template>
y<template>
<div class="sit-list-container">
<div class="sit-list">
<div class="item" v-for="(sit,key) in sitList" :key="key" @click="sitDown(key)">
<div class="default"></div>
<div class="player">
<div class="user-name">{{sit.player.account}}</div>
<div class="icon iconfont icon-user-avatar"></div>
<div class="counter">{{sit.player.counter}}</div>
<div class="action-size">{{sit.player.actionSize}}</div>
<div class="action-command">{{sit.player.actionCommand}}</div>
<div class="type">{{sit.player.type}}</div>
<div class="hand-card">{{sit.player.handCard}}</div>
<div
class="sit"
v-for="(sit, key) in sitList"
:key="key"
@click="sitDown(sit)"
>
<div class="default">
<i>sit</i>
</div>
<div class="cards">
<div class="hand-card">{{sit.player.handCard}}</div>
<div class="card-style"></div>
<div class="sit-player" v-if="sit.player">
<div class="player">
<div class="user-name">{{ sit.player.account }}</div>
<div class="icon iconfont icon-user-avatar"></div>
<div class="counter">{{ sit.player.counter }}</div>
<div class="action-size">{{ sit.player.actionSize }}</div>
<div class="action-command">{{ sit.player.actionCommand }}</div>
<div class="type">{{ sit.player.type }}</div>
<div class="hand-card">{{ sit.player.handCard }}</div>
</div>
<div class="cards">
<div class="hand-card">{{ sit.player.handCard }}x</div>
<div class="card-style"></div>
</div>
</div>
</div>
</div>
@@ -22,185 +31,223 @@
</template>
<script lang="ts">
import {Component, Prop, Vue} from 'vue-property-decorator';
import {IUser} from '../../../server/src/interface/IUser';
import {Component, Prop, Vue} from 'vue-property-decorator';
import {IUser} from '../../../server/src/interface/IUser';
import {Link} from '@/utils/Link';
interface ISit {
player?: IUser;
position: number;
}
interface ISit {
player?: IUser | null;
position: number;
}
@Component
export default class SitList extends Vue {
@Prop() private msg!: string;
@Prop() private currPlayer: any;
private sitList: ISit[] = [];
@Component
export default class SitList extends Vue {
@Prop() private msg!: string;
@Prop() private currPlayer: any;
private sitList: ISit[] = [];
private sitLink: Link<ISit> | undefined;
private sitDown(sit: ISit) {
if (!sit.player) {
sit.player = this.currPlayer;
}
}
private mounted() {
for (let i = 0; i < 9; i++) {
const sit = {
position: i + 1,
};
this.sitList.push(sit);
}
private sitDown(sit: ISit) {
if (!sit.player) {
sit.player = this.currPlayer;
}
}
private mounted() {
for (let i = 0; i < 9; i++) {
const sit = {
player: null,
position: i + 1,
};
this.sitList.push(sit);
}
this.sitLink = new Link<ISit>(this.sitList);
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.sit-list-container {
display: flex;
flex-direction: row-reverse;
align-items: center;
height: 100vh;
.sit-list-container {
display: flex;
flex-direction: row-reverse;
align-items: center;
height: 100vh;
width: 100vw;
.sit-list {
position: relative;
width: 100vw;
.sit-list {
position: relative;
width: 100vw;
height: 620px;
padding: 10px;
margin:0 15px;
box-sizing: border-box;
.item {
position: absolute;
font-size: 12px;
.player{
position: relative;
.icon{
width: 45px;
height: 45px;
font-size: 45px;
line-height: 45px;
border-radius: 50%;
margin-bottom: 2px;
}
.user-name{
color: #fff;
}
.counter{
background-color: rgba(0,0,0,0.6);
color: #fff;
font-weight: 600;
font-size: 12px;
border-radius: 2px;
}
.action-command{
top: 15px;
left: 45px;
padding: 1px 8px;
border-radius: 9px;
color: #ffffff;
background-color: #2c3e50;
text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.3);
position: absolute;
}
.type{
background-color: #fff;
color: #2b2b2b;
border-radius: 50%;
padding: 2px;
width: 15px;
height: 15px;
line-height: 16px;
position: absolute;
top: 53px;
left: 38px;
font-size: 12px;
transform: scale(0.8);
}
.action-size{
background: rgba(0, 0, 0, 0.3) url("../assets/gold.svg") center left no-repeat;
background-size: contain;
border-radius: 2px;
padding:1px 4px 1px 12px;
text-align: center;
min-width: 35px;
color: #fff;
font-weight: 600;
position: absolute;
top: 35px;
left: 40px;
}
height: 620px;
padding: 10px;
margin: 0 15px;
box-sizing: border-box;
.sit {
position: absolute;
font-size: 12px;
.default {
i {
width: 45px;
height: 45px;
border-radius: 50%;
border: 1px solid #bababa;
display: block;
font-style: normal;
font-size: 20px;
line-height: 45px;
color: #fff;
}
&:nth-child(1) {
left: 75px;
top: 0;
}
.player {
position: relative;
.icon {
width: 45px;
height: 45px;
font-size: 45px;
line-height: 45px;
border-radius: 50%;
margin-bottom: 2px;
}
&:nth-child(2) {
left: 240px;
top: 0;
.user-name {
color: #fff;
}
&:nth-child(3) {
left: 296px;
top: 100px;
.counter {
background-color: rgba(0, 0, 0, 0.6);
color: #fff;
font-weight: 600;
font-size: 12px;
border-radius: 2px;
}
&:nth-child(4) {
left: 296px;
top: 210px;
.action-command {
top: 15px;
left: 45px;
padding: 1px 8px;
border-radius: 9px;
color: #ffffff;
background-color: #2c3e50;
text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.3);
position: absolute;
}
&:nth-child(5) {
left: 296px;
top: 330px;
.type {
background-color: #fff;
color: #2b2b2b;
border-radius: 50%;
padding: 2px;
width: 15px;
height: 15px;
line-height: 16px;
position: absolute;
top: 53px;
left: 38px;
font-size: 12px;
transform: scale(0.8);
}
&:nth-child(6) {
left: 100px;
top: 460px;
.action-command{
left: -22px;
}
.type{
left: -16px;
}
.action-size{
top: -5px;
left: 57px;
padding-right: 15px;
text-align: right;
}
.action-size {
background: rgba(0, 0, 0, 0.3) url("../assets/gold.svg") center left
no-repeat;
background-size: contain;
border-radius: 2px;
padding: 1px 4px 1px 12px;
text-align: center;
min-width: 35px;
color: #fff;
font-weight: 600;
position: absolute;
top: 35px;
left: 40px;
}
}
&:nth-child(1) {
left: 100px;
top: 460px;
.action-command {
left: -22px;
}
&:nth-child(7) {
left: 0;
top: 330px;
.type {
left: -16px;
}
&:nth-child(8) {
left: 0;
top: 210px;
.action-size {
top: -5px;
left: 57px;
padding-right: 15px;
text-align: right;
}
}
&:nth-child(2) {
left: 0;
top: 330px;
}
&:nth-child(3) {
left: 0;
top: 210px;
}
&:nth-child(4) {
left: 0;
top: 100px;
}
&:nth-child(5) {
left: 75px;
top: 0;
}
&:nth-child(6) {
left: 240px;
top: 0;
}
&:nth-child(7) {
left: 296px;
top: 100px;
}
&:nth-child(8) {
left: 296px;
top: 210px;
}
&:nth-child(9) {
left: 296px;
top: 330px;
}
&:nth-child(6),
&:nth-child(7),
&:nth-child(8),
&:nth-child(9) {
.action-command {
left: -22px;
}
&:nth-child(9) {
left: 0;
top: 100px;
.type {
left: -16px;
}
&:nth-child(2),&:nth-child(3),&:nth-child(4),&:nth-child(5){
.action-command{
left: -22px;
}
.type{
left: -16px;
}
.action-size{
background-position: right;
left: -40px;
padding-left: 1px;
padding-right: 17px;
text-align: right;
}
.action-size {
background-position: right;
left: -40px;
padding-left: 1px;
padding-right: 17px;
text-align: right;
}
}
}
}
}
</style>
+73
View File
@@ -0,0 +1,73 @@
export interface ILinkNode<T> {
node: T;
next: ILinkNode<T> | null;
}
// interface ILink<T> {
// getNode(position: number): T;
// setNode(position: number): void;
// removeNode(position: number): void;
export class Link<T> {
public link: ILinkNode<T> = {
node: {} as T,
next: null,
};
constructor(nodes: T[], isCircular: boolean = true) {
let prevNode: ILinkNode<T> = {
node: {} as T,
next: null,
};
nodes.forEach((node, key) => {
const currNode: ILinkNode<T> = {
node,
next: null,
};
// head
if (key === 0) {
this.link = currNode;
} else {
// circular, last node next is first
if (key === nodes.length - 1 && isCircular) {
currNode.next = this.link;
}
prevNode.next = currNode;
}
prevNode = currNode;
});
}
public getNode(position: number) {
let linkNode = this.link;
let i = 0;
while (linkNode.next) {
if (i === position) {
return linkNode;
}
linkNode = linkNode.next;
i++;
}
return linkNode;
}
public setNode(node: T, position: number) {
let linkNode = this.link;
let i = 0;
const currNode: ILinkNode<T> = {
node,
next: null,
};
while (linkNode.next) {
if (i === position) {
currNode.next = linkNode.next;
linkNode.next = currNode;
return;
}
linkNode = linkNode.next;
i++;
}
currNode.next = linkNode.next;
linkNode.next = currNode;
}
}
+1 -1
View File
@@ -2,7 +2,7 @@ import axios, {AxiosRequestConfig, Method} from 'axios';
import cookie from 'js-cookie';
const request = async ({method = 'post' as Method, url = '', body = {}, timeout = 8000}) => {
const origin = 'http://192.168.0.102:7001/node';
const origin = 'http://192.168.0.103:7001/node';
// const origin = 'http://172.22.72.70:7001/node';
if (!url) {
return Promise.reject('Request url is null!');
+1 -1
View File
@@ -210,7 +210,7 @@
const token = cookie.get('token');
const log = console.log;
// const origin = 'http://172.22.72.70:7001';
const origin = 'http://192.168.0.102:7001';
const origin = 'http://192.168.0.103:7001';
this.socket = io(`${origin}/socket`, {
// 使
query: {
+2
View File
@@ -0,0 +1,2 @@
# Default ignored files
/workspace.xml
+66
View File
@@ -0,0 +1,66 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<option name="LINE_SEPARATOR" value="&#13;&#10;" />
<JSCodeStyleSettings version="0">
<option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="ALIGN_OBJECT_PROPERTIES" value="2" />
<option name="USE_DOUBLE_QUOTES" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
<option name="OBJECT_LITERAL_WRAP" value="2" />
<option name="IMPORTS_WRAP" value="0" />
<option name="SPACES_WITHIN_IMPORTS" value="true" />
<option name="CHAINED_CALL_DOT_ON_NEW_LINE" value="false" />
</JSCodeStyleSettings>
<TypeScriptCodeStyleSettings version="0">
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="USE_DOUBLE_QUOTES" value="false" />
<option name="SPACE_WITHIN_TYPE_ASSERTION" value="true" />
</TypeScriptCodeStyleSettings>
<codeStyleSettings language="JavaScript">
<option name="RIGHT_MARGIN" value="80" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
<option name="METHOD_CALL_CHAIN_WRAP" value="5" />
<option name="BINARY_OPERATION_WRAP" value="1" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="true" />
<option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="TypeScript">
<option name="RIGHT_MARGIN" value="80" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
<option name="METHOD_CALL_CHAIN_WRAP" value="5" />
<option name="BINARY_OPERATION_WRAP" value="1" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="true" />
<option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
<option name="IF_BRACE_FORCE" value="1" />
<option name="DOWHILE_BRACE_FORCE" value="1" />
<option name="WHILE_BRACE_FORCE" value="1" />
<option name="FOR_BRACE_FORCE" value="1" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
</component>
+5
View File
@@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>
+6
View File
@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="TsLint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/server.iml" filepath="$PROJECT_DIR$/.idea/server.iml" />
</modules>
</component>
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
+3
View File
@@ -0,0 +1,3 @@
{"pid":78290,"nodeVersion":"v12.16.1","launchTime":"2020-05-07 20:44:05","osUser":"root","osUid":0,"fetchConsumeTime":0,"level":"ERROR","message":"Handshake inactivity timeout","requestTime":"2020-05-07 20:44:05","stack":"Error: Handshake inactivity timeout\n at Handshake.<anonymous> (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Protocol.js:160:17)\n at Handshake.emit (events.js:311:20)\n at Handshake._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/sequences/Sequence.js:124:8)\n at Timer._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Timer.js:32:23)\n at listOnTimeout (internal/timers.js:549:17)\n at processTimers (internal/timers.js:492:7)\n --------------------\n at Protocol._enqueue (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at Protocol.handshake (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Protocol.js:51:23)\n at PoolConnection.connect (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/Connection.js:116:18)\n at Pool.getConnection (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/Pool.js:48:16)\n at /Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:29:7\n at new Promise (<anonymous>)\n at Pool.<anonymous> (/Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:12:10)\n at Pool.ret [as getConnection] (/Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:56:34)\n at Pool.query (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/Pool.js:202:8)\n at /Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:29:7\n sql: select now() as currentTime;","total":null,"requestBody":{},"method":""}
{"pid":78332,"nodeVersion":"v12.16.1","launchTime":"2020-05-07 22:55:00","osUser":"root","osUid":0,"fetchConsumeTime":0,"level":"ERROR","message":"room service tick","requestTime":"2020-05-07 22:55:00","stack":null,"status":"","timestamp":"","total":0,"requestBody":{},"method":"","url":""}
{"pid":78332,"nodeVersion":"v12.16.1","launchTime":"2020-05-07 22:59:00","osUser":"root","osUid":0,"fetchConsumeTime":0,"level":"ERROR","message":"room service tick","requestTime":"2020-05-07 22:59:00","stack":null,"status":"","timestamp":"","total":0,"requestBody":{},"method":"","url":""}
+9
View File
@@ -0,0 +1,9 @@
{"pid":78290,"nodeVersion":"v12.16.1","launchTime":"2020-05-07 20:44:05","osUser":"root","osUid":0,"fetchConsumeTime":0,"level":"ERROR","message":"Handshake inactivity timeout","requestTime":"2020-05-07 20:44:05","stack":"Error: Handshake inactivity timeout\n at Handshake.<anonymous> (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Protocol.js:160:17)\n at Handshake.emit (events.js:311:20)\n at Handshake._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/sequences/Sequence.js:124:8)\n at Timer._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Timer.js:32:23)\n at listOnTimeout (internal/timers.js:549:17)\n at processTimers (internal/timers.js:492:7)\n --------------------\n at Protocol._enqueue (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at Protocol.handshake (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Protocol.js:51:23)\n at PoolConnection.connect (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/Connection.js:116:18)\n at Pool.getConnection (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/Pool.js:48:16)\n at /Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:29:7\n at new Promise (<anonymous>)\n at Pool.<anonymous> (/Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:12:10)\n at Pool.ret [as getConnection] (/Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:56:34)\n at Pool.query (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/Pool.js:202:8)\n at /Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:29:7\n sql: select now() as currentTime;","total":null,"requestBody":{},"method":""}
{"pid":78332,"nodeVersion":"v12.16.1","launchTime":"2020-05-07 20:45:22","osUser":"root","osUid":0,"fetchConsumeTime":0,"level":"INFO","message":"AccountService getToken token--eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7Im5pY2tOYW1lIjoiYyIsImFjY291bnQiOiJjYWkiLCJ1c2VySWQiOjF9LCJpYXQiOjE1ODg4NTU1MjIsImV4cCI6MTU4ODg3NzEyMn0.cr3MhjjEwzyQolAeuWu2nDwdNgfJMi0UdTkAJ69y-nk","requestTime":"2020-05-07 20:45:22","stack":"","status":"","timestamp":"","total":0,"requestBody":{},"method":"","url":""}
{"pid":78332,"nodeVersion":"v12.16.1","launchTime":"2020-05-07 20:45:22","osUser":"root","osUid":0,"fetchConsumeTime":194,"level":"INFO","message":"POST /node/user/login info","requestTime":"2020-05-07 20:45:22","status":200,"total":null,"requestBody":{"userAccount":"cai","password":"123"},"url":"/node/user/login"}
{"pid":78332,"nodeVersion":"v12.16.1","launchTime":"2020-05-07 20:45:24","osUser":"root","osUid":0,"fetchConsumeTime":96,"level":"INFO","message":"POST /node/game/room info","requestTime":"2020-05-07 20:45:24","status":200,"total":null,"requestBody":{},"url":"/node/game/room"}
{"pid":78332,"nodeVersion":"v12.16.1","launchTime":"2020-05-07 22:55:00","osUser":"root","osUid":0,"fetchConsumeTime":0,"level":"ERROR","message":"room service tick","requestTime":"2020-05-07 22:55:00","stack":null,"status":"","timestamp":"","total":0,"requestBody":{},"method":"","url":""}
{"pid":78332,"nodeVersion":"v12.16.1","launchTime":"2020-05-07 22:59:00","osUser":"root","osUid":0,"fetchConsumeTime":0,"level":"ERROR","message":"room service tick","requestTime":"2020-05-07 22:59:00","stack":null,"status":"","timestamp":"","total":0,"requestBody":{},"method":"","url":""}
{"pid":79897,"nodeVersion":"v12.16.1","launchTime":"2020-05-07 23:30:05","osUser":"root","osUid":0,"fetchConsumeTime":0,"level":"INFO","message":"AccountService getToken token--eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7Im5pY2tOYW1lIjoiYyIsImFjY291bnQiOiJjYWkiLCJ1c2VySWQiOjF9LCJpYXQiOjE1ODg4NjU0MDUsImV4cCI6MTU4ODg4NzAwNX0.EBGmwOyAYl5EeXsFU2TOOslSYQ8BVmDntMDDt5tE36A","requestTime":"2020-05-07 23:30:05","stack":"","status":"","timestamp":"","total":0,"requestBody":{},"method":"","url":""}
{"pid":79897,"nodeVersion":"v12.16.1","launchTime":"2020-05-07 23:30:05","osUser":"root","osUid":0,"fetchConsumeTime":194,"level":"INFO","message":"POST /node/user/login info","requestTime":"2020-05-07 23:30:05","status":200,"total":null,"requestBody":{"userAccount":"cai","password":"123"},"url":"/node/user/login"}
{"pid":79897,"nodeVersion":"v12.16.1","launchTime":"2020-05-07 23:30:06","osUser":"root","osUid":0,"fetchConsumeTime":98,"level":"INFO","message":"POST /node/game/room info","requestTime":"2020-05-07 23:30:06","status":200,"total":null,"requestBody":{},"url":"/node/game/room"}
+68
View File
@@ -1 +1,69 @@
2020-05-07 00:00:01,116 INFO 76335 [egg-logrotator] agent logger reload: got log-reload message
2020-05-07 20:43:54,098 INFO 78289 [egg:logger] init all loggers with options: {"dir":"/Users/jorky/code/TexasPokerGame/server/logs/game-node-center","encoding":"utf8","env":"local","level":"INFO","consoleLevel":"INFO","disableConsoleAfterReady":false,"outputJSON":false,"buffer":true,"appLogName":"app.log","coreLogName":"core.log","agentLogName":"agent.log","errorLogName":"error.log","coreLogger":{"consoleLevel":"WARN"},"allowDebugAtProd":false,"type":"agent"}
2020-05-07 20:43:54,107 INFO 78289 [egg:core] dump config after load, 5ms
2020-05-07 20:43:54,161 INFO 78289 [egg-watcher] Start watching: ["/Users/jorky/code/TexasPokerGame/server/src/app","/Users/jorky/code/TexasPokerGame/server/src/lib","/Users/jorky/code/TexasPokerGame/server/src/service","/Users/jorky/code/TexasPokerGame/server/src/config","/Users/jorky/code/TexasPokerGame/server/src/app.ts","/Users/jorky/code/TexasPokerGame/server/src/agent.ts","/Users/jorky/code/TexasPokerGame/server/src/interface.ts"]
2020-05-07 20:43:54,161 INFO 78289 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/app"
2020-05-07 20:43:54,162 INFO 78289 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/lib"
2020-05-07 20:43:54,162 INFO 78289 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/service"
2020-05-07 20:43:54,162 INFO 78289 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/config"
2020-05-07 20:43:54,162 INFO 78289 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/app.ts"
2020-05-07 20:43:54,163 INFO 78289 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/agent.ts"
2020-05-07 20:43:54,163 INFO 78289 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/interface.ts"
2020-05-07 20:43:54,164 INFO 78289 [egg-watcher:agent] watcher start success
2020-05-07 20:43:54,174 INFO 78289 [egg:core] dump config after ready, 4ms
2020-05-07 20:44:22,115 INFO 78331 [egg:logger] init all loggers with options: {"dir":"/Users/jorky/code/TexasPokerGame/server/logs/game-node-center","encoding":"utf8","env":"local","level":"INFO","consoleLevel":"INFO","disableConsoleAfterReady":false,"outputJSON":false,"buffer":true,"appLogName":"app.log","coreLogName":"core.log","agentLogName":"agent.log","errorLogName":"error.log","coreLogger":{"consoleLevel":"WARN"},"allowDebugAtProd":false,"type":"agent"}
2020-05-07 20:44:22,123 INFO 78331 [egg:core] dump config after load, 5ms
2020-05-07 20:44:22,168 INFO 78331 [egg-watcher] Start watching: ["/Users/jorky/code/TexasPokerGame/server/src/app","/Users/jorky/code/TexasPokerGame/server/src/lib","/Users/jorky/code/TexasPokerGame/server/src/service","/Users/jorky/code/TexasPokerGame/server/src/config","/Users/jorky/code/TexasPokerGame/server/src/app.ts","/Users/jorky/code/TexasPokerGame/server/src/agent.ts","/Users/jorky/code/TexasPokerGame/server/src/interface.ts"]
2020-05-07 20:44:22,168 INFO 78331 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/app"
2020-05-07 20:44:22,168 INFO 78331 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/lib"
2020-05-07 20:44:22,169 INFO 78331 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/service"
2020-05-07 20:44:22,169 INFO 78331 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/config"
2020-05-07 20:44:22,169 INFO 78331 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/app.ts"
2020-05-07 20:44:22,169 INFO 78331 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/agent.ts"
2020-05-07 20:44:22,169 INFO 78331 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/interface.ts"
2020-05-07 20:44:22,169 INFO 78331 [egg-watcher:agent] watcher start success
2020-05-07 20:44:22,180 INFO 78331 [egg:core] dump config after ready, 5ms
2020-05-07 22:26:21,860 ERROR 78331 nodejs.ClusterClientNoResponseError: client no response in 5998454ms exceeding maxIdleTime 60000ms, maybe the connection is close on other side.
at Timeout._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/cluster-client/lib/leader.js:77:23)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
name: "ClusterClientNoResponseError"
pid: 78331
hostname: 192.168.0.103
2020-05-07 22:54:10,569 ERROR 78331 nodejs.ClusterClientNoResponseError: client no response in 1648698ms exceeding maxIdleTime 60000ms, maybe the connection is close on other side.
at Timeout._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/cluster-client/lib/leader.js:77:23)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
name: "ClusterClientNoResponseError"
pid: 78331
hostname: 192.168.0.103
2020-05-07 23:29:38,876 INFO 79896 [egg:logger] init all loggers with options: {"dir":"/Users/jorky/code/TexasPokerGame/server/logs/game-node-center","encoding":"utf8","env":"local","level":"INFO","consoleLevel":"INFO","disableConsoleAfterReady":false,"outputJSON":false,"buffer":true,"appLogName":"app.log","coreLogName":"core.log","agentLogName":"agent.log","errorLogName":"error.log","coreLogger":{"consoleLevel":"WARN"},"allowDebugAtProd":false,"type":"agent"}
2020-05-07 23:29:38,885 INFO 79896 [egg:core] dump config after load, 6ms
2020-05-07 23:29:38,935 INFO 79896 [egg-watcher] Start watching: ["/Users/jorky/code/TexasPokerGame/server/src/app","/Users/jorky/code/TexasPokerGame/server/src/lib","/Users/jorky/code/TexasPokerGame/server/src/service","/Users/jorky/code/TexasPokerGame/server/src/config","/Users/jorky/code/TexasPokerGame/server/src/app.ts","/Users/jorky/code/TexasPokerGame/server/src/agent.ts","/Users/jorky/code/TexasPokerGame/server/src/interface.ts"]
2020-05-07 23:29:38,935 INFO 79896 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/app"
2020-05-07 23:29:38,936 INFO 79896 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/lib"
2020-05-07 23:29:38,936 INFO 79896 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/service"
2020-05-07 23:29:38,936 INFO 79896 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/config"
2020-05-07 23:29:38,936 INFO 79896 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/app.ts"
2020-05-07 23:29:38,937 INFO 79896 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/agent.ts"
2020-05-07 23:29:38,937 INFO 79896 [egg-watcher] Start watching: "/Users/jorky/code/TexasPokerGame/server/src/interface.ts"
2020-05-07 23:29:38,937 INFO 79896 [egg-watcher:agent] watcher start success
2020-05-07 23:29:38,947 INFO 79896 [egg:core] dump config after ready, 4ms
2020-05-08 00:32:38,101 ERROR 79896 nodejs.ClusterClientNoResponseError: client no response in 3617608ms exceeding maxIdleTime 60000ms, maybe the connection is close on other side.
at Timeout._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/cluster-client/lib/leader.js:77:23)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
name: "ClusterClientNoResponseError"
pid: 79896
hostname: 192.168.0.103
2020-05-08 00:59:21,668 ERROR 79896 nodejs.ClusterClientNoResponseError: client no response in 1603526ms exceeding maxIdleTime 60000ms, maybe the connection is close on other side.
at Timeout._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/cluster-client/lib/leader.js:77:23)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
name: "ClusterClientNoResponseError"
pid: 79896
hostname: 192.168.0.103
+66
View File
@@ -0,0 +1,66 @@
2020-05-07 20:44:05,344 ERROR 78290 [-/127.0.0.1/-/0ms GET /] nodejs.PROTOCOL_SEQUENCE_TIMEOUTError: Handshake inactivity timeout
at Handshake.<anonymous> (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Protocol.js:160:17)
at Handshake.emit (events.js:311:20)
at Handshake._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/sequences/Sequence.js:124:8)
at Timer._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Timer.js:32:23)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
--------------------
at Protocol._enqueue (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at PoolConnection.connect (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/Connection.js:116:18)
at Pool.getConnection (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/Pool.js:48:16)
at /Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:29:7
at new Promise (<anonymous>)
at Pool.<anonymous> (/Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:12:10)
at Pool.ret [as getConnection] (/Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:56:34)
at Pool.query (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/Pool.js:202:8)
at /Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:29:7
sql: select now() as currentTime;
code: "PROTOCOL_SEQUENCE_TIMEOUT"
fatal: true
timeout: 10000
name: "PROTOCOL_SEQUENCE_TIMEOUTError"
pid: 78290
hostname: 192.168.0.103
2020-05-07 20:45:22,155 INFO 78332 [-/192.168.0.103/-/210ms POST /node/user/login] AccountService getToken token--eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7Im5pY2tOYW1lIjoiYyIsImFjY291bnQiOiJjYWkiLCJ1c2VySWQiOjF9LCJpYXQiOjE1ODg4NTU1MjIsImV4cCI6MTU4ODg3NzEyMn0.cr3MhjjEwzyQolAeuWu2nDwdNgfJMi0UdTkAJ69y-nk
2020-05-07 20:45:22,158 INFO 78332 [-/192.168.0.103/-/214ms POST /node/user/login] {
fetchStart: 1588855521964,
url: '/node/user/login',
requestBody: { userAccount: 'cai', password: '123' },
message: 'POST /node/user/login info',
level: 'INFO',
status: 200,
fetchEnd: 1588855522158
}
2020-05-07 20:45:24,696 INFO 78332 [-/192.168.0.103/-/98ms POST /node/game/room] {
fetchStart: 1588855524600,
url: '/node/game/room',
requestBody: {},
message: 'POST /node/game/room info',
level: 'INFO',
status: 200,
fetchEnd: 1588855524696
}
2020-05-07 22:55:00,510 ERROR 78332 [-/192.168.0.103/-/7ms GET /socket.io/?room=993810&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7Im5pY2tOYW1lIjoiYyIsImFjY291bnQiOiJjYWkiLCJ1c2VySWQiOjF9LCJpYXQiOjE1ODg4NTU1MjIsImV4cCI6MTU4ODg3NzEyMn0.cr3MhjjEwzyQolAeuWu2nDwdNgfJMi0UdTkAJ69y-nk&EIO=3&transport=websocket] room service tick null
2020-05-07 22:59:00,651 ERROR 78332 [-/192.168.0.103/-/5ms GET /socket.io/?room=993810&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7Im5pY2tOYW1lIjoiYyIsImFjY291bnQiOiJjYWkiLCJ1c2VySWQiOjF9LCJpYXQiOjE1ODg4NTU1MjIsImV4cCI6MTU4ODg3NzEyMn0.cr3MhjjEwzyQolAeuWu2nDwdNgfJMi0UdTkAJ69y-nk&EIO=3&transport=websocket] room service tick null
2020-05-07 23:30:05,956 INFO 79897 [-/192.168.0.103/-/206ms POST /node/user/login] AccountService getToken token--eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7Im5pY2tOYW1lIjoiYyIsImFjY291bnQiOiJjYWkiLCJ1c2VySWQiOjF9LCJpYXQiOjE1ODg4NjU0MDUsImV4cCI6MTU4ODg4NzAwNX0.EBGmwOyAYl5EeXsFU2TOOslSYQ8BVmDntMDDt5tE36A
2020-05-07 23:30:05,960 INFO 79897 [-/192.168.0.103/-/210ms POST /node/user/login] {
fetchStart: 1588865405766,
url: '/node/user/login',
requestBody: { userAccount: 'cai', password: '123' },
message: 'POST /node/user/login info',
level: 'INFO',
status: 200,
fetchEnd: 1588865405960
}
2020-05-07 23:30:06,916 INFO 79897 [-/192.168.0.103/-/100ms POST /node/game/room] {
fetchStart: 1588865406818,
url: '/node/game/room',
requestBody: {},
message: 'POST /node/game/room info',
level: 'INFO',
status: 200,
fetchEnd: 1588865406916
}
+55
View File
@@ -1 +1,56 @@
2020-05-07 00:00:01,115 INFO 76336 [egg-logrotator] app logger reload: got log-reload message
2020-05-07 20:43:55,090 INFO 78290 [egg:logger] init all loggers with options: {"dir":"/Users/jorky/code/TexasPokerGame/server/logs/game-node-center","encoding":"utf8","env":"local","level":"INFO","consoleLevel":"INFO","disableConsoleAfterReady":false,"outputJSON":false,"buffer":true,"appLogName":"app.log","coreLogName":"core.log","agentLogName":"agent.log","errorLogName":"error.log","coreLogger":{"consoleLevel":"WARN"},"allowDebugAtProd":false,"type":"application"}
2020-05-07 20:43:55,116 INFO 78290 [egg-multipart] stream mode enable
2020-05-07 20:43:55,165 INFO 78290 [egg-redis] server connecting redis://:***@127.0.0.1:6379/0
2020-05-07 20:43:55,184 INFO 78290 [egg-mysql] connecting root@47.104.172.100:3306/poker
2020-05-07 20:43:55,317 INFO 78290 [egg-static] starting static serve /public/ -> /Users/jorky/code/TexasPokerGame/server/src/app/public
2020-05-07 20:43:55,319 INFO 78290 [egg-security] use noopen middleware
2020-05-07 20:43:55,320 INFO 78290 [egg-security] use nosniff middleware
2020-05-07 20:43:55,321 INFO 78290 [egg-security] use xssProtection middleware
2020-05-07 20:43:55,321 INFO 78290 [egg-security] use xframe middleware
2020-05-07 20:43:55,322 INFO 78290 [egg-security] use dta middleware
2020-05-07 20:43:55,322 INFO 78290 [egg-security] compose 5 middlewares into one security middleware
2020-05-07 20:43:55,330 INFO 78290 [egg:core] dump config after load, 6ms
2020-05-07 20:43:55,342 INFO 78290 [egg-redis] client connect success
2020-05-07 20:43:55,347 INFO 78290 [egg-redis] instance[0] status OK, client ready
2020-05-07 20:43:55,349 INFO 78290 [egg-watcher:application] watcher start success
2020-05-07 20:44:05,361 INFO 78290 [egg:core] dump config after ready, 6ms
2020-05-07 20:44:23,110 INFO 78332 [egg:logger] init all loggers with options: {"dir":"/Users/jorky/code/TexasPokerGame/server/logs/game-node-center","encoding":"utf8","env":"local","level":"INFO","consoleLevel":"INFO","disableConsoleAfterReady":false,"outputJSON":false,"buffer":true,"appLogName":"app.log","coreLogName":"core.log","agentLogName":"agent.log","errorLogName":"error.log","coreLogger":{"consoleLevel":"WARN"},"allowDebugAtProd":false,"type":"application"}
2020-05-07 20:44:23,132 INFO 78332 [egg-multipart] stream mode enable
2020-05-07 20:44:23,185 INFO 78332 [egg-redis] server connecting redis://:***@127.0.0.1:6379/0
2020-05-07 20:44:23,202 INFO 78332 [egg-mysql] connecting root@47.104.172.100:3306/poker
2020-05-07 20:44:23,359 INFO 78332 [egg-static] starting static serve /public/ -> /Users/jorky/code/TexasPokerGame/server/src/app/public
2020-05-07 20:44:23,362 INFO 78332 [egg-security] use noopen middleware
2020-05-07 20:44:23,363 INFO 78332 [egg-security] use nosniff middleware
2020-05-07 20:44:23,364 INFO 78332 [egg-security] use xssProtection middleware
2020-05-07 20:44:23,365 INFO 78332 [egg-security] use xframe middleware
2020-05-07 20:44:23,366 INFO 78332 [egg-security] use dta middleware
2020-05-07 20:44:23,366 INFO 78332 [egg-security] compose 5 middlewares into one security middleware
2020-05-07 20:44:23,374 INFO 78332 [egg:core] dump config after load, 5ms
2020-05-07 20:44:23,386 INFO 78332 [egg-redis] client connect success
2020-05-07 20:44:23,391 INFO 78332 [egg-redis] instance[0] status OK, client ready
2020-05-07 20:44:23,393 INFO 78332 [egg-watcher:application] watcher start success
2020-05-07 20:44:23,582 INFO 78332 [egg-mysql] instance[0] status OK, rds currentTime: Thu May 07 2020 20:44:23 GMT+0800 (China Standard Time)
2020-05-07 20:44:23,617 INFO 78332 [egg:core] dump config after ready, 7ms
2020-05-07 22:26:21,853 WARN 78332 [ClusterClient:Watcher] follower closed, and try to init it again
2020-05-07 22:54:10,568 WARN 78332 [ClusterClient:Watcher] follower closed, and try to init it again
2020-05-07 23:29:40,050 INFO 79897 [egg:logger] init all loggers with options: {"dir":"/Users/jorky/code/TexasPokerGame/server/logs/game-node-center","encoding":"utf8","env":"local","level":"INFO","consoleLevel":"INFO","disableConsoleAfterReady":false,"outputJSON":false,"buffer":true,"appLogName":"app.log","coreLogName":"core.log","agentLogName":"agent.log","errorLogName":"error.log","coreLogger":{"consoleLevel":"WARN"},"allowDebugAtProd":false,"type":"application"}
2020-05-07 23:29:40,072 INFO 79897 [egg-multipart] stream mode enable
2020-05-07 23:29:40,139 INFO 79897 [egg-redis] server connecting redis://:***@127.0.0.1:6379/0
2020-05-07 23:29:40,156 INFO 79897 [egg-mysql] connecting root@47.104.172.100:3306/poker
2020-05-07 23:29:40,356 INFO 79897 [egg-static] starting static serve /public/ -> /Users/jorky/code/TexasPokerGame/server/src/app/public
2020-05-07 23:29:40,358 INFO 79897 [egg-security] use noopen middleware
2020-05-07 23:29:40,359 INFO 79897 [egg-security] use nosniff middleware
2020-05-07 23:29:40,360 INFO 79897 [egg-security] use xssProtection middleware
2020-05-07 23:29:40,361 INFO 79897 [egg-security] use xframe middleware
2020-05-07 23:29:40,363 INFO 79897 [egg-security] use dta middleware
2020-05-07 23:29:40,363 INFO 79897 [egg-security] compose 5 middlewares into one security middleware
2020-05-07 23:29:40,371 INFO 79897 [egg:core] dump config after load, 6ms
2020-05-07 23:29:40,383 INFO 79897 [egg-redis] client connect success
2020-05-07 23:29:40,387 INFO 79897 [egg-redis] instance[0] status OK, client ready
2020-05-07 23:29:40,389 INFO 79897 [egg-watcher:application] watcher start success
2020-05-07 23:29:40,572 INFO 79897 [egg-mysql] instance[0] status OK, rds currentTime: Thu May 07 2020 23:29:40 GMT+0800 (China Standard Time)
2020-05-07 23:29:40,608 INFO 79897 [egg:core] dump config after ready, 8ms
2020-05-08 00:32:38,038 WARN 79897 [ClusterClient:Watcher] follower closed, and try to init it again
2020-05-08 00:59:22,017 WARN 79897 [TCPBase] socket is closed by other side while there were still unhandled data in the socket buffer
2020-05-08 00:59:22,018 WARN 79897 [ClusterClient:Watcher] follower closed, and try to init it again
@@ -0,0 +1,15 @@
2020-05-07 20:43:55,115 INFO 78290 [egg-schedule]: register schedule /Users/jorky/code/TexasPokerGame/server/node_modules/egg-multipart/app/schedule/clean_tmpdir.js
2020-05-07 20:43:55,115 INFO 78290 [egg-schedule]: register schedule /Users/jorky/code/TexasPokerGame/server/node_modules/egg-logrotator/app/schedule/clean_log.js
2020-05-07 20:43:55,115 INFO 78290 [egg-schedule]: register schedule /Users/jorky/code/TexasPokerGame/server/node_modules/egg-logrotator/app/schedule/rotate_by_file.js
2020-05-07 20:44:23,131 INFO 78332 [egg-schedule]: register schedule /Users/jorky/code/TexasPokerGame/server/node_modules/egg-multipart/app/schedule/clean_tmpdir.js
2020-05-07 20:44:23,131 INFO 78332 [egg-schedule]: register schedule /Users/jorky/code/TexasPokerGame/server/node_modules/egg-logrotator/app/schedule/clean_log.js
2020-05-07 20:44:23,131 INFO 78332 [egg-schedule]: register schedule /Users/jorky/code/TexasPokerGame/server/node_modules/egg-logrotator/app/schedule/rotate_by_file.js
2020-05-07 20:44:23,623 INFO 78331 [Timer] /Users/jorky/code/TexasPokerGame/server/node_modules/egg-multipart/app/schedule/clean_tmpdir.js next time will execute after 27936379ms at 2020-05-08 04:30:00.002
2020-05-07 20:44:23,623 INFO 78331 [Timer] /Users/jorky/code/TexasPokerGame/server/node_modules/egg-logrotator/app/schedule/clean_log.js next time will execute after 11736377ms at 2020-05-08 00:00:00.000
2020-05-07 20:44:23,624 INFO 78331 [Timer] /Users/jorky/code/TexasPokerGame/server/node_modules/egg-logrotator/app/schedule/rotate_by_file.js next time will execute after 11737377ms at 2020-05-08 00:00:01.001
2020-05-07 23:29:40,613 INFO 79896 [Timer] /Users/jorky/code/TexasPokerGame/server/node_modules/egg-multipart/app/schedule/clean_tmpdir.js next time will execute after 18019390ms at 2020-05-08 04:30:00.003
2020-05-07 23:29:40,613 INFO 79896 [Timer] /Users/jorky/code/TexasPokerGame/server/node_modules/egg-logrotator/app/schedule/clean_log.js next time will execute after 1819387ms at 2020-05-08 00:00:00.000
2020-05-07 23:29:40,613 INFO 79896 [Timer] /Users/jorky/code/TexasPokerGame/server/node_modules/egg-logrotator/app/schedule/rotate_by_file.js next time will execute after 1820387ms at 2020-05-08 00:00:01.000
2020-05-07 23:29:40,072 INFO 79897 [egg-schedule]: register schedule /Users/jorky/code/TexasPokerGame/server/node_modules/egg-multipart/app/schedule/clean_tmpdir.js
2020-05-07 23:29:40,072 INFO 79897 [egg-schedule]: register schedule /Users/jorky/code/TexasPokerGame/server/node_modules/egg-logrotator/app/schedule/clean_log.js
2020-05-07 23:29:40,072 INFO 79897 [egg-schedule]: register schedule /Users/jorky/code/TexasPokerGame/server/node_modules/egg-logrotator/app/schedule/rotate_by_file.js
+60
View File
@@ -0,0 +1,60 @@
2020-05-07 20:44:05,344 ERROR 78290 [-/127.0.0.1/-/0ms GET /] nodejs.PROTOCOL_SEQUENCE_TIMEOUTError: Handshake inactivity timeout
at Handshake.<anonymous> (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Protocol.js:160:17)
at Handshake.emit (events.js:311:20)
at Handshake._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/sequences/Sequence.js:124:8)
at Timer._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Timer.js:32:23)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
--------------------
at Protocol._enqueue (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at PoolConnection.connect (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/Connection.js:116:18)
at Pool.getConnection (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/Pool.js:48:16)
at /Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:29:7
at new Promise (<anonymous>)
at Pool.<anonymous> (/Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:12:10)
at Pool.ret [as getConnection] (/Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:56:34)
at Pool.query (/Users/jorky/code/TexasPokerGame/server/node_modules/mysql/lib/Pool.js:202:8)
at /Users/jorky/code/TexasPokerGame/server/node_modules/ali-rds/node_modules/pify/index.js:29:7
sql: select now() as currentTime;
code: "PROTOCOL_SEQUENCE_TIMEOUT"
fatal: true
timeout: 10000
name: "PROTOCOL_SEQUENCE_TIMEOUTError"
pid: 78290
hostname: 192.168.0.103
2020-05-07 22:26:21,859 ERROR 78331 nodejs.ClusterClientNoResponseError: client no response in 5998454ms exceeding maxIdleTime 60000ms, maybe the connection is close on other side.
at Timeout._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/cluster-client/lib/leader.js:77:23)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
name: "ClusterClientNoResponseError"
pid: 78331
hostname: 192.168.0.103
2020-05-07 22:54:10,568 ERROR 78331 nodejs.ClusterClientNoResponseError: client no response in 1648698ms exceeding maxIdleTime 60000ms, maybe the connection is close on other side.
at Timeout._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/cluster-client/lib/leader.js:77:23)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
name: "ClusterClientNoResponseError"
pid: 78331
hostname: 192.168.0.103
2020-05-07 22:55:00,510 ERROR 78332 [-/192.168.0.103/-/7ms GET /socket.io/?room=993810&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7Im5pY2tOYW1lIjoiYyIsImFjY291bnQiOiJjYWkiLCJ1c2VySWQiOjF9LCJpYXQiOjE1ODg4NTU1MjIsImV4cCI6MTU4ODg3NzEyMn0.cr3MhjjEwzyQolAeuWu2nDwdNgfJMi0UdTkAJ69y-nk&EIO=3&transport=websocket] room service tick null
2020-05-07 22:59:00,651 ERROR 78332 [-/192.168.0.103/-/5ms GET /socket.io/?room=993810&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7Im5pY2tOYW1lIjoiYyIsImFjY291bnQiOiJjYWkiLCJ1c2VySWQiOjF9LCJpYXQiOjE1ODg4NTU1MjIsImV4cCI6MTU4ODg3NzEyMn0.cr3MhjjEwzyQolAeuWu2nDwdNgfJMi0UdTkAJ69y-nk&EIO=3&transport=websocket] room service tick null
2020-05-08 00:32:38,097 ERROR 79896 nodejs.ClusterClientNoResponseError: client no response in 3617608ms exceeding maxIdleTime 60000ms, maybe the connection is close on other side.
at Timeout._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/cluster-client/lib/leader.js:77:23)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
name: "ClusterClientNoResponseError"
pid: 79896
hostname: 192.168.0.103
2020-05-08 00:59:21,663 ERROR 79896 nodejs.ClusterClientNoResponseError: client no response in 1603526ms exceeding maxIdleTime 60000ms, maybe the connection is close on other side.
at Timeout._onTimeout (/Users/jorky/code/TexasPokerGame/server/node_modules/cluster-client/lib/leader.js:77:23)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
name: "ClusterClientNoResponseError"
pid: 79896
hostname: 192.168.0.103