質問編集履歴

2

.confの内容を修正しました。 mongodb.logを追記しました

2019/07/25 00:37

投稿

kobaya
kobaya

スコア14

test CHANGED
File without changes
test CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
 
21
- ##/etc/mongodb.confの内容
21
+ ```mongodb.conf
22
22
 
23
23
  $ cat /etc/mongodb.conf
24
24
 
@@ -42,7 +42,7 @@
42
42
 
43
43
 
44
44
 
45
- bind_ip = 127.0.0.1,192.168.188.201
45
+ bind_ip = 127.0.0.1,192.168.100.100
46
46
 
47
47
  port = 27017
48
48
 
@@ -224,9 +224,13 @@
224
224
 
225
225
 
226
226
 
227
+ ```
228
+
229
+
230
+
231
+
232
+
227
- ##mongoDB起動時のメッセージ
233
+ ```mongoDB起動時のメッセージ
228
-
229
-
230
234
 
231
235
  $ mongo
232
236
 
@@ -243,3 +247,39 @@
243
247
  @(connect):1:6
244
248
 
245
249
  exception: connect failed
250
+
251
+ ```
252
+
253
+
254
+
255
+ ```/var/log/mongodb/mongodb.log
256
+
257
+ 2019-07-25T09:15:44.551+0900 I CONTROL [main] ***** SERVER RESTARTED *****
258
+
259
+ 2019-07-25T09:15:44.558+0900 I CONTROL [initandlisten] MongoDB starting : pid=2523 port=27017 dbpath=/data/db 64-bit host=ubuntuDB
260
+
261
+ 2019-07-25T09:15:44.558+0900 I CONTROL [initandlisten] db version v3.6.3
262
+
263
+ 2019-07-25T09:15:44.558+0900 I CONTROL [initandlisten] git version: 9586e557d54ef70f9ca4b43c26892cd55257e1a5
264
+
265
+ 2019-07-25T09:15:44.558+0900 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.1.0g 2 Nov 2017
266
+
267
+ 2019-07-25T09:15:44.558+0900 I CONTROL [initandlisten] allocator: tcmalloc
268
+
269
+ 2019-07-25T09:15:44.558+0900 I CONTROL [initandlisten] modules: none
270
+
271
+ 2019-07-25T09:15:44.558+0900 I CONTROL [initandlisten] build environment:
272
+
273
+ 2019-07-25T09:15:44.558+0900 I CONTROL [initandlisten] distarch: x86_64
274
+
275
+ 2019-07-25T09:15:44.558+0900 I CONTROL [initandlisten] target_arch: x86_64
276
+
277
+ 2019-07-25T09:15:44.558+0900 I CONTROL [initandlisten] options: { config: "/etc/mongodb.conf", net: { bindIp: "127.0.0.1,192.168.100.100", port: 27017 }, storage: { dbPath: "/data/db", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongodb.log" } }
278
+
279
+ 2019-07-25T09:15:44.587+0900 E STORAGE [initandlisten] Failed to set up listener: SocketException: Cannot assign requested address
280
+
281
+ 2019-07-25T09:15:44.587+0900 I CONTROL [initandlisten] now exiting
282
+
283
+ 2019-07-25T09:15:44.587+0900 I CONTROL [initandlisten] shutting down with code:48
284
+
285
+ ```

1

.confを追記しました

2019/07/25 00:37

投稿

kobaya
kobaya

スコア14

test CHANGED
File without changes
test CHANGED
@@ -20,13 +20,207 @@
20
20
 
21
21
  ##/etc/mongodb.confの内容
22
22
 
23
-
23
+ $ cat /etc/mongodb.conf
24
-
25
-
26
-
27
-
28
-
24
+
29
- ##mongod起動時のメッセージ
25
+ \# mongodb.conf
26
+
27
+
28
+
29
+ \# Where to store the data.
30
+
31
+ dbpath=/data/db
32
+
33
+
34
+
35
+ \#where to log
36
+
37
+ logpath=/var/log/mongodb/mongodb.log
38
+
39
+
40
+
41
+ logappend=true
42
+
43
+
44
+
45
+ bind_ip = 127.0.0.1,192.168.188.201
46
+
47
+ port = 27017
48
+
49
+
50
+
51
+ \# Enable journaling, http://www.mongodb.org/display/DOCS/Journaling
52
+
53
+ journal=true
54
+
55
+
56
+
57
+ \# Enables periodic logging of CPU utilization and I/O wait
58
+
59
+ \#cpu = true
60
+
61
+
62
+
63
+ \# Turn on/off security. Off is currently the default
64
+
65
+ \#noauth = true
66
+
67
+ \#auth = true
68
+
69
+
70
+
71
+ \# Verbose logging output.
72
+
73
+ \#verbose = true
74
+
75
+
76
+
77
+ \# Inspect all client data for validity on receipt (useful for
78
+
79
+ \# developing drivers)
80
+
81
+ \#objcheck = true
82
+
83
+
84
+
85
+ \# Enable db quota management
86
+
87
+ \#quota = true
88
+
89
+
90
+
91
+ \# Set diagnostic logging level where n is
92
+
93
+ \# 0=off (default)
94
+
95
+ \# 1=W
96
+
97
+ \# 2=R
98
+
99
+ \# 3=both
100
+
101
+ \# 7=W+some reads
102
+
103
+ \#diaglog = 0
104
+
105
+
106
+
107
+ \# Diagnostic/debugging option
108
+
109
+ \#nocursors = true
110
+
111
+
112
+
113
+ \# Ignore query hints
114
+
115
+ \#nohints = true
116
+
117
+
118
+
119
+ \# Disable the HTTP interface (Defaults to localhost:27018).
120
+
121
+ \#nohttpinterface = true
122
+
123
+
124
+
125
+ \# Turns off server-side scripting. This will result in greatly limited
126
+
127
+ \# functionality
128
+
129
+ \#noscripting = true
130
+
131
+
132
+
133
+ \# Turns off table scans. Any query that would do a table scan fails.
134
+
135
+ \#notablescan = true
136
+
137
+
138
+
139
+ \# Disable data file preallocation.
140
+
141
+ \#noprealloc = true
142
+
143
+
144
+
145
+ \# Specify .ns file size for new databases.
146
+
147
+ \# nssize = <size>
148
+
149
+
150
+
151
+ \# Accout token for Mongo monitoring server.
152
+
153
+ \#mms-token = <token>
154
+
155
+
156
+
157
+ \# Server name for Mongo monitoring server.
158
+
159
+ \#mms-name = <server-name>
160
+
161
+
162
+
163
+ \# Ping interval for Mongo monitoring server.
164
+
165
+ \#mms-interval = <seconds>
166
+
167
+
168
+
169
+ \# Replication Options
170
+
171
+
172
+
173
+ \# in replicated mongo databases, specify here whether this is a slave or master
174
+
175
+ \#slave = true
176
+
177
+ \#source = master.example.com
178
+
179
+ \# Slave only: specify a single database to replicate
180
+
181
+ \#only = master.example.com
182
+
183
+ \# or
184
+
185
+ \#master = true
186
+
187
+ \#source = slave.example.com
188
+
189
+
190
+
191
+ \# Address of a server to pair with.
192
+
193
+ \#pairwith = <server:port>
194
+
195
+ \# Address of arbiter server.
196
+
197
+ \#arbiter = <server:port>
198
+
199
+ \# Automatically resync if slave data is stale
200
+
201
+ \#autoresync
202
+
203
+ \# Custom size for replication operation log.
204
+
205
+ \#oplogSize = <MB>
206
+
207
+ \# Size limit for in-memory storage of op ids.
208
+
209
+ \#opIdMem = <bytes>
210
+
211
+
212
+
213
+ \# SSL options
214
+
215
+ \# Enable SSL on normal ports
216
+
217
+ \#sslOnNormalPorts = true
218
+
219
+ \# SSL Key file and password
220
+
221
+ \#sslPEMKeyFile = /etc/ssl/mongodb.pem
222
+
223
+ \#sslPEMKeyPassword = pass
30
224
 
31
225
 
32
226
 
@@ -49,9 +243,3 @@
49
243
  @(connect):1:6
50
244
 
51
245
  exception: connect failed
52
-
53
-
54
-
55
-
56
-
57
- ##/var/log/mongodb/mongodb.log